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

fix(rdsinstance/dbinstance): check optiongroupname correctly #1816

Merged

Conversation

wotolom
Copy link
Contributor

@wotolom wotolom commented Jul 27, 2023

Description of your changes

In the controllers of the resources database RDSInstance and rds DBInstance an extra check for the parameter OptionGroupName is added as this needs to be checked against the entries of OptionGroupMemberships given by the Describe output.

Fixes #1795 (similar CloudwatchLogsExportConfiguration issue will be addressed in separate PR)

Note: rds DBCluster also has the field OptionGroupName , so I tried implementing the same logic here too. However I got this error:

create failed: cannot create DBCluster in AWS: InvalidParameterCombination: Option groups are not supported for DB Clusters

So one may consider removing the field here? (see also no such field
at terraform: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster)

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Manually

Signed-off-by: Charel Baum (external expert on behalf of DB Netz AG) <charel.baum-extern@deutschebahn.com>
@MisterMX
Copy link
Collaborator

MisterMX commented Jul 28, 2023

It appears that it is not possible to associate a custom option group with a DB cluster. From the AWS Docs:

--option-group-name (string)
The option group to associate the DB cluster with.
DB clusters are associated with a default option group that can’t be modified.

I guess they copied this field from the DB instance API to be implemented in the future? Terraform probably skipped it because it is not supported until now.

Since the provider is meant to be a 1:1 reflection of the AWS API I would keep this field despite its lack of use.

Copy link
Collaborator

@MisterMX MisterMX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you very much for your contribution @wotolom!

@MisterMX MisterMX merged commit 2e94dd2 into crossplane-contrib:master Jul 28, 2023
8 checks passed
@wotolom wotolom deleted the optiongroupname-isuptodate-fix branch August 23, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot modify RDS instance: api error InvalidParameterCombination: No modifications were requested
2 participants