Commit 7c4ddd64 authored by Christian Kemper's avatar Christian Kemper

adding config vpc end point support

parent 0f3d57ff
<a name="unreleased"></a>
## [Unreleased]
- Updated CHANGELOG
- Added VPC endpoint for Secrets Manager,
- Added VPC endpoint for Secrets Manager, Config
<a name="v2.7.0"></a>
## [v2.7.0] - 2019-06-17
......
......@@ -368,6 +368,9 @@ Sometimes it is handy to have public access to Redshift clusters (for example if
| sns\_endpoint\_private\_dns\_enabled | Whether or not to associate a private hosted zone with the specified VPC for SNS endpoint | bool | `"false"` | no |
| sns\_endpoint\_security\_group\_ids | The ID of one or more security groups to associate with the network interface for SNS endpoint | list(string) | `[]` | no |
| sns\_endpoint\_subnet\_ids | The ID of one or more subnets in which to create a network interface for SNS endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used. | list(string) | `[]` | no |
| config\_endpoint\_private\_dns\_enabled | Whether or not to associate a private hosted zone with the specified VPC for Config endpoint | string | `"false"` | no |
| config\_endpoint\_security\_group\_ids | The ID of one or more security groups to associate with the network interface for Config endpoint | list | `[]` | no |
| config\_endpoint\_subnet\_ids | The ID of one or more subnets in which to create a network interface for Config endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used. | list | `[]` | no |
| sqs\_endpoint\_private\_dns\_enabled | Whether or not to associate a private hosted zone with the specified VPC for SQS endpoint | string | `"false"` | no |
| sqs\_endpoint\_security\_group\_ids | The ID of one or more security groups to associate with the network interface for SQS endpoint | list | `[]` | no |
| sqs\_endpoint\_subnet\_ids | The ID of one or more subnets in which to create a network interface for SQS endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used. | list | `[]` | no |
......
......@@ -899,6 +899,27 @@ resource "aws_vpc_endpoint_route_table_association" "public_dynamodb" {
}
##########################
# VPC Endpoint for Config
##########################
data "aws_vpc_endpoint_service" "config" {
count = var.create_vpc && var.enable_config_endpoint ? 1 : 0
service = "config"
}
resource "aws_vpc_endpoint" "config" {
count = var.create_vpc && var.enable_config_endpoint ? 1 : 0
vpc_id = local.vpc_id
service_name = data.aws_vpc_endpoint_service.config[0].service_name
vpc_endpoint_type = "Interface"
security_group_ids = var.config_endpoint_security_group_ids
subnet_ids = coalescelist(var.config_endpoint_subnet_ids, aws_subnet.private.*.id)
private_dns_enabled = var.config_endpoint_private_dns_enabled
}
#######################
# VPC Endpoint for SQS
#######################
......
......@@ -218,6 +218,26 @@ variable "enable_s3_endpoint" {
default = false
}
variable "enable_config_endpoint" {
description = "Should be true if you want to provision an config endpoint to the VPC"
default = false
}
variable "config_endpoint_security_group_ids" {
description = "The ID of one or more security groups to associate with the network interface for config endpoint"
default = []
}
variable "config_endpoint_subnet_ids" {
description = "The ID of one or more subnets in which to create a network interface for config endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used."
default = []
}
variable "config_endpoint_private_dns_enabled" {
description = "Whether or not to associate a private hosted zone with the specified VPC for config endpoint"
default = false
}
variable "enable_sqs_endpoint" {
description = "Should be true if you want to provision an SQS endpoint to the VPC"
default = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment