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

!GetAtt assumes it's a string #73

Closed
pauloancheta opened this issue Feb 6, 2018 · 0 comments
Closed

!GetAtt assumes it's a string #73

pauloancheta opened this issue Feb 6, 2018 · 0 comments

Comments

@pauloancheta
Copy link
Contributor

Getting an error when !GetAtt is throwing an error when it is passed an array:

# cfn-template.yaml
Resources:
  MyCodePipeline:
    Type: AWS::CodePipeline::Pipeline
    Properties:
      RoleArn: !GetAtt [MyRole, Arn]
error: ref.trim is not a function
error:  TypeError: ref.trim is not a function
    at maybeRewriteRef (/snapshot/iidy/lib/preprocess/index.js:827:30)
    at Object.exports.visitGetAtt (/snapshot/iidy/lib/preprocess/index.js:835:60)
    at visitYamlTagNode (/snapshot/iidy/lib/preprocess/index.js:645:24)
    at result (/snapshot/iidy/lib/preprocess/index.js:882:20)
    at visitNode (/snapshot/iidy/lib/preprocess/index.js:899:7)
    at visitMapNode (/snapshot/iidy/lib/preprocess/index.js:969:46)
    at visitPlainMap (/snapshot/iidy/lib/preprocess/index.js:947:16)
    at result (/snapshot/iidy/lib/preprocess/index.js:888:20)
    at visitNode (/snapshot/iidy/lib/preprocess/index.js:899:7)
    at visitMapNode (/snapshot/iidy/lib/preprocess/index.js:969:46)
    at visitPlainMap (/snapshot/iidy/lib/preprocess/index.js:947:16)
    at result (/snapshot/iidy/lib/preprocess/index.js:888:20)
    at visitNode (/snapshot/iidy/lib/preprocess/index.js:899:7)
    at _.fromPairs._.map (/snapshot/iidy/lib/preprocess/index.js:576:24)
    at arrayMap (/snapshot/iidy/node_modules/lodash/lodash.js:660:23)
    at Function.map (/snapshot/iidy/node_modules/lodash/lodash.js:9571:14)

As a workaround, I'm using a string instead

Resources:
  MyCodePipeline:
    Properties:
      RoleArn: !GetAtt MyRole.Arn
pauloancheta added a commit that referenced this issue Feb 13, 2018
fix #73 - allow !GetAtt in pre-processed templates to accept arrays
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

No branches or pull requests

1 participant