terraform/internal/stacks/stackruntime/testdata/mainbundle/test/complex-inputs/main.tfcomponent.hcl
Liam Cervante a80220dcc9
stacks: rename .tfstack files to .tfcomponent (#37013)
* stacks: rename .tfstack files to .tfcomponent

* fix consistency issues
2025-05-15 08:33:13 +02:00

58 lines
855 B
HCL

required_providers {
testing = {
source = "hashicorp/testing"
version = "0.1.0"
}
}
provider "testing" "default" {}
variable "default" {
type = object({
id = string
value = string
})
default = {
id = "cec9bc39"
value = "hello, mercury!"
}
}
variable "optional_default" {
type = object({
id = optional(string)
value = optional(string, "hello, venus!")
})
default = {
id = "78d8b3d7"
}
}
variable "optional" {
type = object({
id = optional(string)
value = optional(string, "hello, earth!")
})
}
component "self" {
source = "./"
providers = {
testing = provider.testing.default
}
inputs = {
input = [
var.default,
var.optional_default,
var.optional,
]
}
}
stack "child" {
source = "./child"
inputs = {
optional = {}
}
}