Skip to content

DSL generation issues when properties contain "type" #1

@TinHead

Description

@TinHead

I was trying to add a Route53 entry to a stack as below:

resource "dns_record_set" do 
    properties do 
          hosted_zone_name "somezone.net."
          name "host.somezone.net"
          type "A"
          set_identifier "frontend_instance_b"
          weight 1
          TTL 300
          resource_records [ ref("my_elastic_ip_defined_else") ]              
     end
    type "AWS::Route53::RecordSet"
end

The resulting json was:

"DnsRecordSet": {
      "Metadata": {
      },
      "Properties": {
       "HostedZoneName": "somezone.net.",
        "Name": "host.somezone.net.",
        "ResourceRecords": [
          {
            "Ref": "MyElasticIpDefinedElse"
          }
        ],
        "SetIdentifier": "frontend_instance_b",
        "Ttl": 300,
        "Weight": 1
      },
      "Type": "A"
},

The problem is that in the resulting Json the Type attribute type "AWS::Route53::RecordSet" is overwritten by the Type attribute in the properties which is set to "A"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions