Skip to content

Add support for UPSERT type of actions #44

Description

@luk4s

Current implementation of update method is DELETE and CREATE (

def update(name,type,ttl,values,comment=nil, zone_apex = nil)
prev = self.clone
@name = name unless name.nil?
@type = type unless type.nil?
@ttl = ttl unless ttl.nil?
@values = values unless values.nil?
@zone_apex = zone_apex unless zone_apex.nil?
@zone.perform_actions([
{:action => "DELETE", :record => prev},
{:action => "CREATE", :record => self},
],comment)
end
).

I suggest to change it to action UPSERT, which AWS describe as update of record set (see https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html)

This change optimize our workflow with DNS record sets.

Make this feature sense for you ? Do you prefer implement new method upsert instead of change current update ?

Thx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions