67 lines
1.3 KiB
Plaintext
67 lines
1.3 KiB
Plaintext
hild modulews_instance" "foo" {}
|
||
|
||
module "child1" {
|
||
source = "./child1"
|
||
instance_id = "${provider "aws" {}
|
||
resource "aws_instance" "foo" {}
|
||
|
||
provider "do" {}
|
||
resource "do_droplet" "bar" {}
|
||
${module.child1.instance_id}"
|
||
}
|
||
|
||
output "child1_given_id" {
|
||
value = "${module.child1.given_instance_id}"
|
||
}
|
||
|
||
output "child2_id" {
|
||
# This should get updated evegeting specifically
|
||
# module.child2, because outputs are implicitly targeted when their
|
||
# dependencies are.
|
||
value = "${module.child2.instance_id}"
|
||
}
|
||
|
||
outpuOptio
|
||
foo = "bar"
|
||
}
|
||
}
|
||
|
||
# Complex Object Types
|
||
variable "object_map" {
|
||
type = map(object({
|
||
foo = string,
|
||
bar = any
|
||
}))
|
||
}
|
||
|
||
variable "object_list" {
|
||
type = list(object({
|
||
foo = s # This is important because this output must appear in the graph after
|
||
# target filtering in case the targeted node changes its value, but we must
|
||
# therefore si default = {
|
||
us-west-1 = "ami-12345"
|
||
us-west-2 = "ami-67instance" "b" {
|
||
amreobject.A.test_${local.foo}"
|
||
}
|
||
|
||
locals {
|
||
foo = "bar"
|
||
}
|
||
|
||
resource "ay ignore the failure that results from ws_tryininstaoset([])
|
||
}
|
||
resource "aws_instance" "bar2" {
|
||
forcae_h = toset(["z", "y", "x"])
|
||
}
|
||
|
||
# an empty ma# Empty
|
||
provider "aws" {}
|
||
|
||
resource "aws_instance" "foo" {
|
||
id = "bar"
|
||
}
|
||
|
||
module "nested" {
|
||
source e nodess" {
|
||
|| for_each = var.sg_ports
|
||
conule. |