azapi: unsupported attribute

One of my Azure Terraform deployments recently started failing with “unsupported attribute”. The deployment involves container app environments which aren’t currently supported by azurerm, so I’m working around that with azapi [AZAPI]. The template references an attribute (“staticIp” for the interested reader) in the resource creation JSON output. The deployment started breaking in early January 2023 with an error “unsupported attribute: properties.staticIp” which is strange, because the output JSON includes the property.

The workaround here is to obtain an azapi data source [AZDS] and read the property from there.

data "azapi_resource" "containerapp-env-ref" {
  name      =
  parent_id =
  type      = "Microsoft.App/managedEnvironments@2022-03-01"
  response_export_values = ["properties.staticIp"]

resource "azurerm_private_dns_a_record" "containerapp_record" {
  name                =
  zone_name           =
  resource_group_name =
  ttl                 = 300
  records             = ["${jsondecode(data.azapi_resource.containerapp-env-ref.output).properties.staticIp}"]
  depends_on = [





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.