Creates an AWS Global Accelerator with a listener that has TCP protocol and source IP client affinity on port 80.

Terraform Template

resource "aws_globalaccelerator_accelerator" "example" {

  attributes {
    flow_logs_enabled = true
    flow_logs_s3_bucket = "example-bucket"
    flow_logs_s3_prefix = "flow-logs/"
  }
  enabled = true
  ip_address_type = "IPV4"
  name = "Example"
}

resource "aws_globalaccelerator_listener" "example" {
  accelerator_arn = aws_globalaccelerator_accelerator.example.id
  client_affinity = "SOURCE_IP"

  port_range {
    from_port = 80
    to_port = 80
  }
  protocol = "TCP"
}