AWS Global Accelerator Accelerator

This page shows how to write Terraform and CloudFormation for Global Accelerator Accelerator and write them securely.

aws_globalaccelerator_accelerator (Terraform)

The Accelerator in Global Accelerator can be configured in Terraform with the resource name aws_globalaccelerator_accelerator. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

test_global_accelerator.tf#L2
resource "aws_globalaccelerator_accelerator" "noncompliant_missing1" {
  #      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}

resource "aws_globalaccelerator_accelerator" "noncompliant_missing2" {
  attributes {  # Noncompliant {{Make sure that disabling logging is safe here.}}
aws_global_accelerator_logs.tf#L1
resource "aws_globalaccelerator_accelerator" "allowed" {
  attributes {
    flow_logs_enabled = true
  }
}

globalaccelerator.tf#L1
resource "aws_globalaccelerator_accelerator" "default" {
  name = "tf-global-accelerator-sandbox"

  ip_address_type = "IPV4"
}

accelerator.tf#L1
resource "aws_globalaccelerator_accelerator" "example" {
  name            = "apex-domain-redirect"
  ip_address_type = "IPV4"
  enabled         = true
}

global_accelerator.tf#L1
resource "aws_globalaccelerator_accelerator" "shortner" {
  name            = "shortner"
  ip_address_type = "IPV4"
  enabled         = true

}

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Creates a Global Accelerator accelerator.

AWS::GlobalAccelerator::Accelerator (CloudFormation)

The Accelerator in GlobalAccelerator can be configured in CloudFormation with the resource name AWS::GlobalAccelerator::Accelerator. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

us-east-1-ec2-ga.yml#L52
    Type: AWS::GlobalAccelerator::Accelerator
    Properties:
      Name: !Sub ${AWS::StackName}-Accelerator
  HttpListener:
    Type: AWS::GlobalAccelerator::Listener
    Properties:
gbacc.serverless.yml#L3
    Type: AWS::GlobalAccelerator::Accelerator
    Properties:
      Name: GlobalAccelerator
      IpAddressType: IPV4
      Enabled: true
  MyListener:
accelerator.template.yml#L22
    Type: AWS::GlobalAccelerator::Accelerator
    Properties:
      Name: !Ref AcceleratorName

  AcceleratorListener:
    Type: AWS::GlobalAccelerator::Listener
e09.yml#L18
    Type: AWS::GlobalAccelerator::Accelerator
    Properties:
      Enabled: true
      Name: !Sub
        - 'hello-accelerator-${UniqueSuffix}'
        - UniqueSuffix: !FindInMap [ Application, Settings, UniqueSuffix ]
stack--global-accelerator.yml#L175
    Type: AWS::GlobalAccelerator::Accelerator
    Properties:
      Name:
        Fn::Join:
          - '-'
          - - 'accelerator--relay--'
accelerator_single_endpointgroup.json#L49
      "Type": "AWS::GlobalAccelerator::Accelerator",
      "Properties": {
        "Name": "SampleAccelerator",
        "Enabled": true
      }
    },
integ.globalaccelerator-alias-target.expected.json#L4
        "Type": "AWS::GlobalAccelerator::Accelerator",
        "Properties": {
          "Name": "aws-cdk-globalaccelerator-integ",
          "Enabled": true
        }
      },
integ.globalaccelerator-alias-target.expected.json#L4
        "Type": "AWS::GlobalAccelerator::Accelerator",
        "Properties": {
          "Name": "aws-cdk-globalaccelerator-integ",
          "Enabled": true
        }
      },
integ.globalaccelerator-alias-target.expected.json#L4
        "Type": "AWS::GlobalAccelerator::Accelerator",
        "Properties": {
          "Name": "aws-cdk-globalaccelerator-integ",
          "Enabled": true
        }
      },
integ.globalaccelerator-alias-target.expected.json#L4
        "Type": "AWS::GlobalAccelerator::Accelerator",
        "Properties": {
          "Name": "aws-cdk-globalaccelerator-integ",
          "Enabled": true
        }
      },

Parameters

Explanation in CloudFormation Registry

The AWS::GlobalAccelerator::Accelerator resource is a Global Accelerator resource type that contains information about how you create an accelerator. An accelerator includes one or more listeners that process inbound connections and direct traffic to one or more endpoint groups, each of which includes endpoints, such as Application Load Balancers, Network Load Balancers, and Amazon EC2 instances.

Frequently asked questions

What is AWS Global Accelerator Accelerator?

AWS Global Accelerator Accelerator 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 Accelerator?

For Terraform, the SonarSource/sonar-iac, snyk-labs/infrastructure-as-code-goof and ericdahl/tf-global-accelerator-sandbox source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the dgaydukov/cert-aws, bcx-exa/open_source_triple_continent_traditional and jnfeinstein/spring-bank source code examples are useful. See the CloudFormation Example section for further details.