prefapp / tfm

Reusable Terraform modules
0 stars 0 forks source link

Fix required `object_id` when alternativa reference provided #117

Closed jcframil closed 1 month ago

jcframil commented 1 month ago

Motivation

We need to have the possibility not to provide the object_id value when a different reference is given.

Solution

Providing a default value "" to the variable

variable "access_policies" {
  type = list(object({
    type                    = optional(string)
    name                    = optional(string)
    object_id               = optional(string, "")
    key_permissions         = optional(list(string))
    secret_permissions      = optional(list(string))
    certificate_permissions = optional(list(string))
    storage_permissions     = optional(list(string))
  }))
  default = []
}