mirror of https://github.com/hashicorp/terraform
Building on b10564a, adding tweaks that allow the module var count
search to act recursively, ensuring that a sitaution where something
like var.top gets passed to module middle, as var.middle, and then to
module bottom, as var.bottom, which is then used in a resource count.
pull/6753/head
parent
f33ef43195
commit
2a679edd25
@ -0,0 +1,5 @@
|
||||
variable "mod_count_child2" { }
|
||||
|
||||
resource "aws_instance" "foo" {
|
||||
count = "${var.mod_count_child2}"
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
variable "mod_count_child" { }
|
||||
|
||||
module "child2" {
|
||||
source = "./child2"
|
||||
mod_count_child2 = "${var.mod_count_child}"
|
||||
}
|
||||
|
||||
resource "aws_instance" "foo" { }
|
||||
@ -0,0 +1,9 @@
|
||||
variable "mod_count_root" {
|
||||
type = "string"
|
||||
default = "3"
|
||||
}
|
||||
|
||||
module "child" {
|
||||
source = "./child"
|
||||
mod_count_child = "${var.mod_count_root}"
|
||||
}
|
||||
Loading…
Reference in new issue