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

aws-rds: removing parameter from parameter group does not set it to the default value #29218

Closed
ChrisLane opened this issue Feb 22, 2024 · 5 comments
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@ChrisLane
Copy link

Describe the bug

I am unable to set a parameter group parameter to its default value without setting it explicitly in CDK.

Expected Behavior

When I remove a parameter from a CDK created parameter group, I expect that parameter to be handled by the AWS defaults as if I had pressed "Set to default value" for the parameter in the AWS Management Console.

Current Behavior

When a parameter is removed from a parameter group in AWS CDK, it remains as the same value in AWS Management Console.

Reproduction Steps

Deploy a parameter group with the following JavaScript code:

    const mysql8ParameterGroupParameters = {
      character_set_client: "utf8",
      character_set_connection: "utf8",
      character_set_database: "utf8",
      character_set_filesystem: "utf8",
      character_set_results: "utf8",
      character_set_server: "utf8",
      collation_connection: "utf8_unicode_ci",
      collation_server: "utf8_unicode_ci",
      innodb_strict_mode: "1"
    };
      const mysql8DatabaseClusterParameterGroup = new rds.CfnDBClusterParameterGroup(
          this,
          "mysql-8-database-cluster-parameter-group",
          {
            dbClusterParameterGroupName: `myParamGroup`,
            family: "aurora-mysql8.0",
            parameters: mysql8ParameterGroupParameters
          });

Then remove all the collation.. and character_set... parameters and deploy the changes.
Observe that the parameters are still set to utf8 in AWS Management Console rather than the defaults.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.129.0

Framework Version

No response

Node.js Version

v21.6.2

OS

Mac OS

Language

TypeScript

Language Version

JavaScript

Other information

No response

@ChrisLane ChrisLane added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 22, 2024
@github-actions github-actions bot added the @aws-cdk/aws-rds Related to Amazon Relational Database label Feb 22, 2024
@pahud
Copy link
Contributor

pahud commented Feb 23, 2024

I created a new parameter group like this without specifying some props(comment off):

    const mysql8ParameterGroupParameters3 = {
      // character_set_client: "utf8",
      // character_set_connection: "utf8",
      // character_set_database: "utf8",
      // // character_set_filesystem: "utf8",
      // character_set_results: "utf8",
      // character_set_server: "utf8",
      collation_connection: "utf8_unicode_ci",
      collation_server: "utf8_unicode_ci",
      innodb_strict_mode: "1"
    };

    const mysql8DatabaseClusterParameterGroup = new rds.CfnDBClusterParameterGroup(
      this,
      "mysql-8-database-cluster-parameter-group",
      {
        dbClusterParameterGroupName: `myParamGroup`,
        family: "aurora-mysql8.0",
        parameters: mysql8ParameterGroupParameters,
        description: 'test',
      });

And I check character_set_client and character_set_connection from the RDS console. Their values are all utf8.

Can you be specific and tell me which attribute should not be utf8 by default so I can investigate it further?

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 23, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Feb 25, 2024
@ChrisLane
Copy link
Author

@pahud By default, the parameters should appear as blank in the management console like in this screenshot.
image

This is what I would expect to see if CDK had the correct behaviour.

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Feb 26, 2024
@pahud
Copy link
Contributor

pahud commented Jun 3, 2024

If you do not specify those attributes, CDK would not synthesize for that explicitly and the default values would be determined by CFN, not CDK. I am afraid this is not something CDK can do. What do you think?

@pahud pahud added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 3, 2024
Copy link

github-actions bot commented Jun 5, 2024

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants