如何使用Terraform在Azure键Vault中从SQL托管实例存储连接字符串
我正在使用Terraform部署SQL托管实例,并且需要将其随附的4个连接字符串存储在Azure密钥库中。根据SQL托管实例的Terraform文档: noreferrer“ /最新/docs/resources/mssql_managed_instance 连接字符串不是导出的属性,因此不能仅仅执行输出并引用它。我将如何识别这些连接字符串将它们存储在钥匙库中?
如果Terraform不可能,我对Powershell/ARM解决方案开放
I am using terraform to deploy a SQL managed instance and need to store the 4 connection strings that come with it in azure key vault. According to terraform documentation for SQL managed instance:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_managed_instance
connection string is not an attribute that is exported, so can't just do an output and reference it. How would I identify these connection strings to store them in key vault?
If it is not possible with terraform I am open to powershell/arm solutions
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,您可以使用Terraform这样的Terraform将任何秘密存储在钥匙库中:
每个连接字符串遵循某个语法,因此我将它们放在基于名称,管理员用户和管理员密码的字符串中,然后将它们添加到键库中,与此类似:
要找到连接字符串及其确切的语法,您应该查看在Azure门户中创建的SQL托管实例。
In general, you can store any secret in a key vault using terraform like so:
Every connection string follows a certain syntax so I would put these together as strings based on the name, admin user and admin password, and add them to the key vault, similar to this:
To find the connection strings and their exact syntax, you should have a look at the sql managed instance that has been created in the azure portal.