Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Terraform module is used by the ITGix AWS Landing Zone - https://itgix.com/itgix-landing-zone/

AWS VPC Endpoints Terraform Module

This module creates VPC interface and gateway endpoints with configurable security groups, subnet associations, and organization-scoped endpoint policies.

Part of the ITGix AWS Landing Zone.

Resources Created

  • VPC endpoints (interface and/or gateway)
  • (Optional) Security group for VPC endpoints
  • Endpoint policies scoped to AWS Organization

Requirements

Name Version
Terraform >= 1.0
AWS provider >= 5.20

Inputs

Name Description Type Default Required
create Determines whether resources will be created bool true no
vpc_id The ID of the VPC for the endpoints string null no
endpoints Map of endpoint properties and configurations any {} no
security_group_ids Default security group IDs for VPC endpoints list(string) [] no
subnet_ids Default subnet IDs for VPC endpoints list(string) [] no
tags A map of tags for all resources map(string) {} no
timeouts Timeout configurations for VPC endpoints map(string) {} no
organization_id The AWS Organization ID to allow access from string yes
create_security_group Whether to create a security group bool false no
security_group_name Name for the security group string null no
security_group_name_prefix Name prefix for the security group string null no
security_group_description Description of the security group string null no
security_group_rules Security group rules any {} no
security_group_tags Additional tags for the security group map(string) {} no

Outputs

Name Description
endpoints Full resource objects for all endpoints created
security_group_arn ARN of the security group
security_group_id ID of the security group

Usage Example

module "vpc_endpoints" {
  source = "path/to/tf-module-aws-vpc-endpoints"

  vpc_id          = "vpc-0abc1234def567890"
  organization_id = "o-abc123def4"

  endpoints = {
    s3 = {
      service      = "s3"
      service_type = "Gateway"
      route_table_ids = ["rtb-aaa111"]
    }
    ssm = {
      service             = "ssm"
      private_dns_enabled = true
    }
  }

  security_group_ids = ["sg-0abc1234"]
  subnet_ids         = ["subnet-aaa111", "subnet-bbb222"]

  tags = {
    Environment = "production"
    ManagedBy   = "terraform"
  }
}

Releases

Contributors

Languages