ecs_terraform_workshop
ecs_terraform_workshop copied to clipboard
Error: Unsupported Terraform Core version
Hello,
So I cloned the directory and when I ran terraform init, I was given this error? Its located in the .terraform dir so I deleted it as it is only a temp folder when you run terraform init/plan/apply. But it seems to be an issue with something else, as when i ran terraform init again it reappeared with the same bug.
`Error: Unsupported Terraform Core version
on .terraform/modules/vpc/versions.tf line 2, in terraform: 2: required_version = "~> 0.12.6"`
In main.tf there is also an outdated version being used for AWS.
To recreate this error.
git clone https://github.com/mashun4ek/ecs_terraform_workshop.git
cd ecs_terraform_workshop
terraform init
So I resolved this issue by doing a few things
-
The versions were all out of date as they were hardcoded from 6 months ago. This was causing issues as they are no longer the latest versions, and aren't supported anymore
- They can be found in main.tf, and vpc.tf
- Just delete the versions and terraform will assume you want the latest. I think thats what I did, otherwise, just change them to the latest for now.
-
Secondly, the S3 bucket is hardcoded to g/mashun4ek's personal one she used for the demonstration. This will not work and you will end up just like me in 20 minutes ago (can see the error above).
- You need to run the following command to create your own S3 bucket and then change the main.tf bucket value to your own name:
-
aws s3api create-bucket --bucket=<enter your bucket name here> --region=<enter your region here>
I understand that this was a walk through video but still, the readme needs to be more comprehensive if you are posting this on a public repo.
Doesn't look like this is being maintained, but if anyone else is in trouble message me and ill help you.
Hi @TwentyVentti! Thank you so much for opening the issue and providing the solution, I'm going to update the repo this weekend. Thanks again! :)
Masha, thank you for this project!