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(ec2): Remove validation of availabilityZone from Volume #9082

Merged
merged 2 commits into from
Jul 16, 2020

Conversation

ddneilson
Copy link
Contributor

@ddneilson ddneilson commented Jul 15, 2020

This fixes an erroneous validation failure of the availabilityZone property of the Volume construct that occurs during the first run of a fresh application.

Fixes: #9081

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

@NetaNir
Copy link
Contributor

NetaNir commented Jul 16, 2020

See my comment on the orginal issue #9081 (comment), basically the validation should be removed.

@@ -642,7 +641,8 @@ export class Volume extends VolumeBase {
}

protected validateProps(props: VolumeProps) {
if (!Token.isUnresolved(props.availabilityZone) && !/^[a-z]{2}-[a-z]+-[1-9]+[a-z]$/.test(props.availabilityZone)) {
// Note: dummy1[a-z] comes from the DUMMY_VPC_PROPS in vpc.ts. This will be encountered on the first run of a fresh app.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@NetaNir New revision posted that removes the input validation of the AZ entirely.

@ddneilson ddneilson changed the title fix(ec2): Allow dummy AZs from first run VPC fix(ec2): Remove validation of availabilityZone from Volume Jul 16, 2020
@NetaNir
Copy link
Contributor

NetaNir commented Jul 16, 2020

Shouldn't this PR include only the removal of validation?

@ddneilson
Copy link
Contributor Author

Shouldn't this PR include only the removal of validation?

Yeah, that would be sensible. I removed the extra stuff. Will submit that as a separate PR.

@mergify
Copy link
Contributor

mergify bot commented Jul 16, 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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 5c3d423
  • 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 16, 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 8d470b2 into aws:master Jul 16, 2020
curtiseppel pushed a commit to curtiseppel/aws-cdk that referenced this pull request Aug 11, 2020
This fixes an erroneous validation failure of the `availabilityZone` property of the `Volume` construct that occurs during the first run of a fresh application.

Fixes: aws#9081
----

*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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ec2] Volume construct throws with fresh CDK app
4 participants