terraform: test for querying count resources

This commit is contained in:
Mitchell Hashimoto 2016-08-19 11:41:00 -04:00
parent 3b3f92cd9b
commit 4454d534fc
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A

View File

@ -93,6 +93,19 @@ func TestStateFilterFilter(t *testing.T) {
},
},
"no count index": {
"complete.tfstate",
[]string{"module.consul.aws_instance.consul-green"},
[]string{
"*terraform.ResourceState: module.consul.aws_instance.consul-green[0]",
"*terraform.InstanceState: module.consul.aws_instance.consul-green[0]",
"*terraform.ResourceState: module.consul.aws_instance.consul-green[1]",
"*terraform.InstanceState: module.consul.aws_instance.consul-green[1]",
"*terraform.ResourceState: module.consul.aws_instance.consul-green[2]",
"*terraform.InstanceState: module.consul.aws_instance.consul-green[2]",
},
},
"nested modules": {
"nested-modules.tfstate",
[]string{"module.outer"},