From 0bc8d6f4bbd923d08b66deb19bc80b50079f3950 Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Thu, 25 Apr 2019 20:32:09 +0200 Subject: [PATCH] Added missing VPC endpoints outputs (resolves #246) (#247) --- README.md | 9 ++++++++ examples/simple-vpc/main.tf | 5 +++++ outputs.tf | 45 +++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/README.md b/README.md index 1f1663a7c..bc130db59 100644 --- a/README.md +++ b/README.md @@ -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. | @@ -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. | diff --git a/examples/simple-vpc/main.tf b/examples/simple-vpc/main.tf index a715edad3..decd0b0c5 100644 --- a/examples/simple-vpc/main.tf +++ b/examples/simple-vpc/main.tf @@ -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 = "../../" diff --git a/outputs.tf b/outputs.tf index d885ce35e..48b91376f 100644 --- a/outputs.tf +++ b/outputs.tf @@ -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"