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-docdb] autoMinorVersionUpgrade is not set to true by default #9494

Closed
ryyakobe opened this issue Aug 6, 2020 · 0 comments · Fixed by #9505
Closed

[aws-docdb] autoMinorVersionUpgrade is not set to true by default #9494

ryyakobe opened this issue Aug 6, 2020 · 0 comments · Fixed by #9505
Assignees
Labels
@aws-cdk/aws-docdb Related to Amazon DocumentDB bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.

Comments

@ryyakobe
Copy link

ryyakobe commented Aug 6, 2020

DocDB documentation states that autoMinorVersionUpgrade is set to true by default but it's not.

   /**
   * Indicates that minor engine upgrades are applied automatically to the
   * DB instance during the maintenance window.
   *
   * @default true
   */
  readonly autoMinorVersionUpgrade?: boolean;

It's later used in constructor:

      autoMinorVersionUpgrade: props.autoMinorVersionUpgrade,

so if props.autoMinorVersionUpgrade was not set, then the resulting template will not include AutoMinorVersionUpgrade value at all for AWS::DocDB::DBInstance, but should have AutoMinorVersionUpgrade: true.

Reproduction Steps

This test will fail, because AutoMinorVersionUpgrade is not present.

    // GIVEN
    const stack = testStack();

    // WHEN
    new DatabaseInstance(stack, 'Instance', {
      cluster: stack.cluster,
      instanceClass: SINGLE_INSTANCE_TYPE,
    });

    // THEN
    expectCDK(stack).to(haveResource('AWS::DocDB::DBInstance', {
      Properties: {
        AutoMinorVersionUpgrade: true,
        DBClusterIdentifier: { Ref: 'DatabaseB269D8BB' },
        DBInstanceClass: EXPECTED_SYNTH_INSTANCE_TYPE,
      },
      DeletionPolicy: 'Retain',
      UpdateReplacePolicy: 'Retain',
    }, ResourcePart.CompleteDefinition));

What did you expect to happen?

The above test to pass.


This is 🐛 Bug Report

@ryyakobe ryyakobe added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 6, 2020
@github-actions github-actions bot added the @aws-cdk/aws-docdb Related to Amazon DocumentDB label Aug 6, 2020
ryyakobe added a commit to ryyakobe/aws-cdk that referenced this issue Aug 6, 2020
autoMinorVersionUpgrade is enabled by default to conform with the documentation.

fixes aws#9494
ryyakobe added a commit to ryyakobe/aws-cdk that referenced this issue Aug 6, 2020
autoMinorVersionUpgrade is enabled by default to conform with the documentation.

fixes aws#9494
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Aug 8, 2020
@mergify mergify bot closed this as completed in #9505 Aug 9, 2020
mergify bot pushed a commit that referenced this issue Aug 9, 2020
…by default as stated in the docstring (#9505)

Fixes #9494

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb pushed a commit that referenced this issue Aug 10, 2020
…by default as stated in the docstring (#9505)

Fixes #9494

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-docdb Related to Amazon DocumentDB bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
3 participants