Terraform module to create Global Accelerator resource on AWS.
We eat, drink, sleep and most importantly love DevOps. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy Bigger problems are always solved by breaking them into smaller manageable problems. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller connected yet manageable pieces within the infrastructure.
This module is basically combination of Terraform open source and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
We have fifty plus terraform modules. A few of them are comepleted and are available for open source usage while a few others are in progress.
This module has a few dependencies:
- Terraform 1.x.x
- Go
- github.com/stretchr/testify/assert
- github.com/gruntwork-io/terratest/modules/terraform
IMPORTANT: Since the master
branch used in source
varies based on new modifications, we suggest that you use the release versions here.
Here is an example of how you can use this module in your inventory structure:
module "global_accelerator" {
source = "clouddrove/global-accelerator/aws"
version = "1.0.0"
name = "example"
environment = "test"
label_order = ["name", "environment"]
flow_logs_enabled = true
flow_logs_s3_bucket = module.s3_bucket.id
flow_logs_s3_prefix = "example"
listeners = {
listener_1 = {
client_affinity = "SOURCE_IP"
endpoint_group = {
endpoint_group_region = "us-west-2"
multiple_endpoint_group_region = "eu-west-1"
health_check_port = 80
health_check_protocol = "HTTP"
health_check_path = "/"
health_check_interval_seconds = 10
health_check_timeout_seconds = 5
healthy_threshold_count = 2
unhealthy_threshold_count = 2
traffic_dial_percentage = 100
endpoint_configuration = [
{
client_ip_preservation_enabled = true
endpoint_id = "arn:aws:elasticloadbalancing:us-west-2:924144197303:loadbalancer/app/alb-test/3ed98b63e2bb9c2a"
weight = 50
}
],
multiple_endpoint_configuration = [
{
client_ip_preservation_enabled = true
endpoint_id = "arn:aws:elasticloadbalancing:eu-west-1:924144197303:loadbalancer/app/alb-test/6b02ebcf5e0396d3"
weight = 50
}
]
}
port_ranges = [
{
from_port = 80
to_port = 80
}
]
protocol = "TCP"
}
}
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
enabled | Indicates that the accelerator is enabled. Valid values: true , false |
bool |
true |
no |
environment | Environment (e.g. prod , dev , staging ). |
string |
"" |
no |
flow_logs_enabled | Indicates that flow logs are enabled. Valid values: true , false |
bool |
false |
no |
flow_logs_s3_bucket | Flow logs S3 bucket name. Required if flow_logs_enabled is true |
string |
null |
no |
flow_logs_s3_prefix | The prefix for the location where Amazon S3 bucket will store the flow logs. Required if flow_logs_enabled is true |
string |
null |
no |
ip_address_type | Type of IP address | string |
"IPV4" |
no |
label_order | Label order, e.g. name ,application . |
list(any) |
[] |
no |
listeners | Mapping of listener that defintions to create | any |
n/a | yes |
listeners_enabled | Controls if listeners should be created This will affects to only for listeners | bool |
true |
no |
managedby | ManagedBy, eg 'CloudDrove' | string |
"[email protected]" |
no |
name | Name (e.g. app or cluster ). |
string |
"" |
no |
repository | Terraform current module repo | string |
"https://github.com/clouddrove/terraform-aws-globle-accelerator" |
no |
resources_enabled | Controls if resources should be created. This will affects to all the resources | bool |
true |
no |
Name | Description |
---|---|
dns_name | DNS name of the accelerator |
endpoint_groups | Map of endpoints created and their specified attributes |
id | The ARN of the accelerator |
listeners | Map of listeners created and their specified attributes |
In this module testing is performed with terratest and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a GO environment in your system.
You need to run the following command in the testing folder:
go test -run Test
If you come accross a bug or have any feedback, please log it in our issue tracker, or feel free to drop us an email at [email protected].
If you have found it worth your time, go ahead and give us a ★ on our GitHub!
At CloudDrove, we offer expert guidance, implementation support and services to help organisations accelerate their journey to the cloud. Our services include docker and container orchestration, cloud migration and adoption, infrastructure automation, application modernisation and remediation, and performance engineering.
We are The Cloud Experts!
We ❤️ Open Source and you can check out our other modules to get help with your new Cloud ideas.