'Not a valid output for module' when using output variable with terraform
问题 I'm trying to setup some IaC for a new project using Hashicorp Terraform on AWS. I'm using modules because I want to be able to reuse stuff across multiple environments (staging, prod, dev, etc.) I'm struggling to understand where I have to set an output variable within a module, and how I then use that in another module. Any pointers to this would be greatly appreciated! I need to use some things created in my VPC module (subnet IDs) when creating EC2 machines. My understanding is that you