Skip to content

Dynamically manage a Prefix list containing ip's of an ECS service tasks

License

Notifications You must be signed in to change notification settings

agendrix/ecs-service-prefix-list

Repository files navigation

ECS Service Prefix list

An AWS Lambda for automatically tracking ecs service task ip's in a Prefix list across regions

Release Tests

Description

Security groups cannot reference a security group from another region.(doc). The goal of this module is to create a managed AWS Prefix List that is automatically populated with the tasks ip adresses of an ECS service across region. Security groups from another region can reference this list to allow ingress traffic from a specific ECS service.

How to use with Terraform

requested providers

tracker: AWS provider that wants to track the ecs service in another region tracked: AWS provider of the ecs service being tracked

Add the module to your Terraform project:

module "terraform_aws_lambda" {
  source       = "github.com/agendrix/ecs-service-prefix-list.git//terraform?ref=v1.0.0"

  ecs_cluster_arn = aws_ecs_cluster.cluster.arn
  ecs_service = aws_ecs_service.service.name

  providers = {
    tracker = aws.ca-central-1
    tracked = aws.eu-west-3
  } 
}

About

Dynamically manage a Prefix list containing ip's of an ECS service tasks

Resources

License

Stars

Watchers

Forks

Packages

No packages published