Hello!
I am having issues now with the subnets/ availability zones.
Issue
Running terraform plan -var-file="vars.tfvars"
passes this check. However, running terraform apply -var-file="vars.tfvars"
causes the following error:
Error: error creating application Load Balancer: ValidationError: At least two subnets in two different Availability Zones must be specified
status code: 400, request id: XXXXX
on .terraform/modules/ceramic_ecs.ceramic.alb/main.tf line 1, in resource "aws_lb" "this":
1: resource "aws_lb" "this" {
Error: error creating application Load Balancer: ValidationError: At least two subnets in two different Availability Zones must be specified
status code: 400, request id: XXXXX
on .terraform/modules/ceramic_ecs.ipfs.alb_internal/main.tf line 1, in resource "aws_lb" "this":
1: resource "aws_lb" "this" {
Error: error creating application Load Balancer: ValidationError: At least two subnets in two different Availability Zones must be specified
status code: 400, request id: XXXXX
on modules/ecs/ipfs/load_balancers.tf line 2, in resource "aws_lb" "external":
2: resource "aws_lb" "external" {
I followed this guide to implementing subnets for a VPC and it satisfied terraform plan
throwing almost the same exact error. I believe that the variables are pointing to the right VPC, that the VPC has proper routing / internet gateway access, and that the subnets are tagged with Ceramic: env
. However, I cannot get past the apply error.
Adding the variables to vars.tfvars
:
.
.
.
private_subnet_ids = ["subnet-aaa", "subnet-bbb"]
public_subnet_ids = ["subnet-ccc", "subnet-ddd"]
.
.
.
When configured according to the linked VPC subnetting guide does not change anything.
Thank you for any assistance!