Troubleshooting a Terraform VPC build conflict
Journey: 📊 Community Builder 📊
Subject matter: 💡 Troubleshooting 💡
I have probably completed well over 100 Cloud Quest labs, which has given me a large amount of hands-on experience with many of the products and services AWS offers.
However, one thing that I never had to do was set up the environment from scratch.
With Cloud Quest, the labs are pre-configured and launched as a self-contained environment. Your goal is to use the course material to navigate around the service and then once you have configured the various areas via documented guidance, you have to fix or configure an area to successfully pass the lab quest.
I was very aware that I hadn’t built a VPC.
So I decided to do just that.
Task:
Build a VPC using IaC via Terraform.
I intended to do this from scratch using all the help I could find online!
I will document how I got on in a separate project build post here, but I thought I would document an issue that I needed to troubleshoot.
In my main.tf terraform file, vscode highlighted a problem that I initially had absolutely no idea how to fix.
This was the issue:
After some investigation, I found I could switch the variable:
- From: vpc = true
- To: domain = “vpc”
Once I had saved this, the terraform plan succeeded and I was able to apply and build my environment.