aws_subnet resoure (imported) with a count parameter fails #631
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
This issue was originally opened by @BlaCatRu as hashicorp/terraform#13000. It was migrated here as part of the provider split. The original body of the issue is below.
Hi there,
I've imported an existing aws subnets and the state looks right
$ terraform state list
module.ireland.aws_availability_zones.available
module.ireland.aws_subnet.net[0]
module.ireland.aws_subnet.net[1]
module.ireland.aws_subnet.net[2]
module.ireland.aws_vpc.main
On refreshing the state it looses zero index
$ terraform plan
...
aws_vpc.main: Refreshing state... (ID: vpc-VVVV)
data.aws_availability_zones.available: Refreshing state...
aws_subnet.net.2: Refreshing state... (ID: subnet-ZZZZ)
aws_subnet.net.1: Refreshing state... (ID: subnet-YYYY)
aws_subnet.net: Refreshing state... (ID: subnet-XXXX)
Terraform Version
Terraform Version: 0.9.1
Affected Resource(s)
Terraform Configuration Files
main.tf
modules/vpc/main.tf
Debug Output
https://gist.github.com/BlaCatRu/71c745b9d46d351690986f0c5f93639c
The text was updated successfully, but these errors were encountered: