Skip to content

Commit

Permalink
Re-enable DNS record deletion when multiple records match a single host.
Browse files Browse the repository at this point in the history
This was disabled until further testing, due to the sensitivity of the operation (it could accidentally delete the whole zone).
  • Loading branch information
Arik Kfir committed Nov 29, 2017
1 parent 998efee commit 1e6131d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions update_dns_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ def update_dns_record(zone_id: str, auth_email: str, auth_key: str, subdomain: s
##########################################################################################
delete_url = f"{records_url}/{rec_id}"
print(f"Deleting DNS record with ID '{rec_id}' ({rec['content']}) using: {delete_url}")
# TODO: re-enable DNS record deletion
# requests.delete(url=delete_url,
# headers=build_cloudflare_request_headers(auth_email=auth_email, auth_key=auth_key))\
# .raise_for_status()
requests.delete(url=delete_url,
headers=build_cloudflare_request_headers(auth_email=auth_email, auth_key=auth_key)) \
.raise_for_status()

# print(f"Creating replacement record: '{full_name}' -> '{ip_address}'")
# requests.post(url=records_url,
Expand Down

0 comments on commit 1e6131d

Please sign in to comment.