Terraform 1.4.3: implementing Invalid Subnet IDs in AWS VPC Module Usage
I'm trying to debug I've tried everything I can think of but I'm working on a project and hit a roadblock. I'm currently working with an scenario when trying to use a VPC module in Terraform 1.4.3 where I'm getting an `InvalidSubnetID.NotFound` behavior during the plan phase. I have defined my VPC and subnets in a separate module, and I'm trying to reference them in another module, but it seems like the subnet IDs are not being recognized correctly. Hereβs a simplified version of my configuration: ```hcl module "vpc" { source = "terraform-aws-modules/vpc/aws" version = "4.0.0" name = "my-vpc" cidr = "10.0.0.0/16" azs = ["us-east-1a", "us-east-1b"] private_subnets = ["10.0.1.0/24", "10.0.2.0/24"] } module "app" { source = "./modules/app" subnet_ids = module.vpc.private_subnets } ``` In my `app` module, Iβm trying to utilize the `subnet_ids` output from the `vpc` module, but when I run `terraform plan`, I receive the following behavior: ``` behavior: InvalidSubnetID.NotFound: The subnet ID '10.0.1.0/24' does not exist ``` I've confirmed that the VPC and subnets are created successfully when I run the `vpc` module independently. I also tried referencing the subnet IDs directly like this: ```hcl subnet_ids = ["subnet-12345678", "subnet-87654321"] ``` However, that leads to the same behavior during the plan phase. I've checked my Terraform state and can confirm that the subnet IDs are being stored as expected. The providers are set up correctly, and I have regular AWS permissions. Could this be an scenario with the timing of resource creation? Should I consider adding dependencies or is there something else I might be overlooking? My development environment is Ubuntu. What's the best practice here? For reference, this is a production mobile app. Any pointers in the right direction? Any suggestions would be helpful.