config: validate unknown var in count

This commit is contained in:
Mitchell Hashimoto 2014-10-02 11:18:57 -07:00
parent 8e2315599f
commit f772c11103
2 changed files with 12 additions and 0 deletions

View File

@ -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 {

View File

@ -0,0 +1,5 @@
resource "foo" "bar" {
default = "bar"
description = "bar"
count = "${var.bar}"
}