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
resource "aws_globalaccelerator_accelerator" "noncompliant_missing1" {
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
resource "aws_globalaccelerator_accelerator" "noncompliant_missing2" {
attributes { # Noncompliant {{Make sure that disabling logging is safe here.}}
resource "aws_globalaccelerator_accelerator" "allowed" {
attributes {
flow_logs_enabled = true
}
}
resource "aws_globalaccelerator_accelerator" "default" {
name = "tf-global-accelerator-sandbox"
ip_address_type = "IPV4"
}
resource "aws_globalaccelerator_accelerator" "example" {
name = "apex-domain-redirect"
ip_address_type = "IPV4"
enabled = true
}
resource "aws_globalaccelerator_accelerator" "shortner" {
name = "shortner"
ip_address_type = "IPV4"
enabled = true
}
Parameters
-
dns_name
optional computed - string -
enabled
optional - bool -
hosted_zone_id
optional computed - string -
id
optional computed - string -
ip_address_type
optional - string -
ip_sets
optional computed - list of object-
ip_addresses
- list of string -
ip_family
- string
-
-
name
required - string -
tags
optional - map from string to string -
attributes
list block-
flow_logs_enabled
optional - bool -
flow_logs_s3_bucket
optional - string -
flow_logs_s3_prefix
optional - string
-
-
timeouts
single block
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
Type: AWS::GlobalAccelerator::Accelerator
Properties:
Name: !Sub ${AWS::StackName}-Accelerator
HttpListener:
Type: AWS::GlobalAccelerator::Listener
Properties:
Type: AWS::GlobalAccelerator::Accelerator
Properties:
Name: GlobalAccelerator
IpAddressType: IPV4
Enabled: true
MyListener:
Type: AWS::GlobalAccelerator::Accelerator
Properties:
Name: !Ref AcceleratorName
AcceleratorListener:
Type: AWS::GlobalAccelerator::Listener
Type: AWS::GlobalAccelerator::Accelerator
Properties:
Enabled: true
Name: !Sub
- 'hello-accelerator-${UniqueSuffix}'
- UniqueSuffix: !FindInMap [ Application, Settings, UniqueSuffix ]
Type: AWS::GlobalAccelerator::Accelerator
Properties:
Name:
Fn::Join:
- '-'
- - 'accelerator--relay--'
"Type": "AWS::GlobalAccelerator::Accelerator",
"Properties": {
"Name": "SampleAccelerator",
"Enabled": true
}
},
"Type": "AWS::GlobalAccelerator::Accelerator",
"Properties": {
"Name": "aws-cdk-globalaccelerator-integ",
"Enabled": true
}
},
"Type": "AWS::GlobalAccelerator::Accelerator",
"Properties": {
"Name": "aws-cdk-globalaccelerator-integ",
"Enabled": true
}
},
"Type": "AWS::GlobalAccelerator::Accelerator",
"Properties": {
"Name": "aws-cdk-globalaccelerator-integ",
"Enabled": true
}
},
"Type": "AWS::GlobalAccelerator::Accelerator",
"Properties": {
"Name": "aws-cdk-globalaccelerator-integ",
"Enabled": true
}
},
Parameters
-
Name
required - String -
IpAddressType
optional - String -
IpAddresses
optional - List -
Enabled
optional - Boolean -
Tags
optional - List of Tag
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.