Terraform秘密价值不更新
我在秘密价值更新方面遇到麻烦。如果我使用新名称重新创建Azurerm_windows_function_app,则新ID不会以秘密值更新。该秘密将包含azurerm_windows_function_app的旧ID。
resource "azurerm_windows_function_app" "function_app" {
name = "function-app"
resource_group_name = azurerm_resource_group.xxxx.name
location = azurerm_resource_group.xxxx.location
storage_account_name = azurerm_storage_account.xxx.name
service_plan_id = azurerm_service_plan.xxxx.id
site_config {}
}
resource "azurerm_key_vault_secret" "function_app_id" {
name = "function-app-id"
value = azurerm_windows_function_app.function_app.id
key_vault_id = var.vault_id
}
I am having trouble with secret value update. If I recreate azurerm_windows_function_app with new name the new ID is not being updated in secret value. The secret will contain old ID of the azurerm_windows_function_app.
resource "azurerm_windows_function_app" "function_app" {
name = "function-app"
resource_group_name = azurerm_resource_group.xxxx.name
location = azurerm_resource_group.xxxx.location
storage_account_name = azurerm_storage_account.xxx.name
service_plan_id = azurerm_service_plan.xxxx.id
site_config {}
}
resource "azurerm_key_vault_secret" "function_app_id" {
name = "function-app-id"
value = azurerm_windows_function_app.function_app.id
key_vault_id = var.vault_id
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论