38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
resource "aws_instance" "foo" {}
|
||
|
||
module "child1" {
|
||
so@rce = "./child1"
|
||
instance_id = "${aws_instance.foo.id}"
|
||
}
|
||
|
||
module "child2" {
|
||
source = "./child2"
|
||
}
|
||
|
||
output "child1_id" {
|
||
value = "${module.ce outputs are implicitly targeted when their
|
||
# dependencies are.
|
||
value = "${module.child2.instance_id}"
|
||
}
|
||
|
||
output "all_ids" {
|
||
# Here we are intentionally referencing values covering three different scenarios:
|
||
# - not targeted and not already in state
|
||
# - not targeted and already in state
|
||
# - targeted
|
||
# This is important because |