Skip to content

Conversation

alex-berger
Copy link

This PR adds support for CloudFormation intrinsic functions to the role property, such for example the following sytanx is supported:

role: {"Fn::GetAtt": ["MyRoleId", "Arn"]}
role: {Fn::GetAtt: [MyRoleId, Arn]}
role:
   Fn::GetAtt:
   - MyRoleId
   - Arn

Having this feature in place, it is now possible to use (refer to) IAM roles which are defined in the Resources section of the serverless.yml file.

Copy link
Collaborator

@horike37 horike37 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 for the PR @alex-berger 👍
Unfortunately, some linting error occurs. Could you fix those?

@alex-berger
Copy link
Author

Linting issues fixed.

const _ = require('lodash');
const BbPromise = require('bluebird');

function isIntrinsic(obj) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this function outside module.exports? Would be good to be inside that.

Copy link
Collaborator

@horike37 horike37 left a comment

Choose a reason for hiding this comment

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

@alex-berger
Sorry for the delay response. Thank you for fixing the linting errors.

I have reviewed the code and left one comment for improvements.

And, cloud you add an explanation of this functionality within README so that let users know it

bweigel pushed a commit to bweigel/serverless-step-functions that referenced this pull request Dec 6, 2018
bweigel pushed a commit to bweigel/serverless-step-functions that referenced this pull request Dec 6, 2018
bweigel pushed a commit to bweigel/serverless-step-functions that referenced this pull request Dec 6, 2018
@horike37 horike37 closed this Dec 17, 2018
@JonChristensen
Copy link

Just a quick note that this feature is mentioned in the docs, but the syntax in the docs does not match the syntax shown by @alex-berger and therefore led me astray until I found this.

ss-betseqnzr pushed a commit to BetSEQNZR/serverless-step-functions that referenced this pull request Sep 8, 2023
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.

3 participants