Skip to content

Commit

Permalink
Added missing VPC endpoints outputs (resolves #246) (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko authored Apr 25, 2019
1 parent 2870b5f commit 0bc8d6f
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ Terraform version 0.10.3 or newer is required for this module to work.
| vpc\_cidr\_block | The CIDR block of the VPC |
| vpc\_enable\_dns\_hostnames | Whether or not the VPC has DNS hostname support |
| vpc\_enable\_dns\_support | Whether or not the VPC has DNS support |
| vpc\_endpoint\_apigw\_dns\_entry | The DNS entries for the VPC Endpoint for APIGW. |
| vpc\_endpoint\_apigw\_id | The ID of VPC endpoint for APIGW |
| vpc\_endpoint\_apigw\_network\_interface\_ids | One or more network interfaces for the VPC Endpoint for APIGW. |
| vpc\_endpoint\_dynamodb\_id | The ID of VPC endpoint for DynamoDB |
| vpc\_endpoint\_dynamodb\_pl\_id | The prefix list for the DynamoDB VPC endpoint. |
| vpc\_endpoint\_ec2\_dns\_entry | The DNS entries for the VPC Endpoint for EC2. |
Expand All @@ -395,6 +398,12 @@ Terraform version 0.10.3 or newer is required for this module to work.
| vpc\_endpoint\_ec2messages\_dns\_entry | The DNS entries for the VPC Endpoint for EC2MESSAGES. |
| vpc\_endpoint\_ec2messages\_id | The ID of VPC endpoint for EC2MESSAGES |
| vpc\_endpoint\_ec2messages\_network\_interface\_ids | One or more network interfaces for the VPC Endpoint for EC2MESSAGES |
| vpc\_endpoint\_ecr\_api\_dns\_entry | The DNS entries for the VPC Endpoint for ECR API. |
| vpc\_endpoint\_ecr\_api\_id | The ID of VPC endpoint for ECR API |
| vpc\_endpoint\_ecr\_api\_network\_interface\_ids | One or more network interfaces for the VPC Endpoint for ECR API. |
| vpc\_endpoint\_ecr\_dkr\_dns\_entry | The DNS entries for the VPC Endpoint for ECR DKR. |
| vpc\_endpoint\_ecr\_dkr\_id | The ID of VPC endpoint for ECR DKR |
| vpc\_endpoint\_ecr\_dkr\_network\_interface\_ids | One or more network interfaces for the VPC Endpoint for ECR DKR. |
| vpc\_endpoint\_s3\_id | The ID of VPC endpoint for S3 |
| vpc\_endpoint\_s3\_pl\_id | The prefix list for the S3 VPC endpoint. |
| vpc\_endpoint\_ssm\_dns\_entry | The DNS entries for the VPC Endpoint for SSM. |
Expand Down
5 changes: 5 additions & 0 deletions examples/simple-vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ provider "aws" {
region = "eu-west-1"
}

data "aws_security_group" "default" {
name = "default"
vpc_id = "${module.vpc.vpc_id}"
}

module "vpc" {
source = "../../"

Expand Down
45 changes: 45 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,51 @@ output "vpc_endpoint_ec2messages_dns_entry" {
value = "${flatten(aws_vpc_endpoint.ec2messages.*.dns_entry)}"
}

output "vpc_endpoint_ecr_api_id" {
description = "The ID of VPC endpoint for ECR API"
value = "${element(concat(aws_vpc_endpoint.ecr_api.*.id, list("")), 0)}"
}

output "vpc_endpoint_ecr_api_network_interface_ids" {
description = "One or more network interfaces for the VPC Endpoint for ECR API."
value = "${flatten(aws_vpc_endpoint.ecr_api.*.network_interface_ids)}"
}

output "vpc_endpoint_ecr_api_dns_entry" {
description = "The DNS entries for the VPC Endpoint for ECR API."
value = "${flatten(aws_vpc_endpoint.ecr_api.*.dns_entry)}"
}

output "vpc_endpoint_ecr_dkr_id" {
description = "The ID of VPC endpoint for ECR DKR"
value = "${element(concat(aws_vpc_endpoint.ecr_dkr.*.id, list("")), 0)}"
}

output "vpc_endpoint_ecr_dkr_network_interface_ids" {
description = "One or more network interfaces for the VPC Endpoint for ECR DKR."
value = "${flatten(aws_vpc_endpoint.ecr_dkr.*.network_interface_ids)}"
}

output "vpc_endpoint_ecr_dkr_dns_entry" {
description = "The DNS entries for the VPC Endpoint for ECR DKR."
value = "${flatten(aws_vpc_endpoint.ecr_dkr.*.dns_entry)}"
}

output "vpc_endpoint_apigw_id" {
description = "The ID of VPC endpoint for APIGW"
value = "${element(concat(aws_vpc_endpoint.apigw.*.id, list("")), 0)}"
}

output "vpc_endpoint_apigw_network_interface_ids" {
description = "One or more network interfaces for the VPC Endpoint for APIGW."
value = "${flatten(aws_vpc_endpoint.apigw.*.network_interface_ids)}"
}

output "vpc_endpoint_apigw_dns_entry" {
description = "The DNS entries for the VPC Endpoint for APIGW."
value = "${flatten(aws_vpc_endpoint.apigw.*.dns_entry)}"
}

# Static values (arguments)
output "azs" {
description = "A list of availability zones specified as argument to this module"
Expand Down

0 comments on commit 0bc8d6f

Please sign in to comment.