config: validate unknown var in count
This commit is contained in:
parent
8e2315599f
commit
f772c11103
|
@ -79,6 +79,13 @@ func TestConfigValidate_unknownVar(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestConfigValidate_unknownVarCount(t *testing.T) {
|
||||
c := testConfig(t, "validate-unknownvar-count")
|
||||
if err := c.Validate(); err == nil {
|
||||
t.Fatal("should not be valid")
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfigValidate_varDefault(t *testing.T) {
|
||||
c := testConfig(t, "validate-var-default")
|
||||
if err := c.Validate(); err != nil {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
resource "foo" "bar" {
|
||||
default = "bar"
|
||||
description = "bar"
|
||||
count = "${var.bar}"
|
||||
}
|
Loading…
Reference in New Issue