The documentation says :
vpc_zone_identifier : (Optional) A list of vpc IDs to launch resources in.But I get the following error using an existing vpc :
* Error creating Autoscaling Group: ValidationError: The subnet ID 'vpc-198e497c' does not exist
The error says the subnet ID doesn't not exist ....because I didn't provide any subnet id :)
The terraform apply was successfull after giving the list of subnet (id instead of the list of vpc_id) :
vpc_zone_identifier = ["${aws_subnet.public-a.id}","${aws_subnet.public-b.id}"]
I have made a PR with the documentation update here https://github.com/hashicorp/terraform/pull/485
But now the vpc_zone_identifier argument/attribute name is not relevant anymore.
This issue may be considered as a core bug because you cannot give (arg) nor retrieve (attr) the VPC zone identifier.
(Not sure if i have been able to made myself clear...)
Fixed.
The original error has reared its head again when applying a VPC ID here:
aws_autoscaling_group.asg: Error creating Autoscaling Group: ValidationError: The subnet ID 'vpc-b9cc6fgf' does not exist
I'm assuming the docs should state that a list of VPC subnet IDs are needed, not the VPC ID, but the docs state "vpc_zone_identifier (Optional) - The VPC zone identifier".
Link to relevant doc page: https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
The original error has reared its head again when applying a VPC ID here:
aws_autoscaling_group.asg: Error creating Autoscaling Group: ValidationError: The subnet ID 'vpc-b9cc6fgf' does not existI'm assuming the docs should state that a list of VPC subnet IDs are needed, not the VPC ID, but the docs state "vpc_zone_identifier (Optional) - The VPC zone identifier".
Link to relevant doc page: https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html