Updating an existing A record from a simple routing policy to weighted by adding annotations to a service fails. External-dns tries to create a new record using the same name and type and delete the old record with no weights. The aws cli fails with a describing error:
InvalidChangeBatch: [RRSet with DNS name example.org., type A, SetIdentifier foobar cannot be created as a non-weighted set exists with the same name and type., RRSet with DNS name example.org., type TXT, SetIdentifier foobar cannot be created as a non-weighted set exists with the same name and type.]\n\tstatus code: 400, request id: *"
May be fixed by correcting the logic to use UPSERT instead of CREATE/DELETE. Another idea is to do deletions before creating new records, but that may have some negative implications I have not foreseen.
Hi UPSERT is not possible, doing UPSERT will actually do a CREATE that will fail.
I was able to fix this locally by changing the order of the commands, so it will do DELETE before CREATE. AWS state the actions will happen in a single operation, so I think it's safe.
Most helpful comment
Hi UPSERT is not possible, doing UPSERT will actually do a CREATE that will fail.
I was able to fix this locally by changing the order of the commands, so it will do DELETE before CREATE. AWS state the actions will happen in a single operation, so I think it's safe.