1

错误:属性 LoadBalancerAttributes 的值必须是 List 类型

我遵循了云形成文档并设置了属性,但仍然出现错误

谁能知道这个问题以及我哪里出错了?

如何修复模板

Resources:

  IAPILoadBalancerListener:
    Type: AWS::ElasticLoadBalancingV2::Listener
    Properties:
      DefaultActions:
        - TargetGroupArn: !Ref IAPIBlueTargetGroup
          Type: forward
      LoadBalancerArn: !Ref IAPILoadBalancer
      Port: !Ref LoadBalancerPort
      Protocol: TCP
  IAPILoadBalancer:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      LoadBalancerAttributes:
        access_logs.s3.bucket: xxxxxxxx
        access_logs.s3.prefix: xxxxxxxx
        access_logs.s3.enabled: false
        deletion_protection.enabled: fasle
      Name: NLB
      Scheme: internal
      Subnets:
        - !Ref PrivateRailA
        - !Ref PrivateRailB
      Type: network
      Tags:
        - Key: "platform_name"
          Value: "nx"```
4

1 回答 1

2

LoadBalancerAttributes应该有不同的形式。

请查看以下内容:

      LoadBalancerAttributes:
        - Key: access_logs.s3.bucket
          Value: xxxxxxxx
        - Key: access_logs.s3.prefix
          Value: xxxx
        - Key: access_logs.s3.enabled
          Value: false
        - Key: deletion_protection.enabled
          Value: false
于 2020-06-04T21:49:08.597 回答