core: Rename "count" variables in context plan fixtures
This variable name is now reserved so we can support the count meta-argument inside module blocks in a later release.
This commit is contained in:
parent
dc7f793be9
commit
1a547b5351
|
@ -265,7 +265,7 @@ func TestContext2Plan_moduleCycle(t *testing.T) {
|
||||||
ResourceTypes: map[string]*configschema.Block{
|
ResourceTypes: map[string]*configschema.Block{
|
||||||
"aws_instance": {
|
"aws_instance": {
|
||||||
Attributes: map[string]*configschema.Attribute{
|
Attributes: map[string]*configschema.Attribute{
|
||||||
"id": {Type: cty.String, Computed: true},
|
"id": {Type: cty.String, Computed: true},
|
||||||
"some_input": {Type: cty.String, Optional: true},
|
"some_input": {Type: cty.String, Optional: true},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1874,7 +1874,7 @@ func TestContext2Plan_countVar(t *testing.T) {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Variables: InputValues{
|
Variables: InputValues{
|
||||||
"count": &InputValue{
|
"instance_count": &InputValue{
|
||||||
Value: cty.StringVal("3"),
|
Value: cty.StringVal("3"),
|
||||||
SourceType: ValueFromCaller,
|
SourceType: ValueFromCaller,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
variable "count" {}
|
variable "instance_count" {}
|
||||||
|
|
||||||
resource "aws_instance" "foo" {
|
resource "aws_instance" "foo" {
|
||||||
count = "${var.count}"
|
count = var.instance_count
|
||||||
foo = "foo"
|
foo = "foo"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_instance" "bar" {
|
resource "aws_instance" "bar" {
|
||||||
foo = "${join(",", aws_instance.foo.*.foo)}"
|
foo = join(",", aws_instance.foo.*.foo)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
variable "count" {
|
variable "instance_count" {
|
||||||
default = 3
|
default = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_instance" "foo" {
|
resource "aws_instance" "foo" {
|
||||||
count = "${var.count}"
|
count = "${var.instance_count}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue