terraform - 需要在 terraform 中显示敏感数据输出变量

标签 terraform terraform-provider-azure

以下代码片段是我用于创建 Azure SignalR 服务的 terraform 配置:

output "signalrserviceconnstring" {
  value = azurerm_signalr_service.mysignalrservice.primary_connection_string
  description = "signalR service's primary connection string"
  sensitive = true
}
我在 sensitive = true 时遇到错误不包括在内,但我仍然没有在控制台上看到输出结果。此问题的解决方案或解决方法是什么?

最佳答案

整点sensitive = true是为了防止每次运行时在控制台上显示值terraform apply .您必须明确输出敏感值,如下所示:

terraform output signalrserviceconnstring
我强烈建议阅读 the documentation .

关于terraform - 需要在 terraform 中显示敏感数据输出变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67650019/

相关文章:

azure - Terraform 希望部署子网但禁用网络安全组

azure - 仅当Azure中不存在azurerm_resourcegroup时,如何通过terraform创建azurerm_resourcegroup?

terraform - 通过 Terraform 执行时 Azcopy 抛出错误

terraform - 让 Terraform 始终更新资源,即使没有任何更改

azure - 为 VMSS 添加 Azure 诊断设置

azure - 在 Terraform for Azure 中使用 for_each 时如何获取 id 作为输出?

azure - 在 TF 中引用 map 对象

ubuntu - Terraform 无法在 Ubuntu 16.04 上安装 haproxy?

azure - 如何通过 Terraform 或 ARM 部署应用服务扩展?

terraform - 重构 terraform 代码时,是否有一种理智的方法来更新相应的 terraform 状态?