Skip to content
Permalink
Browse files

Merge pull request #86 from itkq/delete-hosted-zone-correctly

Delete hosted zone and its records correctly
  • Loading branch information
itkq committed Jan 8, 2020
2 parents 03599f6 + bacf761 commit 0a54b7050bb51b8d504ad92dd47217bb5bbc797d
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/roadworker/route53-wrapper.rb
@@ -99,10 +99,13 @@ def delete
if @options.force
log(:info, 'Delete Hostedzone', :red, @hosted_zone.name)

change_batch = Batch.new(self, health_checks: @options.health_checks, logger: @options.logger, dry_run: @options.dry_run)
self.rrsets.each do |record|
record.delete
change_batch.delete(record)
end

change_batch.request!(@options.route53)

unless @options.dry_run
@options.route53.delete_hosted_zone(id: @hosted_zone.id)
@options.updated = true

0 comments on commit 0a54b70

Please sign in to comment.
You can’t perform that action at this time.