Skip to content
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

feat: add arn outputs for: igw, cgw, vgw, default vpc, acls #471

Merged
merged 8 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Sponsored by [Cloudcraft - the best way to draw AWS diagrams](https://cloudcraft

## Terraform versions

Terraform 0.12. Pin module version to `~> v2.0`. Submit pull-requests to `master` branch.
Terraform 0.12 and newer. Pin module version to `~> v2.0`. Submit pull-requests to `master` branch.

Terraform 0.11. Pin module version to `~> v1.0`. Submit pull-requests to `terraform011` branch.

Expand Down Expand Up @@ -225,13 +225,13 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| Name | Version |
|------|---------|
| terraform | >= 0.12.7, < 0.14 |
| aws | >= 2.57, < 4.0 |
| aws | >= 2.68, < 4.0 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 2.57, < 4.0 |
| aws | >= 2.68, < 4.0 |

## Inputs

Expand Down Expand Up @@ -618,10 +618,12 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| Name | Description |
|------|-------------|
| azs | A list of availability zones specified as argument to this module |
| cgw\_arns | List of ARNs of Customer Gateway |
| cgw\_ids | List of IDs of Customer Gateway |
| database\_internet\_gateway\_route\_id | ID of the database internet gateway route. |
| database\_ipv6\_egress\_route\_id | ID of the database IPv6 egress route. |
| database\_nat\_gateway\_route\_ids | List of IDs of the database nat gateway route. |
| database\_network\_acl\_arn | ARN of the database network ACL |
| database\_network\_acl\_id | ID of the database network ACL |
| database\_route\_table\_association\_ids | List of IDs of the database route table association |
| database\_route\_table\_ids | List of IDs of database route tables |
Expand All @@ -633,6 +635,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| default\_network\_acl\_id | The ID of the default network ACL |
| default\_route\_table\_id | The ID of the default route table |
| default\_security\_group\_id | The ID of the security group created by default on VPC creation |
| default\_vpc\_arn | The ARN of the VPC |
| default\_vpc\_cidr\_block | The CIDR block of the VPC |
| default\_vpc\_default\_network\_acl\_id | The ID of the default network ACL |
| default\_vpc\_default\_route\_table\_id | The ID of the default route table |
Expand All @@ -643,6 +646,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| default\_vpc\_instance\_tenancy | Tenancy of instances spin up within VPC |
| default\_vpc\_main\_route\_table\_id | The ID of the main route table associated with this VPC |
| egress\_only\_internet\_gateway\_id | The ID of the egress only Internet Gateway |
| elasticache\_network\_acl\_arn | ARN of the elasticache network ACL |
| elasticache\_network\_acl\_id | ID of the elasticache network ACL |
| elasticache\_route\_table\_association\_ids | List of IDs of the elasticache route table association |
| elasticache\_route\_table\_ids | List of IDs of elasticache route tables |
Expand All @@ -652,7 +656,9 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| elasticache\_subnets | List of IDs of elasticache subnets |
| elasticache\_subnets\_cidr\_blocks | List of cidr\_blocks of elasticache subnets |
| elasticache\_subnets\_ipv6\_cidr\_blocks | List of IPv6 cidr\_blocks of elasticache subnets in an IPv6 enabled VPC |
| igw\_arn | The ARN of the Internet Gateway |
| igw\_id | The ID of the Internet Gateway |
| intra\_network\_acl\_arn | ARN of the intra network ACL |
| intra\_network\_acl\_id | ID of the intra network ACL |
| intra\_route\_table\_association\_ids | List of IDs of the intra route table association |
| intra\_route\_table\_ids | List of IDs of intra route tables |
Expand All @@ -666,6 +672,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| natgw\_ids | List of NAT Gateway IDs |
| private\_ipv6\_egress\_route\_ids | List of IDs of the ipv6 egress route. |
| private\_nat\_gateway\_route\_ids | List of IDs of the private nat gateway route. |
| private\_network\_acl\_arn | ARN of the private network ACL |
| private\_network\_acl\_id | ID of the private network ACL |
| private\_route\_table\_association\_ids | List of IDs of the private route table association |
| private\_route\_table\_ids | List of IDs of private route tables |
Expand All @@ -675,13 +682,15 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| private\_subnets\_ipv6\_cidr\_blocks | List of IPv6 cidr\_blocks of private subnets in an IPv6 enabled VPC |
| public\_internet\_gateway\_ipv6\_route\_id | ID of the IPv6 internet gateway route. |
| public\_internet\_gateway\_route\_id | ID of the internet gateway route. |
| public\_network\_acl\_arn | ARN of the public network ACL |
| public\_network\_acl\_id | ID of the public network ACL |
| public\_route\_table\_association\_ids | List of IDs of the public route table association |
| public\_route\_table\_ids | List of IDs of public route tables |
| public\_subnet\_arns | List of ARNs of public subnets |
| public\_subnets | List of IDs of public subnets |
| public\_subnets\_cidr\_blocks | List of cidr\_blocks of public subnets |
| public\_subnets\_ipv6\_cidr\_blocks | List of IPv6 cidr\_blocks of public subnets in an IPv6 enabled VPC |
| redshift\_network\_acl\_arn | ARN of the redshift network ACL |
| redshift\_network\_acl\_id | ID of the redshift network ACL |
| redshift\_public\_route\_table\_association\_ids | List of IDs of the public redshidt route table association |
| redshift\_route\_table\_association\_ids | List of IDs of the redshift route table association |
Expand All @@ -692,6 +701,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| redshift\_subnets\_cidr\_blocks | List of cidr\_blocks of redshift subnets |
| redshift\_subnets\_ipv6\_cidr\_blocks | List of IPv6 cidr\_blocks of redshift subnets in an IPv6 enabled VPC |
| this\_customer\_gateway | Map of Customer Gateway attributes |
| vgw\_arn | The ARN of the VPN Gateway |
| vgw\_id | The ID of the VPN Gateway |
| vpc\_arn | The ARN of the VPC |
| vpc\_cidr\_block | The CIDR block of the VPC |
Expand Down
3 changes: 3 additions & 0 deletions examples/network-acls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ No input.
| Name | Description |
|------|-------------|
| default\_network\_acl\_id | The ID of the default network ACL |
| elasticache\_network\_acl\_arn | ARN of the elasticache network ACL |
| elasticache\_network\_acl\_id | ID of the elasticache network ACL |
| module\_vpc | Module VPC |
| nat\_public\_ips | List of public Elastic IPs created for AWS NAT Gateway |
| private\_network\_acl\_arn | ARN of the private network ACL |
| private\_network\_acl\_id | ID of the private network ACL |
| private\_subnets | List of IDs of private subnets |
| public\_network\_acl\_arn | ARN of the public network ACL |
| public\_network\_acl\_id | ID of the public network ACL |
| public\_subnets | List of IDs of public subnets |
| vpc\_cidr\_block | The CIDR block of the VPC |
Expand Down
15 changes: 15 additions & 0 deletions examples/network-acls/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ output "default_network_acl_id" {
value = module.vpc.default_network_acl_id
}

output "public_network_acl_arn" {
description = "ARN of the public network ACL"
value = module.vpc.public_network_acl_arn
}

output "private_network_acl_arn" {
description = "ARN of the private network ACL"
value = module.vpc.private_network_acl_arn
}

output "elasticache_network_acl_arn" {
description = "ARN of the elasticache network ACL"
value = module.vpc.elasticache_network_acl_arn
}

output "module_vpc" {
description = "Module VPC"
value = module.vpc
Expand Down
50 changes: 50 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ output "igw_id" {
value = concat(aws_internet_gateway.this.*.id, [""])[0]
}

output "igw_arn" {
description = "The ARN of the Internet Gateway"
value = concat(aws_internet_gateway.this.*.arn, [""])[0]
}

output "egress_only_internet_gateway_id" {
description = "The ID of the egress only Internet Gateway"
value = concat(aws_egress_only_internet_gateway.this.*.id, [""])[0]
Expand All @@ -343,6 +348,11 @@ output "cgw_ids" {
value = [for k, v in aws_customer_gateway.this : v.id]
}

output "cgw_arns" {
description = "List of ARNs of Customer Gateway"
value = [for k, v in aws_customer_gateway.this : v.arn]
}

output "this_customer_gateway" {
description = "Map of Customer Gateway attributes"
value = aws_customer_gateway.this
Expand All @@ -357,11 +367,21 @@ output "vgw_id" {
)[0]
}

output "vgw_arn" {
description = "The ARN of the VPN Gateway"
value = concat(aws_vpn_gateway.this.*.arn, [""])[0]
}

output "default_vpc_id" {
description = "The ID of the VPC"
value = concat(aws_default_vpc.this.*.id, [""])[0]
}

output "default_vpc_arn" {
description = "The ARN of the VPC"
value = concat(aws_default_vpc.this.*.arn, [""])[0]
}

output "default_vpc_cidr_block" {
description = "The CIDR block of the VPC"
value = concat(aws_default_vpc.this.*.cidr_block, [""])[0]
Expand Down Expand Up @@ -422,31 +442,61 @@ output "public_network_acl_id" {
value = concat(aws_network_acl.public.*.id, [""])[0]
}

output "public_network_acl_arn" {
description = "ARN of the public network ACL"
value = concat(aws_network_acl.public.*.arn, [""])[0]
}

output "private_network_acl_id" {
description = "ID of the private network ACL"
value = concat(aws_network_acl.private.*.id, [""])[0]
}

output "private_network_acl_arn" {
description = "ARN of the private network ACL"
value = concat(aws_network_acl.private.*.arn, [""])[0]
}

output "intra_network_acl_id" {
description = "ID of the intra network ACL"
value = concat(aws_network_acl.intra.*.id, [""])[0]
}

output "intra_network_acl_arn" {
description = "ARN of the intra network ACL"
value = concat(aws_network_acl.intra.*.arn, [""])[0]
}

output "database_network_acl_id" {
description = "ID of the database network ACL"
value = concat(aws_network_acl.database.*.id, [""])[0]
}

output "database_network_acl_arn" {
description = "ARN of the database network ACL"
value = concat(aws_network_acl.database.*.arn, [""])[0]
}

output "redshift_network_acl_id" {
description = "ID of the redshift network ACL"
value = concat(aws_network_acl.redshift.*.id, [""])[0]
}

output "redshift_network_acl_arn" {
description = "ARN of the redshift network ACL"
value = concat(aws_network_acl.redshift.*.arn, [""])[0]
}

output "elasticache_network_acl_id" {
description = "ID of the elasticache network ACL"
value = concat(aws_network_acl.elasticache.*.id, [""])[0]
}

output "elasticache_network_acl_arn" {
description = "ARN of the elasticache network ACL"
value = concat(aws_network_acl.elasticache.*.arn, [""])[0]
}

# VPC Endpoints
output "vpc_endpoint_s3_id" {
description = "The ID of VPC endpoint for S3"
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ terraform {
required_version = ">= 0.12.7, < 0.14"

required_providers {
aws = ">= 2.57, < 4.0"
aws = ">= 2.68, < 4.0"
}
}