Open JonathanSudibya opened 6 years ago
I'm getting similar errors, but for us-east-2
:
* aws_launch_configuration.main: InvalidAMIID.NotFound: The image id '[ami-97da70f7]' does not exist
* aws_subnet.internal.1: Error creating subnet: InvalidParameterValue: Value (us-west-2b) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-e
ast-2a, us-east-2b, us-east-2c.
I'm guessing that the regions and AMIs are no longer current. My terraform plan
output is also referencing AMIs that don't show up when I query ec2 for current Amazon-owned AMIs, and won't even let me set region = "us-east-2"
.
I'll try to fork-and-fix and report back here.
I'm still not able to actually build a working stack cluster (current stack, Terraform v0.11.2), but I'm getting closer. A few discoveries so far:
InvalidAMIID.NotFound
If I'm understanding correctly, this is because that image id doesn't exist in whatever region you're authenticating against. Make sure the key you provide in key_name
exists in EC2 for the region you want (and add it to your ~/.aws
if you want to debug with the aws cli).
It doesn't look like the Segment team have published an AMI in us-east-2
(Ohio), so I tried us-east-1
, but then had other issues (see below).
parameter availabilityZone is invalid
This is a bit confusing. It seems like the stack configs default to us-west-2
AZ's, regardless of the region you actually specify. I was able to fix that by specifying availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c"]
, so maybe that's been fixed (at least partially) since @JonathanSudibya opened this issue. I'll dig into the default stuff to see if that is in fact the case.
Aside: does setting region
in my stack module config actually do anything? I'm still prompted for a region when I run terraform
commands.
aws_autoscaling_group: diffs didn't match during apply
Once I worked around the above issues, I believe I hit terraform-providers/terraform-provider-aws#1630. There's a suggested workaround ("remove the availability_zones
, since they can be derived from the vpc_zone_identifier
", per @andrewschleifer), but I haven't yet found where that is in the stack configs. I'm still new to Terraform syntax 😛
I've transversed your exact journey @dendrochronology - Were you able to find a working workaround?
Please create environment variable in your app.py file in the following manner:- env2={ "account":"Your Account ID", "region":"ap-southeast-1", }
and use this variable in the following manner:- StackClass(app, "stack-name",env=env1)
I hope your problem should be solved, maybe its taking only default region values.
Hi, I want to try using stack with current example from README.md :
As I want to deploy my stack in region
ap-southeast-1
and availability zone in["ap-southeast-1a","ap-southeast-1b"]
, but I got this messages :I am using
Any suggestion that might fix my problem?
Thanks a lot!