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(AWS Deploy): Recognize LogicalResourceId in stackPolicy #10097

Merged
merged 2 commits into from Oct 15, 2021

Conversation

jmonsma
Copy link
Contributor

@jmonsma jmonsma commented Oct 14, 2021

According the Cloudformation documentation it should support single and wildcard logical ID's

Addresses #10095

@jmonsma jmonsma changed the title Support LogicalResourceId in stackPolicy fix(AWS): Add support for Logical Resource ID's in stackPolicy Oct 14, 2021
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Thank you @jmonsma ! It indeed looks as important fix. I've just pointed one issue in proposed regex. Once it's addressed we should be good

@@ -578,6 +585,10 @@ class AwsProvider {
additionalProperties: false,
required: ['securityGroupIds', 'subnetIds'],
},
awsLogicalResourceId: {
type: 'string',
pattern: '^[#A-Za-z0-9-_./]+[*]?',
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we need a pattern for full string (so with $ at the end), as otherwise we allow any string after matching string, and that will not make a valid resource id

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, completely overlooked this one. I fixed the pattern.

@jmonsma jmonsma requested a review from medikoo October 15, 2021 09:37
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Thank you @jmonsma!

@codecov
Copy link

codecov bot commented Oct 15, 2021

Codecov Report

Merging #10097 (c73971b) into master (be00a26) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10097   +/-   ##
=======================================
  Coverage   85.39%   85.39%           
=======================================
  Files         334      334           
  Lines       13604    13604           
=======================================
  Hits        11617    11617           
  Misses       1987     1987           
Impacted Files Coverage Δ
lib/plugins/aws/provider.js 94.27% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be00a26...c73971b. Read the comment docs.

@pgrzesik pgrzesik changed the title fix(AWS): Add support for Logical Resource ID's in stackPolicy fix(AWS Deploy): Recognize LogicalResourceId in stackPolicy Oct 15, 2021
@pgrzesik pgrzesik merged commit 1a528c2 into serverless:master Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants