Skip to content

pbs/terraform-aws-virtual-gateway-module

Repository files navigation

PBS TF Virtual Gateway Module

Installation

Using the Repo Source

Use this URL for the source of the module. See the usage examples below for more details.

github.com/pbs/terraform-aws-virtual-gateway-module?ref=0.0.39

Alternative Installation Methods

More information can be found on these install methods and more in the documentation here.

Usage

This modules provisions a basic virtual gateway for use in App Mesh. This is necessary to introduce ingress into a mesh.

Integrate this module like so:

module "vgw" {
  source = "github.com/pbs/terraform-aws-virtual-gateway-module?ref=0.0.39"

  # Required Parameters
  mesh_name = module.mesh.id

  # Tagging Parameters
  organization = var.organization
  environment  = var.environment
  product      = var.product
  repo         = var.repo

  # Optional Parameters
}

Adding This Version of the Module

If this repo is added as a subtree, then the version of the module should be close to the version shown here:

0.0.39

Note, however that subtrees can be altered as desired within repositories.

Further documentation on usage can be found here.

Below is automatically generated documentation on this Terraform module using terraform-docs


Requirements

Name Version
terraform >= 1.3.2
aws >= 4.5.0

Providers

Name Version
aws 5.24.0

Modules

Name Source Version
envoy_service github.com/pbs/terraform-aws-ecs-service-module 4.2.0

Resources

Name Type
aws_appmesh_virtual_gateway.gateway resource
aws_default_tags.common_tags data source
aws_subnets.private_subnets data source
aws_subnets.public_subnets data source
aws_vpc.vpc data source

Inputs

Name Description Type Default Required
environment Environment (sharedtools, dev, staging, qa, prod) string n/a yes
mesh_name The name for the App Mesh this service is associated with. string n/a yes
organization Organization using this module. Used to prefix tags so that they are easily identified as being from your organization string n/a yes
product Tag used to group resources according to product string n/a yes
repo Tag used to point to the repo using this module string n/a yes
aliases CNAME(s) that are allowed to be used for the envoy service. Default is product.primary_hosted_zone. e.g. [product.example.com] --> [example.com] list(string) null no
cluster ECS cluster for service string null no
cnames CNAME(s) that are going to be created for the envoy service in the primary_hosted_zone. This can be set to [] to avoid creating a CNAME for the app. This can be useful for CDNs. Default is product. e.g. [product] --> [product.example.com] list(string) null no
container_name Name of the containers running the envoy service for the virtual gateway string "envoy" no
container_port Port the envoy service will expose number 8080 no
listener_protocol The listener protocol for the virtual gateway string "http" no
load_balancer_type Type of load balancer to use for the envoy service string "network" no
max_capacity The maximum capacity of tasks for this service number 2 no
min_capacity The minimum capacity of tasks for this service number 1 no
name Name of the virtual gateway. Will default to product if not defined. string null no
primary_hosted_zone Name of the primary hosted zone for DNS. e.g. primary_hosted_zone = example.org --> service.example.org. If null, it is assumed that a private hosted zone will be used. string null no
private_hosted_zone Name of the private hosted zone for DNS. e.g. private_hosted_zone = example.org --> service.example.private. If null, it is assumed that a public hosted zone will be used. string null no
public_service Service should be provisioned in public subnet. Ignored if subnets defined. bool true no
subnets Subnets for the Virtual Gateway service. If null, private and public subnets will be looked up based on environment tag and one will be selected based on public_service. list(string) null no
tags Extra tags map(string) {} no
vpc_id VPC ID. If null, one will be looked up based on environment tag. string null no

Outputs

Name Description
arn ARN of the virtual gateway
domain_name Domain name of the service backing the virtual gateway
name Name of the virtual gateway
service_sg SG of the service backing the virtual gateway

About

Provisions a standard PBS App Mesh Virtual Gateway

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •