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

Aurora DBInstance .spec.forProvider field is modified and makes the CR invalid #2106

Open
drewwells opened this issue Oct 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@drewwells
Copy link
Contributor

drewwells commented Oct 15, 2024

Crossplane is setting spec.forProvider.{masterUsername,kmsKeyID,port} on a spec that is disallowed when those fields are set.

What happened?

Crossplane attempts to recreate a deleted aurora instance and fails because the forProvider block was modified to an invalid state. kmsKeyID, masterusername and port were populated.

For example, these errors are seen:

The requested DB Instance will be a member of a DB Cluster. Set master user name for the DB Cluster.
create failed: cannot create DBInstance in AWS: InvalidParameterCombination:
      The requested DB Instance will be a member of a DB Cluster. Set database endpoint
      port number for the DB Cluster.\n\tstatus code: 400

How can we reproduce it?

Provision an aurora dbcluster and dbinstance
Delete the dbinstance from AWS console
Trigger crossplane to reconcile the dbinstance which is missing an aws resource now
Crossplane reports confusing errors that the dbcluster is missing fields port, masterUsername, and kmsKeyID. It's actually because the dbinstance now includes those fields.

What environment did it happen in?

provider-aws version: 0.46.0
crossplane: 1.17.0

@drewwells drewwells added the bug Something isn't working label Oct 15, 2024
@MisterMX
Copy link
Collaborator

Crossplane does not support external deletion of resources. The deletion process should always be triggered from within Crossplane.

If there is a way to prevent this error from happening without breaking existing implementations feel free to open a pull request.

@drewwells
Copy link
Contributor Author

drewwells commented Oct 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants