Skip to content

idelkysq/terraform-aws-vpc-endpoints

 
 

Repository files navigation

AWS VPC Endpoints Terraform module

Terraform module which creates VPC endpoint resources on AWS.

Usage

See examples directory for working examples to reference:

module "endpoints" {
  source  = "clowdhaus/vpc-endpoints/aws"

  vpc_id             = "vpc-12345678"
  security_group_ids = ["sg-12345678"]

  endpoints = {
    s3 = {
      service             = "s3"
      private_dns_enabled = true
      tags                = { Name = "s3-vpc-endpoint" }
    },
    dynamodb = {
      service         = "dynamodb"
      route_table_ids = ["rt-12322456", "rt-43433343", "rt-11223344"]
      tags            = { Name = "dynamodb-vpc-endpoint" }
    },
    sns = {
      service    = "sns"
      subnet_ids = ["subnet-12345678", "subnet-87654321"]
      tags       = { Name = "sns-vpc-endpoint" }
    },
    sqs = {
      service             = "sqs"
      private_dns_enabled = true
      security_group_ids  = ["sg-987654321"]
      subnet_ids          = ["subnet-12345678", "subnet-87654321"]
      tags                = { Name = "sqs-vpc-endpoint" }
    },
  }

  tags = {
    Owner       = "user"
    Environment = "dev"
  }
}

Examples

Examples codified under the examples are intended to give users references for how to use the module(s) as well as testing/validating changes to the source code of the module(s). If contributing to the project, please be sure to make any appropriate updates to the relevant examples to allow maintainers to test your changes and to keep the examples up to date for users. Thank you!

Requirements

Name Version
terraform >= 0.13.1
aws >= 3.0

Providers

Name Version
aws >= 3.0

Modules

No modules.

Resources

Name Type
aws_vpc_endpoint.this resource
aws_vpc_endpoint_service.this data source

Inputs

Name Description Type Default Required
endpoints A map of interface and/or gateway endpoints containing their properties and configurations any {} no
security_group_ids Default security group IDs to associate with the VPC endpoints list(string) [] no
subnet_ids Default subnets IDs to associate with the VPC endpoints list(string) [] no
tags A map of tags to use on all resources map(string) {} no
timeouts Define maximum timeout for creating, updating, and deleting VPC endpoint resources map(string) {} no
vpc_id The ID of the VPC in which the endpoint will be used string n/a yes

Outputs

Name Description
endpoints Array containing the full resource object and attributes for all endpoints created

License

Apache-2.0 Licensed. See LICENSE.

About

Terraform module which creates AWS VPC endpoint resources

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 100.0%