Quantcast
Viewing all articles
Browse latest Browse all 3

How to get VPC id in Terraform module?

I have a module structure like

module "vpc" {source = "./modules/vpc"}module "prod_subnets" {source = "./modules/vpc/modules/subnets/production"}

when running am getting an error like

[0m on modules/vpc/modules/subnets/production/production.tf line     162, in resource "aws_subnet""prod-pub-1b":    14:22:55 162: vpc_id = [4maws_vpc.production_vpc[0m.id    14:22:55 [0m    14:22:55 A managed resource "aws_vpc""production_vpc" has not been declared in    14:22:55 prod_subnets.

can anyone please help ?


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>