Google Cloud DNS Inbound Policy Addresses
This module allows discovering the addresses reserved in subnets when DNS Inbound Policies are configured.
Since it's currently impossible to fetch those addresses using a GCP data source (see this issue for more details), the workaround used here is to derive the authorization token from the Google provider, and do a direct HTTP call to the Compute API.
Examples
module "dns-policy-addresses" {
source = "./fabric/modules/__experimental/net-dns-policy-addresses"
project_id = "myproject"
regions = ["europe-west1", "europe-west3"]
}
# tftest skip (uses data sources)
The output is a map with lists of addresses of type DNS_RESOLVER for each region specified in variables.
Variables
| name | description | type | required | default |
|---|---|---|---|---|
| project_id | Project id. | string |
✓ | |
| regions | Regions to fetch addresses from. | list(string) |
["europe-west1"] |
Outputs
| name | description | sensitive |
|---|---|---|
| addresses | DNS inbound policy addresses per region. |