Skip to content

Commit 0bc8d6f

Browse files
authored
Added missing VPC endpoints outputs (resolves #246) (#247)
1 parent 2870b5f commit 0bc8d6f

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ Terraform version 0.10.3 or newer is required for this module to work.
387387
| vpc\_cidr\_block | The CIDR block of the VPC |
388388
| vpc\_enable\_dns\_hostnames | Whether or not the VPC has DNS hostname support |
389389
| vpc\_enable\_dns\_support | Whether or not the VPC has DNS support |
390+
| vpc\_endpoint\_apigw\_dns\_entry | The DNS entries for the VPC Endpoint for APIGW. |
391+
| vpc\_endpoint\_apigw\_id | The ID of VPC endpoint for APIGW |
392+
| vpc\_endpoint\_apigw\_network\_interface\_ids | One or more network interfaces for the VPC Endpoint for APIGW. |
390393
| vpc\_endpoint\_dynamodb\_id | The ID of VPC endpoint for DynamoDB |
391394
| vpc\_endpoint\_dynamodb\_pl\_id | The prefix list for the DynamoDB VPC endpoint. |
392395
| 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.
395398
| vpc\_endpoint\_ec2messages\_dns\_entry | The DNS entries for the VPC Endpoint for EC2MESSAGES. |
396399
| vpc\_endpoint\_ec2messages\_id | The ID of VPC endpoint for EC2MESSAGES |
397400
| vpc\_endpoint\_ec2messages\_network\_interface\_ids | One or more network interfaces for the VPC Endpoint for EC2MESSAGES |
401+
| vpc\_endpoint\_ecr\_api\_dns\_entry | The DNS entries for the VPC Endpoint for ECR API. |
402+
| vpc\_endpoint\_ecr\_api\_id | The ID of VPC endpoint for ECR API |
403+
| vpc\_endpoint\_ecr\_api\_network\_interface\_ids | One or more network interfaces for the VPC Endpoint for ECR API. |
404+
| vpc\_endpoint\_ecr\_dkr\_dns\_entry | The DNS entries for the VPC Endpoint for ECR DKR. |
405+
| vpc\_endpoint\_ecr\_dkr\_id | The ID of VPC endpoint for ECR DKR |
406+
| vpc\_endpoint\_ecr\_dkr\_network\_interface\_ids | One or more network interfaces for the VPC Endpoint for ECR DKR. |
398407
| vpc\_endpoint\_s3\_id | The ID of VPC endpoint for S3 |
399408
| vpc\_endpoint\_s3\_pl\_id | The prefix list for the S3 VPC endpoint. |
400409
| vpc\_endpoint\_ssm\_dns\_entry | The DNS entries for the VPC Endpoint for SSM. |

examples/simple-vpc/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ provider "aws" {
22
region = "eu-west-1"
33
}
44

5+
data "aws_security_group" "default" {
6+
name = "default"
7+
vpc_id = "${module.vpc.vpc_id}"
8+
}
9+
510
module "vpc" {
611
source = "../../"
712

outputs.tf

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,51 @@ output "vpc_endpoint_ec2messages_dns_entry" {
369369
value = "${flatten(aws_vpc_endpoint.ec2messages.*.dns_entry)}"
370370
}
371371

372+
output "vpc_endpoint_ecr_api_id" {
373+
description = "The ID of VPC endpoint for ECR API"
374+
value = "${element(concat(aws_vpc_endpoint.ecr_api.*.id, list("")), 0)}"
375+
}
376+
377+
output "vpc_endpoint_ecr_api_network_interface_ids" {
378+
description = "One or more network interfaces for the VPC Endpoint for ECR API."
379+
value = "${flatten(aws_vpc_endpoint.ecr_api.*.network_interface_ids)}"
380+
}
381+
382+
output "vpc_endpoint_ecr_api_dns_entry" {
383+
description = "The DNS entries for the VPC Endpoint for ECR API."
384+
value = "${flatten(aws_vpc_endpoint.ecr_api.*.dns_entry)}"
385+
}
386+
387+
output "vpc_endpoint_ecr_dkr_id" {
388+
description = "The ID of VPC endpoint for ECR DKR"
389+
value = "${element(concat(aws_vpc_endpoint.ecr_dkr.*.id, list("")), 0)}"
390+
}
391+
392+
output "vpc_endpoint_ecr_dkr_network_interface_ids" {
393+
description = "One or more network interfaces for the VPC Endpoint for ECR DKR."
394+
value = "${flatten(aws_vpc_endpoint.ecr_dkr.*.network_interface_ids)}"
395+
}
396+
397+
output "vpc_endpoint_ecr_dkr_dns_entry" {
398+
description = "The DNS entries for the VPC Endpoint for ECR DKR."
399+
value = "${flatten(aws_vpc_endpoint.ecr_dkr.*.dns_entry)}"
400+
}
401+
402+
output "vpc_endpoint_apigw_id" {
403+
description = "The ID of VPC endpoint for APIGW"
404+
value = "${element(concat(aws_vpc_endpoint.apigw.*.id, list("")), 0)}"
405+
}
406+
407+
output "vpc_endpoint_apigw_network_interface_ids" {
408+
description = "One or more network interfaces for the VPC Endpoint for APIGW."
409+
value = "${flatten(aws_vpc_endpoint.apigw.*.network_interface_ids)}"
410+
}
411+
412+
output "vpc_endpoint_apigw_dns_entry" {
413+
description = "The DNS entries for the VPC Endpoint for APIGW."
414+
value = "${flatten(aws_vpc_endpoint.apigw.*.dns_entry)}"
415+
}
416+
372417
# Static values (arguments)
373418
output "azs" {
374419
description = "A list of availability zones specified as argument to this module"

0 commit comments

Comments
 (0)