Billy H
03/20/2024, 6:36 PMterraform apply -target module.fleet.module.vpc
Error: creating EC2 Subnet: InvalidParameterValue: Value (us-east-2b) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1e, us-east-1f.
│ status code: 400, request id: 23b75412-c81c-4c2f-8d05-579e8c8b297f
│
│ with module.fleet.module.vpc.aws_subnet.public[1],
│ on .terraform\modules\fleet.vpc\<http://main.tf|main.tf> line 97, in resource "aws_subnet" "public":
│ 97: resource "aws_subnet" "public" {
This repeats for us-east-2a
, us-east-2b
, and us-east-2c
on aws_subnet.public
, aws_subnet.private
, aws_subnet.database
, and aws_subnet.elasticache
Is this an issue with my AWS account? Could it be region limited?Benjamin Edwards
03/20/2024, 6:40 PMus-east-1
you'd need to do something like:
module "fleet" {
source = "github.com/fleetdm/fleet//terraform?ref=tf-mod-root-v1.7.1"
vpc_config = {
name = var.vpc_name
azs = ["us-east-1a", "us-east-1b", ""us-east-1c"]
}
...other configs
}
Benjamin Edwards
03/20/2024, 6:42 PMBenjamin Edwards
03/20/2024, 6:42 PMBilly H
03/20/2024, 6:44 PMBenjamin Edwards
03/20/2024, 6:45 PMBilly H
03/21/2024, 2:49 PMmodule.migrations.null_resource.main (local-exec): Waiter ServicesStable failed: Max attempts exceeded
╷
│ Error: local-exec provisioner error
│
│ with module.migrations.null_resource.main,
│ on .terraform/modules/migrations/terraform/addons/migrations/main.tf line 7, in resource "null_resource" "main":
│ 7: provisioner "local-exec" {
│
│ Error running command '/bin/bash .terraform/modules/migrations/terraform/addons/migrations/migrate.sh REGION=us-east-1 ECS_CLUSTER=fleet TASK_DEFINITION=fleet TASK_DEFINITION_REVISION=2 SUBNETS=["subnet-001fe1d39bf05f8bb","subnet-02c1de21a08c3423e","subnet-0c04ac2225b065d25"]
│ SECURITY_GROUPS=["sg-0fcfaea3426466769"] ECS_SERVICE=fleet MIN_CAPACITY=1 DESIRED_COUNT=1': exit status 255. Output: e2a19-31b4-4967-a5c2-bbf3cd1fcfff",
│ "createdAt": "2024-03-20T17:50:08.017000-04:00",
│ "message": "(service fleet) deregistered 1 targets in (target-group arn:aws:elasticloadbalancing:us-east-1:703235155488:targetgroup/fleet/47d4ffbb31ad3d90)"
│ },
......
I'm seeing different solutions online about this particular error but wanted to see if you had an idea before I started trying thingsBenjamin Edwards
03/21/2024, 3:32 PMBilly H
03/21/2024, 3:33 PMBilly H
03/21/2024, 3:45 PM