Access Logs (access_logs) support the following:
Subnet Mapping (subnet_mapping) blocks support the following:
resource "aws_lb" "test" {
name = "test-lb-tf"
internal = false
load_balancer_type = "application"
security_groups = [aws_security_group.lb_sg.id]
subnets = [for subnet in aws_subnet.public : subnet.id]
enable_deletion_protection = true
access_logs {
bucket = aws_s3_bucket.lb_logs.bucket
prefix = "test-lb"
enabled = true
}
tags = {
Environment = "production"
}
}
create-load-balancer
--name <value>
[--subnets <value>]
[--subnet-mappings <value>]
[--security-groups <value>]
[--scheme <value>]
[--tags <value>]
[--type <value>]
[--ip-address-type <value>]
[--customer-owned-ipv4-pool <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
aws elbv2 create-load-balancer \
--name my-load-balancer \
--subnets subnet-b7d581c0 subnet-8360a9e7
LoadBalancerUsage
LCUUsage
DataTransfer-Regional-Bytes
<Region>-<Region>-AWS-Out-Bytes
Categorized by Availability, Security & Compliance and Cost