variables.tf
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
variable "parameters" {
  description = <<-EOT
    Map of SSM parameters to create.
    type is String, StringList, or SecureString.
    kms_key_id is required when type is SecureString.
    EOT
  type = map(object({
    name        = string
    description = optional(string, "")
    type        = optional(string, "SecureString")
    value       = string
    tier        = optional(string, "Standard")
    kms_key_id  = optional(string, null)
    overwrite   = optional(bool, false)
  }))
  default = {}
  validation {
    condition = alltrue([
      for k, v in var.parameters : contains(["String", "StringList", "SecureString"], v.type)
    ])
    error_message = "Parameter type must be String, StringList, or SecureString."
  }
}

variable "tags" {
  description = "Resource tags to apply to all resources"
  type        = map(string)
  default     = {}
}