Skip to content

Commit

Permalink
Docs and version bump (#27)
Browse files Browse the repository at this point in the history
* make test more specific

* Update docs

* 3.1.0

* re-add package lock
  • Loading branch information
AntonBazhal committed Sep 22, 2022
1 parent b5edc97 commit 1110761
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ plugins:

provider:
name: aws
iamRoleStatements: # [Optional] these statements will be applied to all functions
- Effect: "Allow"
Action:
- "xray:PutTraceSegments"
- "xray:PutTelemetryRecords"
Resource: "*"
iam:
role:
statements: # [Optional] these statements will be applied to all functions
- Effect: "Allow"
Action:
- "xray:PutTraceSegments"
- "xray:PutTelemetryRecords"
Resource: "*"
permissionsBoundary: "arn:aws:iam::123456789012:policy/boundaries" # [Optional] the ARN of the policy used to set the permissions boundary for the role

functions:
function1:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-plugin-custom-roles",
"version": "3.0.0",
"version": "3.1.0",
"description": "A Serverless plugin that makes creation of per function IAM roles easier",
"repository": {
"type": "git",
Expand Down
14 changes: 2 additions & 12 deletions test/index-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,6 @@ describe('serverless-plugin-custom-roles', function() {
});

it('should not add a permission boundary when provider has none', function() {
const expectedPermissionsBoundary = 'TEST_PERMISSIONS_BOUNDARY';
const instance = createTestInstance({
provider: {
iam: {
Expand All @@ -828,17 +827,8 @@ describe('serverless-plugin-custom-roles', function() {
instance.createRoles();

expect(instance)
.to.have.nested.property('serverless.service.resources')
.that.not.containSubset({
Resources: {
Function1LambdaFunctionRole: {
Type: 'AWS::IAM::Role',
Properties: {
PermissionsBoundary: expectedPermissionsBoundary
}
}
}
});
.to.have.nested.property('serverless.service.resources.Resources.Function1LambdaFunctionRole.Properties')
.that.does.not.have.property('PermissionsBoundary');

sinon.assert.notCalled(instance.serverless.cli.log);
});
Expand Down

0 comments on commit 1110761

Please sign in to comment.