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(Config Schema): Accept accountId as policy principal #9082

Merged

Conversation

blue-urban-sky
Copy link
Contributor

Issue around using

    resourcePolicy:
      - Effect: Allow
        Principal:
          AWS: 
           - 123456789012
           - 987654321098

causing a schema validation warning
I have added #/definitions/awsAccountId and updated awsIamPolicyPrincipal to include it as a possible option

Closes: #9077

@codecov
Copy link

codecov bot commented Mar 5, 2021

Codecov Report

Merging #9082 (ac6ee6a) into master (b81fd05) will decrease coverage by 0.01%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9082      +/-   ##
==========================================
- Coverage   87.17%   87.15%   -0.02%     
==========================================
  Files         288      289       +1     
  Lines       11068    11077       +9     
==========================================
+ Hits         9648     9654       +6     
- Misses       1420     1423       +3     
Impacted Files Coverage Δ
lib/configuration/variables/sources/file.js 100.00% <ø> (ø)
lib/plugins/aws/package/compile/functions.js 95.89% <ø> (ø)
lib/plugins/aws/provider.js 95.10% <ø> (ø)
scripts/serverless.js 82.95% <0.00%> (-2.93%) ⬇️
lib/classes/CLI.js 94.57% <100.00%> (ø)
lib/classes/PluginManager.js 97.23% <100.00%> (+<0.01%) ⬆️
lib/cli/handle-error.js 86.36% <100.00%> (-1.14%) ⬇️
lib/plugins/aws/package/compile/events/stream.js 98.14% <100.00%> (+0.03%) ⬆️
lib/plugins/aws/package/lib/mergeIamTemplates.js 100.00% <100.00%> (ø)
lib/utils/tokenize-exception.js 100.00% <100.00%> (ø)
... and 1 more

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 b81fd05...a46e617. Read the comment docs.

@blue-urban-sky
Copy link
Contributor Author

Modified it to allow mixed types

Copy link
Contributor

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

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

Looks good 👍 I've just added one small comment and we should be good to go 🚀

lib/plugins/aws/provider.js Show resolved Hide resolved
Copy link
Contributor

@pgrzesik pgrzesik 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, thank you @blue-urban-sky 🙇

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.

The JSON schema for resourcePolicy does not allow account numbers
2 participants