Add support for KMS key creation to project factory (#3518)

* initial implementation

* context

* tfdoc

* add support for autokey to projects

* fix typo
This commit is contained in:
Ludovico Magnocavallo
2025-11-11 07:23:50 +01:00
committed by GitHub
parent 15a5486a1e
commit fc7aa71ada
20 changed files with 905 additions and 49 deletions

View File

@@ -166,6 +166,24 @@ variable "factories_config" {
default = {}
}
variable "kms_autokeys" {
description = "KMS Autokey key handles."
type = map(object({
location = string
resource_type_selector = optional(string, "compute.googleapis.com/Disk")
}))
nullable = false
default = {}
validation {
condition = alltrue([
for k, v in var.kms_autokeys : k == try(regex(
"^[a-z][a-z0-9-]+[a-z0-9]$", k
), null)
])
error_message = "Autokey keys need to be valid GCP resource names."
}
}
variable "labels" {
description = "Resource labels."
type = map(string)