config: validate good count variables

This commit is contained in:
Mitchell Hashimoto 2014-10-02 18:25:18 -07:00
parent b484ec19b6
commit 2e63a69e57
2 changed files with 10 additions and 0 deletions

View File

@ -95,6 +95,13 @@ func TestConfigValidate_countUserVar(t *testing.T) {
} }
} }
func TestConfigValidate_countVar(t *testing.T) {
c := testConfig(t, "validate-count-var")
if err := c.Validate(); err != nil {
t.Fatal("err: %s", err)
}
}
func TestConfigValidate_countVarInvalid(t *testing.T) { func TestConfigValidate_countVarInvalid(t *testing.T) {
c := testConfig(t, "validate-count-var-invalid") c := testConfig(t, "validate-count-var-invalid")
if err := c.Validate(); err == nil { if err := c.Validate(); err == nil {

View File

@ -0,0 +1,3 @@
resource "aws_instance" "foo" {
foo = "${count.index}"
}