-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you extract the subnet-ids from the VPC module? #961
Comments
The module has outputs for this purpose. See https://github.com/terraform-aws-modules/terraform-aws-vpc#output_private_subnets and https://github.com/terraform-aws-modules/terraform-aws-vpc#output_private_subnets etc. etc. All the outputs are documented in the README file. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Is there a possibility to extract the subnet-ids from the module when it is being deployed?
For example: To create a Transit Gateway attachment to an existing Transit Gateway for example, as that resource needs subnet-ids to operate.
Versions
Module version [Required]: 5.0
Terraform version: 1.5.2 - darwin_amd64
Provider version(s): Installing hashicorp/aws v5.7.0...
Reproduction Code [Required]
`
module "vpc" {
source = "terraform-aws-modules/vpc/aws" #Source of the module
name = var.name
cidr = var.cidr
azs = var.azs
private_subnets = var.private_subnets
public_subnets = var.public_subnets
enable_nat_gateway = false #Disable the NAT GW
single_nat_gateway = false #NAT not HA
enable_vpn_gateway = false
enable_flow_log = true #Enable flow logs
flow_log_destination_type = "s3" # Set the destination
flow_log_destination_arn = resource.aws_s3_bucket.flow_logs.arn
enable_dns_hostnames = true
enable_dns_support = true
}
`
The text was updated successfully, but these errors were encountered: