VPCDHCPOptionsAssociation遇到不受支持的属性DHCPOptionsId

时间:2019-05-21 09:14:55

标签: amazon-cloudformation

当我尝试创建堆栈时,会引发上述错误。我已经检查过,并且我使用的是正确的属性值。

我尝试为DHCPOptions添加一个“ DependsOn”。我尝试将Fn:GetAtt用于DHCPOptions。没有一个被证明是成功的。

  "DHCPOptions": {
    "Type": "AWS::EC2::DHCPOptions",
    "Properties": {
      "DomainName": { "Ref": "DNSName" },
      "DomainNameServers": [ "AmazonProvidedDNS" ],
      "Tags": [{
        "Key": "Name",
        "Value": {
          "Fn::Sub": "${VPCStackName}-DHCPOPTS"
        }
      }]
    }
  },
  "VPCDHCPOptionsAssociation": {
    "Type": "AWS::EC2::VPCDHCPOptionsAssociation",
    "DependsOn": "DHCPOptions",
    "Properties": {
      "VpcId": { "Ref": "TestVPC" },
      "DHCPOptionsId": { "Ref": "DHCPOptions" }
    }
  },

期望从DHCPOptions传递DHCPOptionsId。

1 个答案:

答案 0 :(得分:0)

我找到了问题。关于外壳只是一个简单的错误。 应该是DhcpOptionsId而不是DHCPOptionsId