-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Ability to create custom types. #27365
Copy link
Copy link
Open
Labels
Description
Instead of something like this:
module-inputs.tf
variable "configuration" {
type = object({
x = string
y = string
z = list(string)
})
}
infra-inputs.tf
variable "named-configurations" {
type = map(
object({
x = string
y = string
z = list(string)
})
)
}
which, here and especially for multiple top-level modules, involves a ridiculous amount of boilerplate, we'd like to see something along the lines of:
types.tf
type "configuration" {
definition = map(
object({
x = string
y = string
z = list(string)
})
)
}
and then
module-inputs.tf
variable "configurtion" {
type = types.configuration
}
infra-inputs.tf
variable "named-configurations" {
type = map(types.configuration)
}
Reactions are currently unavailable