Open TinHead opened 11 years ago
I'm not sure if you've resolved your issue yet, but if I declare the inner property "type" as "Type" instead then it generates the correct json.
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
Generated json:
"DnsRecordSet": {
"Metadata": {
},
"Properties": {
"HostedZoneName": "somezone.net",
"Name": "host.somezone.net",
"ResourceRecords": [
{
"Ref": "MyElasticIpDefinedElse"
}
],
"SetIdentifier": "frontend_instance_b",
"TTL": 300,
"Type": "A",
"Weight": 1
},
"Type": "AWS::Route53::RecordSet"
}
I was trying to add a Route53 entry to a stack as below:
The resulting json was:
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"