Noob question:
I’ve built a module and am calling it from it from a root module, and it all works fine and builds my VPC.
Now that I’m trying to introduce outputs, I get an error:
davehill@daves-MacBook-Pro CloudEndureVPC % terraform plan
Error: Unsupported attribute
on output.tf line 5, in output “vpc_id”:
5: value = module.vpc.vpc_id
This object does not have an attribute named “vpc_id”.
Here is the block of code from my root output.tf:
output “vpc_id” {
description = “ID of project VPC”
value = module.vpc.vpc_id
}
And here from the child module output.tf:
output “vpc_id” {
description = “The ID of the VPC”
value = aws_vpc.vpc.id
}
I’m missing something obvious but can’t see anything in the documentation saying what that might be.