Open KevinBrooke opened 1 month ago
We have https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/dns_managed_zones for list calls, but don't have an inline filter on the resource; that'd be the easiest way to do this, I think. You'd then supply the identity fields from the first element to the singleton datasource.
Community Note
Description
data "google_dns_managed_zone" "env_dns_zone" { name = "qa-zone" }
Only supports name and project, we need to be able to look it up by DNS_NAME. This is possible via CLI, so we are currently using an external data resource, but TF should support this instead.
gcloud dns managed-zones list --project="${var.project_id}" --filter="DNS_NAME:${var.fqdn}" --format=json | jq -c .[0].name
New or Affected Resource(s)
google_dns_managed_zone
Potential Terraform Configuration
References
No response
b/359238452