We have two route53 hosted zones. One zone contains only IP addresses that are internet routable. We have a second zone that contains only private IP addresses. We have a use case where a chef node needs to update both zones. The two zones are identical in name (e.g., hosted zone name for internal view and external view are both x.y.z.. The only difference is the Zone ID and the IP addresses passed by the value property. This EC2 node has an EIP and a private IP address assigned to it.
Steps to Reproduce:
domain_name = 'x.y.z.'
dns_values = {
'ZONEID1' => '10.3.3.3',
'ZONEID2' => '32.208.191.2'
} # these are fake, duh
dns_values.each do |zone, ip|
route53_record "#{hostname}.#{domain_name}" do
value ip
type 'A'
ttl 300
zone_id zone
overwrite true
action :create
end
end
We know about resource cloning and the problem with that, so obviously, the above code will throw an error. However, we can find no way that a different resource name can be given. I think if there was a record_name property added to this resource that would default to the resource name, it would solve our problem.
Expected Result:
Support a way to update similar records in both zones
Actual Result:
today, we could end up with cloned chef resources instead.
Cookbook version
8.2.0
Chef-client version
15.8.32
Platform Details
Redhat 8
Scenario:
We have two route53 hosted zones. One zone contains only IP addresses that are internet routable. We have a second zone that contains only private IP addresses. We have a use case where a chef node needs to update both zones. The two zones are identical in name (e.g., hosted zone name for internal view and external view are both
x.y.z.
. The only difference is the Zone ID and the IP addresses passed by thevalue
property. This EC2 node has an EIP and a private IP address assigned to it.Steps to Reproduce:
We know about resource cloning and the problem with that, so obviously, the above code will throw an error. However, we can find no way that a different resource name can be given. I think if there was a
record_name
property added to this resource that would default to the resource name, it would solve our problem.Expected Result:
Support a way to update similar records in both zones
Actual Result:
today, we could end up with cloned chef resources instead.