I have specified my vpc_zone_identifier's in my auto scaling group, however when I try to run terraform apply, it will fail with the error that the SG specified for the scaling group is not in the default VPC.
Hi @cmacmurray. Thanks for opening this, it should be straightforward enough to reproduce. Can you confirm whether your launch configuration target the default VPC? Alternatively do you have a minimal configuration that you could post showing this?
Hey @cmacmurray 鈥撀爓e haven't heard back in a while so I'm going to close this. Please let us know if you're still having an issue here.
Thanks!
I had this issue today, the issue was when I tried to pass a comma separated list of Security Group IDs but forgot split them.
The error message from AWS The security group 'sg-abcd1234,sg-1234abcd' does not exist in default VPC 'vpc-abcd1234' is deceptive, it actually means that the security group was not found anywhere, because you've provided a comma separated list of IDs!
@nemski - Thanks a lot for posting your findings, luckily I found your comment here as I could have wasted hours trying to track the problem down.
I had the same issue when specifying a security group name instead of its id.
The error message is misleading. I am not using the default VPC but got the message :
'sg_bastion' does not exist in default 'VPC vpc-xxx'
Yeah, I got caught out with this one as well. It was as simple as wrong spelling meaning the security group technically didn't exist anywhere. A more accurate error message would be nice
Hi all,
The AWS provider is no longer developed in this repository. If you have feedback on the AWS provider, please open a new issue in the AWS provider's own repository.
Most helpful comment
I had the same issue when specifying a security group name instead of its id.
The error message is misleading. I am not using the default VPC but got the message :
'sg_bastion' does not exist in default 'VPC vpc-xxx'