terraform-ecs-fargate
terraform-ecs-fargate copied to clipboard
Failed to get existing workspaces...
Hi..
im pretty new to TF.. seem to have run into the following issue .. any ideas?
➜ base git:(master) ✗ terraform state list data.aws_caller_identity.current data.aws_iam_policy_document.ecr aws_ecr_repository.app aws_ecr_repository_policy.app module.tf_remote_state.data.aws_iam_role.role module.tf_remote_state.aws_s3_bucket.bucket module.tf_remote_state.aws_s3_bucket_policy.bucket_policy ➜ base git:(master) ✗ cd ../env/dev ➜ dev git:(master) ✗ terraform init
Initializing the backend...
Error: Failed to get existing workspaces: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, ListObjectsInput.Bucket.
Hi @walshe. Make sure bucket and profile are set in main.tf to the values created in base. If you use fargate-create, it will do this for you.
hmm the one in env/dev right?
required_version = ">= 0.12"
backend "s3" {
region = "eu-west-1"
profile = "default"
bucket = "tf-state-zoot"
key = "dev.terraform.tfstate"
}
}
still getting that issue:
Outputs:
bucket = tf-state-zoot
docker_registry = xxxx.dkr.ecr.eu-west-1.amazonaws.com/zoot
➜ base git:(master) ✗ cd ../env/dev
➜ dev git:(master) ✗ terraform init
Initializing the backend...
Error: Failed to get existing workspaces: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, ListObjectsInput.Bucket.```
ok looks like it was something that was just cached.. have got further now.
Btw these scripts depend on existing vpc and subnets already being in place right ?
Yes @walshe, the template does assume that you have an existing vpc/subnets that will be passed in as input variables. It also assumes that the vpc/subnets will be setup to have outbound internet access so that ECS can talk to the ECR service. We should probably be more explicit about that in the readme.