gruntwork-io/terragrunt-infrastructure-live-example

Errors running the examples out-of-the-box: Classic Load Balancers do not support Availability Zone 'us-east-1f'

mlintonford opened this issue · 3 comments

Hi, can anybody suggest whats going wrong here? The IAM role associated with the key has full administrator access btw... Thanks

←[1m←[31mError: ←[0m←[0m←[1mError applying plan:
2 error(s) occurred:

  • aws_elb.webserver_example: 1 error(s) occurred:

  • aws_elb.webserver_example: InvalidConfigurationRequest: Classic Load Balancers do not support Availability Zone 'us-east-1f'.
    status code: 409, request id: 8784f5f0-d2c8-11e8-a52c-93b5e336c90a

  • aws_security_group_rule.elb_allow_all_outbound: 1 error(s) occurred:

  • aws_security_group_rule.elb_allow_all_outbound: Error authorizing security group rule type egress: InvalidParameterVal
    ue: Only Amazon VPC security groups may be used with this operation.
    status code: 400, request id: 5bb3fc81-26f5-4be5-af82-405861757905

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.←[0m

←[0m←[0m←[0m
[terragrunt] 2018/10/18 12:25:35 Hit multiple errors:
exit status 1

So I changed the region to us-west-1 in terraform.tfvars and account.tfvars and now I get a new error:

  • aws_elb.webserver_example: InvalidConfigurationRequest: Default subnet in us-west-1a not found
    status code: 409, request id: 6798ae77-d2d0-11e8-a782-2350935b2baa

So I tried to create a Default subnet in us-west-1a and AWS console gives me the error:

Create Subnet Error
Value (us-west-1a) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-west-1b, us-west-1c.

Classic Load Balancers do not support Availability Zone 'us-east-1f'.

Looks like AWS has added a new availability zone that, for some reason, doesn't support the Classic Load Balancer (CLB). The examples in this repo use the CLB and all your availability zones by default: https://github.com/gruntwork-io/terragrunt-infrastructure-modules-example/blob/master/asg-elb-service/main.tf#L121. You'd have to tweak this to only the availability zones that support the CLB: https://github.com/gruntwork-io/terragrunt-infrastructure-modules-example/blob/master/asg-elb-service/main.tf#L41

Not sure about the subnet errors you're having!

Thanks.

I have hard-coded some fixes which run, in v0.0.1 of my fork https://github.com/mlintonford/terragrunt-infrastructure-live-example/releases. If I find time I'll make my code more elegant and submit a PR, but meanwhile anyone encountering this problem can look at my fixes to get these examples to run.