AWS Global Accelerator Listener
This page shows how to write Terraform and CloudFormation for Global Accelerator Listener and write them securely.
aws_globalaccelerator_listener (Terraform)
The Listener in Global Accelerator can be configured in Terraform with the resource name aws_globalaccelerator_listener
. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_globalaccelerator_listener" "https" {
accelerator_arn = aws_globalaccelerator_accelerator.example.id
protocol = "TCP"
port_range {
from_port = 443
resource "aws_globalaccelerator_listener" "http" {
accelerator_arn = aws_globalaccelerator_accelerator.this.id
client_affinity = "NONE"
protocol = "TCP"
port_range {
resource "aws_globalaccelerator_listener" "http" {
accelerator_arn = aws_globalaccelerator_accelerator.this.id
client_affinity = "NONE"
protocol = "TCP"
port_range {
resource "aws_globalaccelerator_listener" "default" {
accelerator_arn = aws_globalaccelerator_accelerator.default.id
protocol = "TCP"
port_range {
from_port = 80
to_port = 80
resource "aws_globalaccelerator_listener" "main_listener" {
accelerator_arn = aws_globalaccelerator_accelerator.main.id
client_affinity = "SOURCE_IP"
protocol = "TCP"
port_range {
Parameters
-
accelerator_arn
required - string -
client_affinity
optional - string -
id
optional computed - string -
protocol
required - string -
port_range
set block -
timeouts
single block
Explanation in Terraform Registry
Provides a Global Accelerator listener.
AWS::GlobalAccelerator::Listener (CloudFormation)
The Listener in GlobalAccelerator can be configured in CloudFormation with the resource name AWS::GlobalAccelerator::Listener
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
AcceleratorArn
required - String -
PortRanges
required - List of PortRange -
Protocol
required - String -
ClientAffinity
optional - String
Explanation in CloudFormation Registry
The
AWS::GlobalAccelerator::Listener
resource is a Global Accelerator resource type that contains information about how you create a listener to process inbound connections from clients to an accelerator. Connections arrive to assigned static IP addresses on a port, port range, or list of port ranges that you specify.
Frequently asked questions
What is AWS Global Accelerator Listener?
AWS Global Accelerator Listener is a resource for Global Accelerator of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Global Accelerator Listener?
For Terraform, the cpilsworth/apex-domain-redirect, almirosmanovic/aws-global-accelerator and rails-on-services/terraform-aws-globalaccelerator source code examples are useful. See the Terraform Example section for further details.