Skip to content

This TF module provision resources to connect BSG ECS services to AWS ALBs and manage BSG consul configs for internal and external routing.

Notifications You must be signed in to change notification settings

ION-Analytics/terraform-bsg-ecs-service-registration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-bsg-ecs-service-registration

This module provisions infrastructure resources connecting a ECS service created by the terraform-iona-ecs-service TF module to an AWS Application Load Balancer (ALB) managed by the BSG-Terraform-Internal-ECS-Routers, with optional Consul service registration. The Consul configuration is used for routing

Key Components

  • Route 53 DNS Record
  • ALB Listener Rule
  • ALB Target Group with Health Check
  • Consul Service Registration for BSG internal or external address routing (Optional) .

NOTE: The Consul registration and configs are used by BSG NGINX to set up the necessary ACL and LB configuration for internal and external networking. Migration to Ion's networking and routing patterns may be required in the future, but this is out of scope for the cdflow adoption initiative.

Providers

Name Version
aws.cluster_provider n/a
aws.dns n/a
consul.bsg_consul 2.15.0

Modules

No modules.

Resources

Name Type
aws_alb_listener_rule.rule resource
aws_alb_target_group.service_target_group resource
aws_route53_record.dns_record resource
consul_node.service_node resource
consul_service.service_node resource

Inputs

Name Description Type Default Required
bsg_consul_acl Which BSG consul acl to use (internal, external or officeaccess) string "internal" no
deregistration_delay Delay before deregistration string "30" no
ecs_cluster The name of the ecs_cluster. string n/a yes
external_url The external URL that should be routable to this service.

Ensure that this DNS entry is defined in the external DNS repository.

Note: Setting this value enables all related configurations,
but it does NOT allow external access to the services by itself.
To allow external access, you must also set the bsg_consul_acl variable.
string "" no
health_check_healthy_threshold The number of consecutive successful checks before considering the target healthy string "4" no
health_check_interval The interval between health checks string "10" no
health_check_matcher The HTTP status codes to consider a successful response string "200-299" no
health_check_path The path to use for health checks string "/" no
health_check_timeout The time to wait before marking a health check as failed string "5" no
health_check_unhealthy_threshold The number of consecutive failed checks before considering the target unhealthy string "4" no
platform_config Platform configuration map(string) {} no
service_name The name of the service. string n/a yes

Outputs

Name Description
service_target_group The ALB target group for the service

About

This TF module provision resources to connect BSG ECS services to AWS ALBs and manage BSG consul configs for internal and external routing.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages