我正在使用 Terraform 为基于 Azure 容器应用程序的项目创建基础架构。
我已经使用引用 Key Vault 值的配置项和一些手动定义的(非敏感)配置项的组合来设置 Azure Key Vault 和 AppConfiguration。
我正在尝试创建一个 Azure 容器应用程序实例,其秘密引用 AppConfiguration 使用的值,但迄今为止无法找到实现此目的的方法 - 使用 app_configuration_keys 数据源为我提供了项目,但这些值只是 url 表示,当我尝试用它填充容器应用程序机密时,将使用相同的 url。
有谁知道是否可以这样做?以前,我在没有 AppConfiguration 的情况下使用 Key Vault,并且能够通过传入对 CDKTF 中的 Key Vault 项目的引用来填充机密,但我现在希望添加更多具有不同配置源的环境,因此 AppConfiguration 似乎是更适合。
任何建议表示赞赏。
谢谢
来自 使用应用程序服务和 Azure Functions 的应用程序配置参考:
应用程序配置参考的形式为:
@Microsoft.AppConfiguration({referenceString})
例如:
@Microsoft.AppConfiguration(Endpoint=https://myAppConfigStore.azconfig.io; Key=myAppConfigKey; Label=myKeysLabel)
或者,作为替代方案,没有任何
Label
:
@Microsoft.AppConfiguration(Endpoint=https://myAppConfigStore.azconfig.io; Key=myAppConfigKey)