首页 > 解决方案 > Azure terraform 脚本中 key_data 中所需的路径是什么

问题描述

我想使用 Terraform 脚本在 Azure 中部署 Linux 机器,但我在 ssh_keys 中看到它要求我提供公钥路径。

但公钥路径位于 Azure Key Vault 中。我怎样才能在这里给出路径?请协助。

请参考我的代码:

os_profile_linux_config {
    disable_password_authentication = true

    ssh_keys = [{
      path     = "/home/default_user/.ssh/authorized_keys"
      key_data = 
    }]
  }

标签: azureterraformssh-keys

解决方案


Azure 当前不支持您正在寻找的功能。有一个添加数据源以从 Azure KeyVault 提取机密的功能请求,并且产品团队已收到该请求的通知。请参考以下对话:

https://github.com/terraform-providers/terraform-provider-azurerm/issues/839


推荐阅读