diff --git a/lib/convection/model/template/resource/aws_route53_recordset.rb b/lib/convection/model/template/resource/aws_route53_recordset.rb index 4c291db..75b1bf5 100644 --- a/lib/convection/model/template/resource/aws_route53_recordset.rb +++ b/lib/convection/model/template/resource/aws_route53_recordset.rb @@ -26,16 +26,28 @@ class Route53RecordSet < Resource property :record_type, 'Type' property :weight, 'Weight' - def alias_target(&block) - a = ResourceProperty::Route53AliasTarget.new(self) - a.instance_exec(&block) if block - properties['AliasTarget'].set(a) + def alias_target(tgt = nil, &block) + if tgt + # Maintain backwards compatability + alias_tgt tgt + else + # Add new resource_property functionality + a = ResourceProperty::Route53AliasTarget.new(self) + a.instance_exec(&block) if block + properties['AliasTarget'].set(a) + end end - def geo_location(&block) - g = ResourceProperty::Route53GeoLocation.new(self) - g.instance_exec(&block) if block - properties['GeoLocation'].set(g) + def geo_location(geo = nil, &block) + if geo + # Maintain backwards compatability + geo_loc geo + else + # Add new resource_property functionality + g = ResourceProperty::Route53GeoLocation.new(self) + g.instance_exec(&block) if block + properties['GeoLocation'].set(g) + end end end end