amazon-web-services - 属性 VPCZoneIdentifier 的值必须为字符串列表类型

标签 amazon-web-services amazon-ec2 aws-cloudformation

"wordpressASG": {
      "Type": "AWS::AutoScaling::AutoScalingGroup",
      "Properties": {
        "AvailabilityZones": [
          "ap-southeast-2a",
          "ap-southeast-2b"
        ],
        "VPCZoneIdentifier": [
          {
            "ref": "subnetA"
          },
          {
            "ref": "subnetB"
          }
        ],
        "MinSize": "0",
        "HealthCheckGracePeriod": 300,
        "MaxSize": "0",
        "Cooldown": "300",
        "LaunchTemplate": {
          "LaunchTemplateId": {
            "Ref": "wordpressTemplate"
          },
          "Version": {
            "Fn::GetAtt": [
              "wordpressTemplate",
              "LatestVersionNumber"
            ]
          }
        },
        "MetricsCollection": [
          {
            "Granularity": "1Minute",
            "Metrics": [
              "GroupMinSize",
              "GroupMaxSize"
            ]
          }
        ],
        "TargetGroupARNs": [
          {
            "Ref": "wordpressTG"
          }
        ]
      }
    }

可能不是一个新问题,但所有示例都是使用子网参数的。 List 需要是字符串,但 ref 应该给出这个东西的字符串。子网是在同一脚本中创建的。

最佳答案

基于评论。

问题是在 VPCZoneIdentifier 中列出子集时使用 ref 而不是 Ref

关于amazon-web-services - 属性 VPCZoneIdentifier 的值必须为字符串列表类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61833725/

相关文章:

database - 数据库如何在更快的磁盘上获得更差的基准测试结果?

amazon-web-services - 如何防止CloudFormation堆栈被删除(意外)?

node.js - AWS CodeBuild 永远转移到 S3 步骤

python - 如何将新创建的 EC2 安全组与实例相关联

java - 如何通过自定义属性在 Cognito 用户池中查找用户?

linux - 无法通过 SSH 访问 EC2 实例 pem 'Permissions 0777 for ' .ssh/intuit-tke-qe.pem“太开放”

Python AWS Boto3 SAML 身份验证错误

linux - 如何在亚马逊 EC2 Linux 实例上更改 shell

python - Spectrum S3 访问被拒绝

aws-cloudformation - StackCreate验证错误: Condition token can only be used in Conditions block