From 1a547b53513a821c9f91a6ec19810007cbfc78d9 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Wed, 23 May 2018 09:59:03 -0700 Subject: [PATCH] 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. --- terraform/context_plan_test.go | 4 ++-- terraform/test-fixtures/plan-count-var/main.tf | 8 ++++---- .../test-fixtures/plan-taint-interpolated-count/main.tf | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/terraform/context_plan_test.go b/terraform/context_plan_test.go index 831762bd4..4470e618b 100644 --- a/terraform/context_plan_test.go +++ b/terraform/context_plan_test.go @@ -265,7 +265,7 @@ func TestContext2Plan_moduleCycle(t *testing.T) { ResourceTypes: map[string]*configschema.Block{ "aws_instance": { Attributes: map[string]*configschema.Attribute{ - "id": {Type: cty.String, Computed: true}, + "id": {Type: cty.String, Computed: true}, "some_input": {Type: cty.String, Optional: true}, }, }, @@ -1874,7 +1874,7 @@ func TestContext2Plan_countVar(t *testing.T) { }, ), Variables: InputValues{ - "count": &InputValue{ + "instance_count": &InputValue{ Value: cty.StringVal("3"), SourceType: ValueFromCaller, }, diff --git a/terraform/test-fixtures/plan-count-var/main.tf b/terraform/test-fixtures/plan-count-var/main.tf index b4cf08fb1..8b8a04333 100644 --- a/terraform/test-fixtures/plan-count-var/main.tf +++ b/terraform/test-fixtures/plan-count-var/main.tf @@ -1,10 +1,10 @@ -variable "count" {} +variable "instance_count" {} resource "aws_instance" "foo" { - count = "${var.count}" - foo = "foo" + count = var.instance_count + foo = "foo" } resource "aws_instance" "bar" { - foo = "${join(",", aws_instance.foo.*.foo)}" + foo = join(",", aws_instance.foo.*.foo) } diff --git a/terraform/test-fixtures/plan-taint-interpolated-count/main.tf b/terraform/test-fixtures/plan-taint-interpolated-count/main.tf index 7f17a9c8e..91d8b65c8 100644 --- a/terraform/test-fixtures/plan-taint-interpolated-count/main.tf +++ b/terraform/test-fixtures/plan-taint-interpolated-count/main.tf @@ -1,7 +1,7 @@ -variable "count" { +variable "instance_count" { default = 3 } resource "aws_instance" "foo" { - count = "${var.count}" + count = "${var.instance_count}" }