Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catered for NS record migrations excluding apex #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion route53-migrate-zone/route53-migrate-zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def diff_record(record_a, record_a_object, record_b, record_b_object):
# best would be to retreive the destination_zone_id using destination_zone_name
destination_zone_id = config.get('destination_zone_values', 'destination_zone_id')

record_types_to_migrate = ['A', 'CNAME', 'MX', 'TXT']
record_types_to_migrate = ['A', 'CNAME', 'MX', 'NS', 'TXT']

if source_zone_name != destination_zone_name:
logging.info('{app_name!s} will rewrite domain names ending in {source_zone_name!s} to domain names ending in {destination_zone_name!s}'.format
Expand Down Expand Up @@ -164,6 +164,8 @@ def diff_record(record_a, record_a_object, record_b, record_b_object):
.format(record_name=record.name))
exit(70)
else:
if record.type == 'NS' and record.name == "%s." % destination_zone_name:
continue
resource_record_dict[record.name] = boto.route53.record.Record(name=record.name,
type=record.type,
ttl=record.ttl,
Expand Down