Resource: aws_globalaccelerator_custom_routing_listener

Provides a Global Accelerator custom routing listener.

Example Usage

resource "aws_globalaccelerator_custom_routing_accelerator" "example" {
  name            = "Example"
  ip_address_type = "IPV4"
  enabled         = true

  attributes {
    flow_logs_enabled   = true
    flow_logs_s3_bucket = "example-bucket"
    flow_logs_s3_prefix = "flow-logs/"
  }
}

resource "aws_globalaccelerator_custom_routing_listener" "example" {
  accelerator_arn = aws_globalaccelerator_custom_routing_accelerator.example.id

  port_range {
    from_port = 80
    to_port   = 80
  }
}

Argument Reference

This resource supports the following arguments:

port_range supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import Global Accelerator custom routing listeners using the id. For example:

import {
  to = aws_globalaccelerator_custom_routing_listener.example
  id = "arn:aws:globalaccelerator::111111111111:accelerator/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/listener/xxxxxxxx"
}

Using terraform import, import Global Accelerator custom routing listeners using the id. For example:

% terraform import aws_globalaccelerator_custom_routing_listener.example arn:aws:globalaccelerator::111111111111:accelerator/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/listener/xxxxxxxx