Closed gdhgdhgdh closed 7 years ago
This was a combination of two things:
1) The AWS account I was using was missing S3:ListObjects permissions
2) I was missing the simple terraform { backend "s3" {} }
block from my aws.tf
This was really helpful and helped me figure things out, thank you for sharing!
Hullo - I've been using TG for a while with older TF versions, and this is my first outing with TG 0.13 and TF 0.10...
All my Terraform
.tf
files live in thetf
directory, withenvironments/dev
underneath that. I am working with a locked-down AWS account where I do not have access to create network resources - I need to import an existing VPC / subnets, etc. to the local state file.TG setup is like so:
I define the VPC simply in
aws.tf
:and then
terragrunt plan
, then very sensibly Terraform wants to create the VPC.Now I try to import the existing VPC:
I can see the VPC definition in
/tmp/terragrunt/acP5FOqj91Lz08E549B0dEiQ7u8/e_TPzidHXV2ZjUKk0SDVRwpJrm8/terraform.tfstate
The problem is then if I immediately do another
terragrunt plan
then it gets overwritten with the 'VPC not present' and once again Terraform wants to create a VPC.What am I doing wrong?