I want simplify such construction
variable "google" {
type = object({
project = string
region = string
zone = string
})
}
provider "google" {
project = var.google.project
region = var.google.region
zone = var.google.zone
}
Does HCL have something similar to spread operator?
What you've written here is the shortest possible way to write what you've shown in the Terraform language. There is no mechanism to populate the arguments of a block dynamically from the attributes of an object.