-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added iam for DNS managed zone to dns module
- Loading branch information
Showing
5 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,11 @@ module "private-dns" { | |
"A localhost" = { records = ["127.0.0.1"] } | ||
"A myhost" = { ttl = 600, records = ["10.0.0.120"] } | ||
} | ||
iam = { | ||
"roles/dns.admin" = ["group:[email protected]"] | ||
} | ||
} | ||
# tftest modules=1 resources=3 inventory=private-zone.yaml | ||
# tftest modules=1 resources=4 inventory=private-zone.yaml | ||
``` | ||
|
||
### Forwarding Zone | ||
|
@@ -114,8 +117,11 @@ module "public-dns" { | |
recordsets = { | ||
"A myhost" = { ttl = 300, records = ["127.0.0.1"] } | ||
} | ||
iam = { | ||
"roles/dns.admin" = ["group:[email protected]"] | ||
} | ||
} | ||
# tftest modules=1 resources=3 inventory=public-zone.yaml | ||
# tftest modules=1 resources=4 inventory=public-zone.yaml | ||
``` | ||
<!-- BEGIN TFDOC --> | ||
|
||
|
@@ -124,18 +130,19 @@ module "public-dns" { | |
| name | description | type | required | default | | ||
|---|---|:---:|:---:|:---:| | ||
| [domain](variables.tf#L54) | Zone domain, must end with a period. | <code>string</code> | ✓ | | | ||
| [name](variables.tf#L72) | Zone name, must be unique within the project. | <code>string</code> | ✓ | | | ||
| [project_id](variables.tf#L83) | Project id for the zone. | <code>string</code> | ✓ | | | ||
| [name](variables.tf#L78) | Zone name, must be unique within the project. | <code>string</code> | ✓ | | | ||
| [project_id](variables.tf#L89) | Project id for the zone. | <code>string</code> | ✓ | | | ||
| [client_networks](variables.tf#L21) | List of VPC self links that can see this zone. | <code>list(string)</code> | | <code>[]</code> | | ||
| [description](variables.tf#L28) | Domain description. | <code>string</code> | | <code>"Terraform managed."</code> | | ||
| [dnssec_config](variables.tf#L34) | DNSSEC configuration for this zone. | <code title="object({ non_existence = optional(string, "nsec3") state = string key_signing_key = optional(object( { algorithm = string, key_length = number }), { algorithm = "rsasha256", key_length = 2048 } ) zone_signing_key = optional(object( { algorithm = string, key_length = number }), { algorithm = "rsasha256", key_length = 1024 } ) })">object({…})</code> | | <code title="{ state = "off" }">{…}</code> | | ||
| [enable_logging](variables.tf#L59) | Enable query logging for this zone. | <code>bool</code> | | <code>false</code> | | ||
| [forwarders](variables.tf#L66) | Map of {IPV4_ADDRESS => FORWARDING_PATH} for 'forwarding' zone types. Path can be 'default', 'private', or null for provider default. | <code>map(string)</code> | | <code>{}</code> | | ||
| [peer_network](variables.tf#L77) | Peering network self link, only valid for 'peering' zone types. | <code>string</code> | | <code>null</code> | | ||
| [recordsets](variables.tf#L88) | Map of DNS recordsets in \"type name\" => {ttl, [records]} format. | <code title="map(object({ ttl = optional(number, 300) records = optional(list(string)) geo_routing = optional(list(object({ location = string records = list(string) }))) wrr_routing = optional(list(object({ weight = number records = list(string) }))) }))">map(object({…}))</code> | | <code>{}</code> | | ||
| [service_directory_namespace](variables.tf#L123) | Service directory namespace id (URL), only valid for 'service-directory' zone types. | <code>string</code> | | <code>null</code> | | ||
| [type](variables.tf#L129) | Type of zone to create, valid values are 'public', 'private', 'forwarding', 'peering', 'service-directory','reverse-managed'. | <code>string</code> | | <code>"private"</code> | | ||
| [zone_create](variables.tf#L139) | Create zone. When set to false, uses a data source to reference existing zone. | <code>bool</code> | | <code>true</code> | | ||
| [iam](variables.tf#L72) | IAM bindings in {ROLE => [MEMBERS]} format. | <code>map(list(string))</code> | | <code>null</code> | | ||
| [peer_network](variables.tf#L83) | Peering network self link, only valid for 'peering' zone types. | <code>string</code> | | <code>null</code> | | ||
| [recordsets](variables.tf#L94) | Map of DNS recordsets in \"type name\" => {ttl, [records]} format. | <code title="map(object({ ttl = optional(number, 300) records = optional(list(string)) geo_routing = optional(list(object({ location = string records = list(string) }))) wrr_routing = optional(list(object({ weight = number records = list(string) }))) }))">map(object({…}))</code> | | <code>{}</code> | | ||
| [service_directory_namespace](variables.tf#L129) | Service directory namespace id (URL), only valid for 'service-directory' zone types. | <code>string</code> | | <code>null</code> | | ||
| [type](variables.tf#L135) | Type of zone to create, valid values are 'public', 'private', 'forwarding', 'peering', 'service-directory','reverse-managed'. | <code>string</code> | | <code>"private"</code> | | ||
| [zone_create](variables.tf#L145) | Create zone. When set to false, uses a data source to reference existing zone. | <code>bool</code> | | <code>true</code> | | ||
|
||
## Outputs | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,4 @@ values: | |
counts: | ||
google_dns_managed_zone: 1 | ||
google_dns_record_set: 2 | ||
google_dns_managed_zone_iam_binding: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters