config: validate good count variables
This commit is contained in:
parent
b484ec19b6
commit
2e63a69e57
|
@ -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) {
|
||||
c := testConfig(t, "validate-count-var-invalid")
|
||||
if err := c.Validate(); err == nil {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
resource "aws_instance" "foo" {
|
||||
foo = "${count.index}"
|
||||
}
|
Loading…
Reference in New Issue