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
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.