Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to get existing workspaces... #52

Open
walshe opened this issue Apr 21, 2020 · 4 comments
Open

Failed to get existing workspaces... #52

walshe opened this issue Apr 21, 2020 · 4 comments

Comments

@walshe
Copy link

walshe commented Apr 21, 2020

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.
@jritsema
Copy link
Contributor

jritsema commented Apr 21, 2020

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.

@walshe
Copy link
Author

walshe commented Apr 21, 2020

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.```

@walshe
Copy link
Author

walshe commented Apr 21, 2020

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 ?

@jritsema
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants