Resource: awsGlobalacceleratorListener
Provides a Global Accelerator listener.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsGlobalacceleratorAcceleratorExample =
new aws.globalacceleratorAccelerator.GlobalacceleratorAccelerator(
this,
"example",
{
attributes: {
flowLogsEnabled: true,
flowLogsS3Bucket: "example-bucket",
flowLogsS3Prefix: "flow-logs/",
},
enabled: true,
ipAddressType: "IPV4",
name: "Example",
}
);
const awsGlobalacceleratorListenerExample =
new aws.globalacceleratorListener.GlobalacceleratorListener(
this,
"example_1",
{
acceleratorArn: awsGlobalacceleratorAcceleratorExample.id,
clientAffinity: "SOURCE_IP",
portRange: [
{
fromPort: 80,
toPort: 80,
},
],
protocol: "TCP",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsGlobalacceleratorListenerExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
acceleratorArn
- (Required) The Amazon Resource Name (ARN) of your accelerator.clientAffinity
- (Optional) Direct all requests from a user to the same endpoint. Valid values arenone
,SOURCE_IP
. Default:none
. Ifnone
, Global Accelerator uses the "five-tuple" properties of source IP address, source port, destination IP address, destination port, and protocol to select the hash value. IfSOURCE_IP
, Global Accelerator uses the "two-tuple" properties of source (client) IP address and destination IP address to select the hash value.protocol
- (Optional) The protocol for the connections from clients to the accelerator. Valid values aretcp
,udp
.portRange
- (Optional) The list of port ranges for the connections from clients to the accelerator. Fields documented below.
port_range supports the following attributes:
fromPort
- (Optional) The first port in the range of ports, inclusive.toPort
- (Optional) The last port in the range of ports, inclusive.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The Amazon Resource Name (ARN) of the listener.
Timeouts
create
- (Default30M
)update
- (Default30M
)delete
- (Default30M
)
Import
Global Accelerator listeners can be imported using the id
, e.g.,