amazon.aws.elb_application_lb 模块 – 管理应用程序负载均衡器

注意

此模块是 amazon.aws 集合(版本 9.0.0)的一部分。

如果您使用的是 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install amazon.aws。您需要进一步的要求才能使用此模块,请参阅 要求了解详细信息。

要在 playbook 中使用它,请指定:amazon.aws.elb_application_lb

amazon.aws 5.0.0 中的新增功能

概要

要求

执行此模块的主机需要满足以下要求。

  • python >= 3.6

  • boto3 >= 1.28.0

  • botocore >= 1.31.0

参数

参数

注释

access_key

别名:aws_access_key_id, aws_access_key, ec2_access_key

字符串

AWS 访问密钥 ID。

有关访问令牌的更多信息,请参阅 AWS 文档 https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys

也可以按优先级递减顺序使用 AWS_ACCESS_KEY_IDAWS_ACCESS_KEYEC2_ACCESS_KEY 环境变量。

aws_access_keyprofile 选项是互斥的。

为了与 AWS botocore SDK 保持一致,在 5.1.0 版本中添加了 aws_access_key_id 别名。

ec2_access_key 别名已弃用,将在 2024-12-01 之后的版本中删除。

EC2_ACCESS_KEY 环境变量的支持已弃用,将在 2024-12-01 之后的版本中删除。

access_logs_enabled

布尔值

是否启用访问日志。

设置后,还必须设置 access_logs_s3_bucket

选择

  • false

  • true

access_logs_s3_bucket

字符串

访问日志的 S3 存储桶的名称。

存储桶必须与负载均衡器位于同一区域,并且具有授予 Elastic Load Balancing 写入存储桶权限的存储桶策略。

如果启用了 Amazon S3 中的访问日志,则为必需。

设置后,还必须设置 access_logs_enabled

access_logs_s3_prefix

字符串

S3 存储桶中日志位置的前缀。

如果未指定前缀,则访问日志将存储在存储桶的根目录中。

不能以斜杠开头或结尾。

aws_ca_bundle

路径

用于验证 SSL 证书的 CA 包的位置。

也可以使用 AWS_CA_BUNDLE 环境变量。

aws_config

字典

用于修改 botocore 配置的字典。

可以在 AWS 文档中找到参数 https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config

debug_botocore_endpoint_logs

布尔值

使用 botocore.endpoint 记录器来解析任务期间进行的唯一(而不是总计)"resource:action" API 调用,并将集合输出到任务结果中的 resource_actions 键。使用 aws_resource_action 回调输出在 playbook 期间制作的总列表。

也可以使用 ANSIBLE_DEBUG_BOTOCORE_LOGS 环境变量。

选择

  • false ← (默认)

  • true

deletion_protection

布尔值

指示是否启用了 ALB 的删除保护。

默认为 false

选择

  • false

  • true

endpoint_url

别名:ec2_url, aws_endpoint_url, s3_url

字符串

连接到 URL 而不是默认的 AWS 端点。虽然这可以用于连接到其他与 AWS 兼容的服务,但 amazon.aws 和 community.aws 集合仅针对 AWS 进行了测试。

也可以使用 AWS_URLEC2_URL 环境变量,优先级递减。

ec2_urls3_url 别名已被弃用,将在 2024-12-01 之后的版本中移除。

EC2_URL 环境变量的支持已被弃用,将在 2024-12-01 之后的版本中移除。

http2

布尔值

指示是否启用 HTTP2 路由。

默认为 True

选择

  • false

  • true

http_desync_mitigation_mode

字符串

在 community.aws 3.2.0 中添加

确定负载均衡器如何处理可能对应用程序构成安全风险的请求。

默认为 defensive

选择

  • "monitor"

  • "defensive"

  • "strictest"

http_drop_invalid_header_fields

布尔值

在 community.aws 3.2.0 中添加

指示负载均衡器是删除带有无效标头字段的 HTTP 标头 (true) 还是将其路由到目标 (false)。

默认为 false

选择

  • false

  • true

http_x_amzn_tls_version_and_cipher_suite

布尔值

在 community.aws 3.2.0 中添加

指示在将客户端请求发送到目标之前,是否将这两个标头添加到客户端请求中。

默认为 false

选择

  • false

  • true

http_xff_client_port

布尔值

在 community.aws 3.2.0 中添加

指示 X-Forwarded-For 标头是否应保留客户端用于连接到负载均衡器的源端口。

默认为 false

选择

  • false

  • true

idle_timeout

integer

空闲连接关闭前等待的秒数。

ip_address_type

字符串

设置指定应用程序负载均衡器的子网使用的 IP 地址类型。

选择

  • "ipv4"

  • "dualstack"

listeners

list / elements=dictionary

包含要附加到 ALB 的侦听器的字典列表。有关所需字典的详细信息,请参见示例。请注意,侦听器键采用驼峰式命名。

Certificates

list / elements=dictionary

SSL 服务器证书。

CertificateArn

字符串

证书的 Amazon 资源名称 (ARN)。

DefaultActions

list / elements=dictionary / required

侦听器的默认操作。

TargetGroupArn

字符串

目标组的 Amazon 资源名称 (ARN)。

listeners.DefaultActions.TargetGroupName 互斥。

TargetGroupName

字符串

目标组的名称。

listeners.DefaultActions.TargetGroupArn 互斥。

Type

字符串

操作的类型。

Port

integer / required

负载均衡器正在侦听的端口。

Protocol

string / required

从客户端到负载均衡器的连接的协议。

Rules

list / elements=dictionary

ALB 侦听器规则列表。

有关可能的条件和操作的完整文档,请参见 boto3 文档

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_rule

请记住,AWS 对未请求的参数使用默认值。例如,当操作类型为 authenticate-oidc 时,ScopeSessionTimeout

Actions

list / elements=dictionary

如果满足所有规则的条件,则应用的操作。

Conditions

list / elements=dictionary

必须满足才能应用操作的条件。

Priority

integer

规则优先级。

SslPolicy

字符串

定义支持哪些密码和协议的安全策略。

name

string / required

负载均衡器的名称。此名称在您的 AWS 账户中必须是唯一的,最多可以包含 32 个字符,必须仅包含字母数字字符或连字符,并且不能以连字符开头或结尾。

profile

别名:aws_profile

字符串

用于身份验证的命名 AWS 配置文件。

有关命名配置文件的更多信息,请参见 AWS 文档 https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

也可以使用 AWS_PROFILE 环境变量。

profile 选项与 aws_access_keyaws_secret_keysecurity_token 选项互斥。

purge_listeners

布尔值

如果为 true,则会从 ALB 中清除现有侦听器,以完全匹配 listeners 参数定义的侦听器。

如果未设置 listeners 参数,则不会修改侦听器。

选择

  • false

  • true ←(默认)

purge_rules

布尔值

设置为 false 时,保留现有的负载均衡器规则。将修改和添加,但不会删除。

选择

  • false

  • true ←(默认)

purge_tags

布尔值

如果 purge_tags=true 并且设置了 tags,则会从资源中清除现有标签,以完全匹配 tags 参数定义的标签。

如果未设置 tags 参数,则不会修改标签,即使 purge_tags=True

aws: 开头的标签键由 Amazon 保留,无法修改。因此,它们将被 purge_tags 参数忽略。有关更多信息,请参见 Amazon 文档 https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions

选择

  • false

  • true ←(默认)

region

别名:aws_region, ec2_region

字符串

要使用的 AWS 区域。

对于 IAM、Route53 和 CloudFront 等全局服务,将忽略 region

也可以使用 AWS_REGIONEC2_REGION 环境变量。

有关更多信息,请参见 Amazon AWS 文档 http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region

ec2_region 别名已被弃用,将在 2024-12-01 之后的版本中移除。

EC2_REGION 环境变量的支持已被弃用,将在 2024-12-01 之后的版本中移除。

scheme

字符串

面向互联网的或内部负载均衡器。ALB 方案在创建后无法修改。

选择

  • "internet-facing" ←(默认)

  • "internal"

secret_key

别名:aws_secret_access_key, aws_secret_key, ec2_secret_key

字符串

AWS 秘密访问密钥。

有关访问令牌的更多信息,请参阅 AWS 文档 https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys

也可以使用 AWS_SECRET_ACCESS_KEYAWS_SECRET_KEYEC2_SECRET_KEY 环境变量,优先级递减。

secret_keyprofile 选项互斥。

为了与 AWS botocore SDK 保持一致,在 5.1.0 版本中添加了 aws_secret_access_key 别名。

ec2_secret_key 别名已被弃用,将在 2024-12-01 之后的版本中移除。

EC2_SECRET_KEY 环境变量的支持已被弃用,将在 2024-12-01 之后的版本中移除。

security_groups

list / elements=string

要分配给负载均衡器的安全组的名称或 ID 的列表。

如果 state=present,则为必需。

如果为 [],将使用 VPC 的默认安全组。

session_token

别名: aws_session_token, security_token, aws_security_token, access_token

字符串

用于临时凭证的 AWS STS 会话令牌。

有关访问令牌的更多信息,请参阅 AWS 文档 https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys

也可以使用 AWS_SESSION_TOKENAWS_SECURITY_TOKENEC2_SECURITY_TOKEN 环境变量,优先级依次降低。

security_tokenprofile 选项是互斥的。

别名 aws_session_tokensession_token 在 3.2.0 版本中添加,参数在 6.0.0 版本中从 security_token 重命名为 session_token

别名 security_tokenaws_security_tokenaccess_token 已被弃用,将在 2024-12-01 之后的版本中删除。

EC2_SECRET_KEYAWS_SECURITY_TOKEN 环境变量的支持已被弃用,将在 2024-12-01 之后的版本中删除。

状态

字符串

创建或销毁负载均衡器。

选择

  • "present" ← (默认)

  • "absent"

子网

list / elements=string

要附加到负载均衡器的子网 ID 列表。每个可用区只能指定一个子网。必须指定来自至少两个可用区的子网。

如果 state=present,则为必需。

标签

别名: resource_tags

字典

表示要应用于资源的标签的字典。

如果未设置 tags 参数,则不会修改标签。

validate_certs

布尔值

设置为 false 时,将不会验证与 AWS API 通信的 SSL 证书。

强烈建议不要设置 validate_certs=false,作为替代方案,请考虑设置 aws_ca_bundle

选择

  • false

  • true ←(默认)

waf_fail_open

布尔值

在 community.aws 3.2.0 中添加

指示是否允许启用了 AWS WAF 的负载均衡器在无法将请求转发到 AWS WAF 时,将请求路由到目标。

默认为 false

选择

  • false

  • true

wait

布尔值

在完成之前,等待负载均衡器的状态变为“active”。每 15 秒执行一次状态检查,直到达到成功状态。在 40 次检查失败后返回错误。

选择

  • false ← (默认)

  • true

wait_timeout

integer

wait 结合使用的时间(以秒为单位)。

注释

注意

  • 侦听器根据端口进行匹配。如果侦听器的端口发生更改,则将创建一个新的侦听器。

  • 侦听器规则根据优先级进行匹配。如果规则的优先级发生更改,则将创建一个新的规则。

  • 注意: 对于模块,环境变量和配置文件是从 Ansible “主机” 上下文而不是 “控制器” 上下文读取的。因此,可能需要将文件显式复制到 “主机”。对于查找和连接插件,环境变量和配置文件是从 Ansible “控制器” 上下文而不是 “主机” 上下文读取的。

  • Ansible 使用的 AWS SDK (boto3) 也可能会从 Ansible “主机” 上下文中的配置文件 (通常是 ~/.aws/credentials) 读取凭据和其他设置(例如区域)的默认值。有关详细信息,请参阅 https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html

示例

# Note: These examples do not set authentication details, see the AWS Guide for details.

# Create an ALB and attach a listener
- amazon.aws.elb_application_lb:
    name: myalb
    security_groups:
      - sg-12345678
      - my-sec-group
    subnets:
      - subnet-012345678
      - subnet-abcdef000
    listeners:
      - Protocol: HTTP # Required. The protocol for connections from clients to the load balancer (HTTP or HTTPS) (case-sensitive).
        Port: 80 # Required. The port on which the load balancer is listening.
        # The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
        SslPolicy: ELBSecurityPolicy-2015-05
        Certificates: # The ARN of the certificate
          - CertificateArn: arn:aws:iam::123456789012:server-certificate/test.domain.com
        DefaultActions:
          - Type: forward # Required.
            TargetGroupName: # Required. The name of the target group
    state: present

# Create an ALB and attach a listener with logging enabled
- amazon.aws.elb_application_lb:
    access_logs_enabled: true
    access_logs_s3_bucket: mybucket
    access_logs_s3_prefix: "logs"
    name: myalb
    security_groups:
      - sg-12345678
      - my-sec-group
    subnets:
      - subnet-012345678
      - subnet-abcdef000
    listeners:
      - Protocol: HTTP # Required. The protocol for connections from clients to the load balancer (HTTP or HTTPS) (case-sensitive).
        Port: 80 # Required. The port on which the load balancer is listening.
        # The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
        SslPolicy: ELBSecurityPolicy-2015-05
        Certificates: # The ARN of the certificate
          - CertificateArn: arn:aws:iam::123456789012:server-certificate/test.domain.com
        DefaultActions:
          - Type: forward # Required.
            TargetGroupName: # Required. The name of the target group
    state: present

# Create an ALB with listeners and rules
- amazon.aws.elb_application_lb:
    name: test-alb
    subnets:
      - subnet-12345678
      - subnet-87654321
    security_groups:
      - sg-12345678
    scheme: internal
    listeners:
      - Protocol: HTTPS
        Port: 443
        DefaultActions:
          - Type: forward
            TargetGroupName: test-target-group
        Certificates:
          - CertificateArn: arn:aws:iam::123456789012:server-certificate/test.domain.com
        SslPolicy: ELBSecurityPolicy-2015-05
        Rules:
          - Conditions:
              - Field: path-pattern
                Values:
                  - '/test'
            Priority: '1'
            Actions:
              - TargetGroupName: test-target-group
                Type: forward
          - Conditions:
              - Field: path-pattern
                Values:
                  - "/redirect-path/*"
            Priority: '2'
            Actions:
              - Type: redirect
                RedirectConfig:
                  Host: "#{host}"
                  Path: "/example/redir" # or /#{path}
                  Port: "#{port}"
                  Protocol: "#{protocol}"
                  Query: "#{query}"
                  StatusCode: "HTTP_302" # or HTTP_301
          - Conditions:
              - Field: path-pattern
                Values:
                  - "/fixed-response-path/"
            Priority: '3'
            Actions:
              - Type: fixed-response
                FixedResponseConfig:
                  ContentType: "text/plain"
                  MessageBody: "This is the page you're looking for"
                  StatusCode: "200"
          - Conditions:
              - Field: host-header
                Values:
                  - "hostname.domain.com"
                  - "alternate.domain.com"
            Priority: '4'
            Actions:
              - TargetGroupName: test-target-group
                Type: forward
    state: present

# Create an ALB with a listener having multiple listener certificates
- amazon.aws.elb_application_lb:
    name: myalb
    security_groups:
      - sg-12345678
      - my-sec-group
    subnets:
      - subnet-012345678
      - subnet-abcdef000
    listeners:
      - Protocol: HTTP # Required. The protocol for connections from clients to the load balancer (HTTP or HTTPS) (case-sensitive).
        Port: 80 # Required. The port on which the load balancer is listening.
        # The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
        SslPolicy: ELBSecurityPolicy-2015-05
        Certificates: # The ARN of the certificate (first certificate in the list will be set as default certificate)
          - CertificateArn: arn:aws:iam::123456789012:server-certificate/test.domain.com
          - CertificateArn: arn:aws:iam::123456789012:server-certificate/secondtest.domain.com
          - CertificateArn: arn:aws:iam::123456789012:server-certificate/thirdtest.domain.com
        DefaultActions:
          - Type: forward # Required.
            TargetGroupName: # Required. The name of the target group
    state: present

# Remove an ALB
- amazon.aws.elb_application_lb:
    name: myalb
    state: absent

返回值

常见返回值记录在此处,以下是此模块独有的字段

描述

access_logs_s3_bucket

字符串

访问日志的 S3 存储桶的名称。

返回:state=present

示例: "mys3bucket"

access_logs_s3_enabled

字符串

指示是否启用了存储在 Amazon S3 中的访问日志。

返回:state=present

示例: "true"

access_logs_s3_prefix

字符串

S3 存储桶中位置的前缀。

返回:state=present

示例: "my/logs"

availability_zones

list / elements=dictionary

负载均衡器的可用区。

返回:state=present

示例: [{"load_balancer_addresses": [], "subnet_id": "subnet-aabbccddff", "zone_name": "ap-southeast-2a"}]

load_balancer_addresses

list / elements=dictionary

有关负载均衡器的静态 IP 地址的信息。

返回:state=present

allocation_id

字符串

面向内部的负载均衡器的弹性 IP 地址的分配 ID。

返回:state=present

ip_address

字符串

静态 IP 地址。

返回:state=present

ipv6_address

字符串

IPv6 地址。

返回:state=present

private_ipv4_address

字符串

内部负载均衡器的私有 IPv4 地址。

返回:state=present

subnet_id

字符串

子网的 ID。

返回:state=present

zone_name

字符串

可用区的名称。

返回:state=present

canonical_hosted_zone_id

字符串

与负载均衡器关联的 Amazon Route 53 托管区域的 ID。

返回:state=present

示例: "ABCDEF12345678"

changed

布尔值

是否创建/更新/删除了 ALB。

返回: 总是

示例: true

client_keep_alive_seconds

字符串

客户端保持活动值,以秒为单位。

返回:state=present

示例: "3600"

connection_logs_s3_bucket

字符串

连接日志的 S3 存储桶的名称。

返回:state=present

示例: ""

connection_logs_s3_enabled

字符串

指示是否启用了连接日志。

返回:state=present

示例: "false"

connection_logs_s3_prefix

字符串

S3 存储桶中连接日志位置的前缀。

返回:state=present

示例: ""

created_time

字符串

创建负载均衡器的日期和时间。

返回:state=present

示例: "2015-02-12T02:14:02+00:00"

deletion_protection_enabled

字符串

指示是否启用了删除保护。

返回:state=present

示例: "true"

dns_name

字符串

负载均衡器的公共 DNS 名称。

返回:state=present

示例: "internal-my-elb-123456789.ap-southeast-2.elb.amazonaws.com"

idle_timeout_timeout_seconds

字符串

空闲超时值,以秒为单位。

返回:state=present

示例: "60"

ip_address_type

字符串

负载均衡器的子网使用的 IP 地址类型。

返回:state=present

示例: "ipv4"

ipv6_deny_all_igw_traffic

字符串

锁定对负载均衡器的互联网网关 (IGW) 访问。

返回:state=present

示例: "false"

listeners

list / elements=dictionary

有关侦听器的信息。

返回:state=present

证书

list / elements=dictionary

SSL 服务器证书。

返回:state=present

certificate_arn

字符串

证书的 Amazon 资源名称 (ARN)。

返回:state=present

示例: "arn:aws:acm:us-east-1:123456789012:certificate/28d2f3d9-cb2f-4033-a9aa-e75e704125a2"

default_actions

字符串

侦听器的默认操作。

返回:state=present

示例: "[{'forward_config': {'target_group_stickiness_config': {'enabled': False}, 'target_groups': [{'target_group_arn': 'arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/alb-test-2-98b7f374/bf43c68602c51c02', 'weight': 1}]}, 'target_group_arn': 'arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/alb-test-2-98b7f374/bf43c68602c51c02', 'type': 'forward'}]"

forward_config

字典

用于创建在多个目标组之间分配请求的操作的信息。

返回:state=present

target_group_stickiness_config

字典

规则的目标组粘性。

返回:state=present

enabled

布尔值

指示是否启用了目标组粘性。

返回:state=present

target_groups

字典

目标组。

返回:state=present

target_group_arn

字符串

目标组的 Amazon 资源名称 (ARN)。

返回:state=present

weight

integer

权重。

返回:state=present

target_group_arn

字符串

目标组的 Amazon 资源名称 (ARN)。

返回:state=present

示例: "arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/alb-test-169eb5ba/09ba111f8079fb83"

type

字符串

操作的类型。

返回:state=present

示例: "forward"

listener_arn

字符串

侦听器的 Amazon 资源名称 (ARN)。

返回:state=present

示例: "arn:aws:elasticloadbalancing:us-east-1:123456789012:listener/app/alb-test-169eb5ba/1659336d4100d496/8367c4262cc1d0cc"

load_balancer_arn

字符串

负载均衡器的 Amazon 资源名称 (ARN)。

返回:state=present

示例: "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/alb-test-169eb5ba/1659336d4100d496"

port

integer

负载均衡器正在侦听的端口。

返回:state=present

示例: 80

protocol

字符串

从客户端到负载均衡器的连接的协议。

返回:state=present

示例: "HTTPS"

rules

list / elements=dictionary

侦听器规则列表。

返回:state=present

actions

list / elements=dictionary

操作。

返回:state=present

示例: [{"forward_config": {"target_group_stickiness_config": {"enabled": false}, "target_groups": [{"target_group_arn": "arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/alb-test-169eb/09ba111f8079fb83", "weight": 1}]}, "target_group_arn": "arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/alb-test-169eb/09ba111f8079fb83", "type": "forward"}]

forward_config

字典

用于创建在多个目标组之间分配请求的操作的信息。

返回:state=present

target_group_stickiness_config

字典

规则的目标组粘性。

返回:state=present

enabled

布尔值

指示是否启用了目标组粘性。

返回:state=present

target_groups

字典

目标组。

返回:state=present

target_group_arn

字符串

目标组的 Amazon 资源名称 (ARN)。

返回:state=present

weight

integer

权重。

返回:state=present

target_group_arn

字符串

目标组的 Amazon 资源名称 (ARN)。

返回:state=present

type

字符串

操作的类型。

返回:state=present

conditions

list / elements=string

条件。

返回:state=present

示例: []

is_default

布尔值

指示这是否为默认规则。

返回:state=present

示例: false

priority

字符串

优先级。

返回:state=present

示例: "default"

rule_arn

字符串

规则的 Amazon 资源名称 (ARN)。

返回:state=present

示例: ""

ssl_policy

字符串

定义支持哪些密码和协议的安全策略。

返回:state=present

示例: "ELBSecurityPolicy-2016-08"

load_balancer_arn

字符串

负载均衡器的 Amazon 资源名称 (ARN)。

返回:state=present

示例: "arn:aws:elasticloadbalancing:ap-southeast-2:123456789012:loadbalancer/app/my-alb/001122334455"

load_balancer_name

字符串

负载均衡器的名称。

返回:state=present

示例: "my-alb"

load_balancing_cross_zone_enabled

字符串

指示是否启用跨区域负载均衡。

返回:state=present

示例: "true"

routing_http2_enabled

字符串

指示是否启用 HTTP/2。

返回:state=present

示例: "true"

routing_http_desync_mitigation_mode

字符串

确定负载均衡器如何处理可能对应用程序构成安全风险的请求。

返回:state=present

示例: "defensive"

routing_http_drop_invalid_header_fields_enabled

字符串

指示负载均衡器是否删除具有无效标头字段的 HTTP 标头 (true) 或将其路由到目标 (false)。

返回:state=present

示例: "false"

routing_http_preserve_host_header_enabled

字符串

指示应用程序负载均衡器是否应保留 HTTP 请求中的 Host 标头并将其发送到目标,而无需任何更改。

返回:state=present

示例: "false"

routing_http_x_amzn_tls_version_and_cipher_suite_enabled

字符串

指示在将客户端请求发送到目标之前,是否将这两个标头添加到客户端请求中。

返回:state=present

示例: "false"

routing_http_xff_client_port_enabled

字符串

指示 X-Forwarded-For 标头是否应保留客户端用于连接到负载均衡器的源端口。

返回:state=present

示例: "false"

routing_http_xff_header_processing_mode

字符串

允许您在应用程序负载均衡器将请求发送到目标之前修改、保留或删除 HTTP 请求中的 X-Forwarded-For 标头。

返回:state=present

示例: "append"

scheme

字符串

面向 Internet 的或内部负载均衡器。

返回:state=present

示例: "internal"

security_groups

list / elements=string

负载均衡器的安全组 ID。

返回:state=present

示例: ["sg-0011223344"]

状态

字典

负载均衡器的状态。

返回:state=present

示例: {"code": "active"}

code

字符串

状态代码。

返回:成功

reason

字符串

状态的描述。

返回:可用时

tags

字典

附加到负载均衡器的标签。

返回:state=present

示例: {"Tag": "Example"}

type

字符串

负载均衡器的类型。

返回:state=present

示例: "application"

vpc_id

字符串

负载均衡器的 VPC ID。

返回:state=present

示例: "vpc-0011223344"

waf_fail_open_enabled

字符串

指示是否允许启用了 AWS WAF 的负载均衡器在无法将请求转发到 AWS WAF 时,将请求路由到目标。

返回:state=present

示例: "false"

作者

  • Rob White (@wimnat)