Course2Week3Lab1

I am trying to figure out an error generated when running terrafornm plan for this lab.
For example we have the default variable
variable "vpc_id" { type = string description = "The id of the VPC to use" }

declared in variables.tf

but when I try to invoke terraform plan I get the following error:

│ Error: no matching EC2 VPC found │ │ with module.bastion_host.data.aws_vpc.main, │ on modules/bastion_host/network.tf line 1, in data "aws_vpc" "main": │ 1: data "aws_vpc" "main" { │ ╵

Hello @silviudr
I was able to reproduce the issue by not filling in the variables in terraform.tfvars file. Have you by any chance forgotten to replace the values in this file with the outputs from CloudFormation? If you have done so, please double check the values.
The raw file looks like this:
image
And the CloudFormation outputs you must replace the placeholders with are like this:

1 Like

Thank you @Amir_Zare This was the issue.