Not certain where I am going wrong, but setting this up in vpc.tf works fine. But migrating to terragrunt doesn’t work. Just wanting to understand why below cannot be setup the way it is.
terragrunt = {
include {
path = "${find_in_parent_folders()}"
}
terraform = {
source = "github.com/terraform-aws-modules/terraform-aws-vpc"
version = "1.17.0"
}
}
name = "dev-vpc"
cidr = "10.10.0.0/16"
azs = ["us-east-1b", "us-east-1c", "us-east-1d"]
private_subnets = ["10.10.0.0/20", "10.10.32.0/20", "10.10.64.0/20"]
public_subnets = ["10.10.16.0/20", "10.10.48.0/20", "10.10.80.0/20"]
database_subnets = ["10.10.200.0/24", "10.10.201.0/24", "10.10.202.0/24"]
create_database_subnet_group = false
enable_nat_gateway = true
enable_vpn_gateway = false
enable_s3_endpoint = false
enable_dynamodb_endpoint = false
enable_dhcp_options = true
tags = {
Owner = "user"
Environment = "dev"
Name = "complete"
}
Running terragrunt plan
results in:
Initializing modules...
- module.vpc
Found version 1.17.0 of terraform-aws-modules/vpc/aws on registry.terraform.io
Getting source "terraform-aws-modules/vpc/aws"
Initializing the backend...
Error: output 'natgw_ids': unknown resource 'aws_nat_gateway.this' referenced in variable aws_nat_gateway.this.*.id
Error: output 'elasticache_subnet_group': unknown resource 'aws_elasticache_subnet_group.elasticache' referenced in variable aws_elasticache_subnet_group.elasticache.*.id
Error: output 'igw_id': unknown resource 'aws_internet_gateway.this' referenced in variable aws_internet_gateway.this.*.id
...