-
Notifications
You must be signed in to change notification settings - Fork 39
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
4.x delete script fails to delete cloudformation due to route53 hostedzone #188
Comments
can be fixed by deleting records in the hostedzone prior to deleting cloudformation stack. |
As a workaround, you can iterate over all records via - name: grab zone id
community.aws.route53_zone:
zone: xn--mitlinuxwrdasnichtpassiert-ohc.de
register: AWSINFO
- name: grab Route53 record information
community.aws.route53_info:
query: record_sets
hosted_zone_id: "{{ AWSINFO.zone_id }}"
register: RECORDS
- debug:
var: RECORDS and delete all records or just filter them ... |
Because of the next related bug you'll hit, here comes the next workaround :) - name: remove all records
community.aws.route53:
state: absent
hosted_zone_id: "{{ AWSINFO.zone_id }}"
record: "{{ item.Name }}"
type: "{{ item.Type }}"
value: "{{ item.ResourceRecords | map(attribute='Value') | list }}"
ttl: "{{ item.TTL }}"
overwrite: yes
with_items: "{{ RECORDS.ResourceRecordSets }}" This works for all non alias records. |
Got poc working with ansible-collections/community.aws#801. Thanks @markuman ! Next up item that is not removed
|
No longer reproducible |
hostedzone is unable to delete due to existing A records leftover from openshift-install
A
records leftover are of this record name patternuuid: <guid>
kubernetes.io/cluster/<cluster-name>: owned
where
<cluster-name>
is of patterncluster-<shortened-guid>-<5-alphanumerics>
where
<shortened-guid>
is leftmost 13 characters from<guid>
The text was updated successfully, but these errors were encountered: