Skip to content

Commit

Permalink
Merge pull request #1184 from aztfmod/patch.sqlmi.output
Browse files Browse the repository at this point in the history
Update resource id SQL MI
  • Loading branch information
arnaudlh authored May 30, 2022
2 parents b6804e3 + fdce2b7 commit 97c8b80
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/databases/mssql_managed_instance/managed_instance.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,12 @@ data "azapi_resource" "mssqlmi" {
name = azurecaf_name.mssqlmi.result
parent_id = local.parent_id
type = "Microsoft.Sql/managedInstances@2021-11-01-preview"

response_export_values = ["properties.id"]
}

locals {
parent_id = format("/subscriptions/%s/resourceGroups/%s", var.client_config.subscription_id, var.resource_group_name)
output = {
id = jsondecode(data.azapi_resource.mssqlmi.output).properties.id
id = jsondecode(data.azapi_resource.mssqlmi.id)
principal_id = try(jsondecode(data.azapi_resource.mssqlmi.identity[0].principal_id), null)
}
}

0 comments on commit 97c8b80

Please sign in to comment.