mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-26 08:26:26 -06:00
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 {
|
||||
|
3
config/test-fixtures/validate-count-var/main.tf
Normal file
3
config/test-fixtures/validate-count-var/main.tf
Normal file
@ -0,0 +1,3 @@
|
||||
resource "aws_instance" "foo" {
|
||||
foo = "${count.index}"
|
||||
}
|
Loading…
Reference in New Issue
Block a user