Add location to cert-manager issuance config and fix issuance config reference (#2720)
This commit is contained in:
@@ -246,11 +246,11 @@ module "certificate-manager" {
|
||||
|
||||
| name | description | type | required | default |
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [project_id](variables.tf#L102) | Project id. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L103) | Project id. | <code>string</code> | ✓ | |
|
||||
| [certificates](variables.tf#L17) | Certificates. | <code title="map(object({ description = optional(string) labels = optional(map(string), {}) location = optional(string) scope = optional(string) self_managed = optional(object({ pem_certificate = string pem_private_key = string })) managed = optional(object({ domains = list(string) dns_authorizations = optional(list(string)) issuance_config = optional(string) })) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [dns_authorizations](variables.tf#L53) | DNS authorizations. | <code title="map(object({ domain = string description = optional(string) location = optional(string) type = optional(string) labels = optional(map(string)) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [issuance_configs](variables.tf#L66) | Issuance configs. | <code title="map(object({ ca_pool = string description = optional(string) key_algorithm = string labels = optional(map(string), {}) lifetime = string rotation_window_percentage = number }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [map](variables.tf#L80) | Map attributes. | <code title="object({ name = string description = optional(string) labels = optional(map(string), {}) entries = optional(map(object({ description = optional(string) hostname = optional(string) labels = optional(map(string), {}) matcher = optional(string) certificates = list(string) })), {}) })">object({…})</code> | | <code>null</code> |
|
||||
| [issuance_configs](variables.tf#L66) | Issuance configs. | <code title="map(object({ ca_pool = string description = optional(string) key_algorithm = string labels = optional(map(string), {}) lifetime = string location = optional(string) rotation_window_percentage = number }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [map](variables.tf#L81) | Map attributes. | <code title="object({ name = string description = optional(string) labels = optional(map(string), {}) entries = optional(map(object({ description = optional(string) hostname = optional(string) labels = optional(map(string), {}) matcher = optional(string) certificates = list(string) })), {}) })">object({…})</code> | | <code>null</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ resource "google_certificate_manager_certificate" "certificates" {
|
||||
content {
|
||||
domains = each.value.managed.domains
|
||||
dns_authorizations = each.value.managed.dns_authorizations
|
||||
issuance_config = each.value.managed.issuance_config
|
||||
issuance_config = try(google_certificate_manager_certificate_issuance_config.default[each.value.managed.issuance_config].id, null)
|
||||
}
|
||||
}
|
||||
dynamic "self_managed" {
|
||||
@@ -80,6 +80,7 @@ resource "google_certificate_manager_certificate_issuance_config" "default" {
|
||||
}
|
||||
}
|
||||
lifetime = each.value.lifetime
|
||||
location = each.value.location
|
||||
rotation_window_percentage = each.value.rotation_window_percentage
|
||||
key_algorithm = each.value.key_algorithm
|
||||
labels = each.value.labels
|
||||
|
||||
@@ -71,6 +71,7 @@ variable "issuance_configs" {
|
||||
key_algorithm = string
|
||||
labels = optional(map(string), {})
|
||||
lifetime = string
|
||||
location = optional(string)
|
||||
rotation_window_percentage = number
|
||||
}))
|
||||
default = {}
|
||||
|
||||
@@ -96,7 +96,6 @@ values:
|
||||
- dns_authorizations: null
|
||||
domains:
|
||||
- mydomain.mycompany.org
|
||||
issuance_config: my-issuance-config
|
||||
name: my-certificate-1
|
||||
project: project-id
|
||||
scope: null
|
||||
|
||||
Reference in New Issue
Block a user