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

feat(core): make the CfnParameter class mutable #9365

Merged
merged 70 commits into from Jul 31, 2020

Conversation

comcalvi
Copy link
Contributor

@comcalvi comcalvi commented Jul 31, 2020

Closes #9364


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

comcalvi and others added 30 commits June 4, 2020 17:44
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
…::And, Fn::Not, and Fn::Or, including unit tests.
…ied the return type of transform to IResolvable, and updated transform docs
@comcalvi comcalvi requested review from skinny85 and removed request for skinny85 July 31, 2020 14:44
@comcalvi comcalvi requested a review from skinny85 July 31, 2020 18:04
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 31, 2020
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

Looks great! Some cosmetic comments.

packages/@aws-cdk/core/lib/cfn-parameter.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/cloudformation-include/README.md Outdated Show resolved Hide resolved
packages/@aws-cdk/core/lib/cfn-parameter.ts Show resolved Hide resolved
packages/@aws-cdk/core/lib/cfn-parameter.ts Show resolved Hide resolved
packages/@aws-cdk/core/lib/cfn-parameter.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/core/lib/cfn-parameter.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/core/lib/cfn-parameter.ts Show resolved Hide resolved
@skinny85 skinny85 changed the title feat(cfn-include): Make parameters mutable feat: make the CfnParameter class mutable Jul 31, 2020
}

/**
* Indicates if this parameter is configured with "NoEcho" enabled.
*/
public get noEcho(): boolean {
return !!this.props.noEcho;
public get noEcho(): boolean | undefined {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be clear, I meant only the setter. The getter should stay unchanged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Their types have to be the same though. We can't have one being boolean | undefined and the other being boolean

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm, that sucks then.

OK, leave the setter as boolean then. If we need to, we can add a separate method like unsetNoEcho() later.

MaxValue: this.maxValue,
MinLength: this.minLength,
MinValue: this.minValue,
NoEcho: this.noEcho,
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, do use this._noEcho (you need the triple state boolean here).

@skinny85 skinny85 changed the title feat: make the CfnParameter class mutable feat(core): make the CfnParameter class mutable Jul 31, 2020
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

👍

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: daa4e1d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jul 31, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 860966a into aws:master Jul 31, 2020
@shivlaks shivlaks mentioned this pull request Jul 31, 2020
curtiseppel pushed a commit to curtiseppel/aws-cdk that referenced this pull request Aug 11, 2020
Closes aws#9364 

----

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
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cfn-include] Make CfnParameters mutable
3 participants