added force_destroy to dns module (#2202)
* added force_destroy to dns module * ran tfdoc.py modules/dns * set default of force_destroy to null * reran tfdoc.py after default value change
This commit is contained in:
parent
a9ac0f40cd
commit
0cae2ff08c
|
@ -157,12 +157,13 @@ module "public-dns" {
|
||||||
|
|
||||||
| name | description | type | required | default |
|
| name | description | type | required | default |
|
||||||
|---|---|:---:|:---:|:---:|
|
|---|---|:---:|:---:|:---:|
|
||||||
| [name](variables.tf#L29) | Zone name, must be unique within the project. | <code>string</code> | ✓ | |
|
| [name](variables.tf#L35) | Zone name, must be unique within the project. | <code>string</code> | ✓ | |
|
||||||
| [project_id](variables.tf#L34) | Project id for the zone. | <code>string</code> | ✓ | |
|
| [project_id](variables.tf#L40) | Project id for the zone. | <code>string</code> | ✓ | |
|
||||||
| [description](variables.tf#L17) | Domain description. | <code>string</code> | | <code>"Terraform managed."</code> |
|
| [description](variables.tf#L17) | Domain description. | <code>string</code> | | <code>"Terraform managed."</code> |
|
||||||
| [iam](variables.tf#L23) | IAM bindings in {ROLE => [MEMBERS]} format. | <code>map(list(string))</code> | | <code>null</code> |
|
| [force_destroy](variables.tf#L23) | Set this to true to delete all records in the zone upon zone destruction. | <code>bool</code> | | <code>null</code> |
|
||||||
| [recordsets](variables.tf#L39) | 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 = optional(list(string)) health_checked_targets = optional(list(object({ load_balancer_type = string ip_address = string port = string ip_protocol = string network_url = string project = string region = optional(string) }))) }))) wrr_routing = optional(list(object({ weight = number records = list(string) }))) }))">map(object({…}))</code> | | <code>{}</code> |
|
| [iam](variables.tf#L29) | IAM bindings in {ROLE => [MEMBERS]} format. | <code>map(list(string))</code> | | <code>null</code> |
|
||||||
| [zone_config](variables.tf#L83) | DNS zone configuration. | <code title="object({ domain = string forwarding = optional(object({ forwarders = optional(map(string)) client_networks = list(string) })) peering = optional(object({ client_networks = list(string) peer_network = string })) public = optional(object({ dnssec_config = optional(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 } ) })) enable_logging = optional(bool, false) })) private = optional(object({ client_networks = list(string) service_directory_namespace = optional(string) })) })">object({…})</code> | | <code>null</code> |
|
| [recordsets](variables.tf#L45) | 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 = optional(list(string)) health_checked_targets = optional(list(object({ load_balancer_type = string ip_address = string port = string ip_protocol = string network_url = string project = string region = optional(string) }))) }))) wrr_routing = optional(list(object({ weight = number records = list(string) }))) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||||
|
| [zone_config](variables.tf#L89) | DNS zone configuration. | <code title="object({ domain = string forwarding = optional(object({ forwarders = optional(map(string)) client_networks = list(string) })) peering = optional(object({ client_networks = list(string) peer_network = string })) public = optional(object({ dnssec_config = optional(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 } ) })) enable_logging = optional(bool, false) })) private = optional(object({ client_networks = list(string) service_directory_namespace = optional(string) })) })">object({…})</code> | | <code>null</code> |
|
||||||
|
|
||||||
## Outputs
|
## Outputs
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ resource "google_dns_managed_zone" "dns_managed_zone" {
|
||||||
name = var.name
|
name = var.name
|
||||||
dns_name = var.zone_config.domain
|
dns_name = var.zone_config.domain
|
||||||
description = var.description
|
description = var.description
|
||||||
|
force_destroy = var.force_destroy
|
||||||
visibility = local.visibility
|
visibility = local.visibility
|
||||||
reverse_lookup = try(var.zone_config.private, null) != null && endswith(var.zone_config.domain, ".in-addr.arpa.")
|
reverse_lookup = try(var.zone_config.private, null) != null && endswith(var.zone_config.domain, ".in-addr.arpa.")
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,12 @@ variable "description" {
|
||||||
default = "Terraform managed."
|
default = "Terraform managed."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "force_destroy" {
|
||||||
|
description = "Set this to true to delete all records in the zone upon zone destruction."
|
||||||
|
type = bool
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "iam" {
|
variable "iam" {
|
||||||
description = "IAM bindings in {ROLE => [MEMBERS]} format."
|
description = "IAM bindings in {ROLE => [MEMBERS]} format."
|
||||||
type = map(list(string))
|
type = map(list(string))
|
||||||
|
|
Loading…
Reference in New Issue