KablamoOSS / kombustion

Extend CloudFormation with plugins
https://kombustion.io
MIT License
25 stars 12 forks source link

Resolve for Secrets Manager failing #141

Open neoghostz opened 5 years ago

neoghostz commented 5 years ago

Describe the bug Kombustion fails on inspection of the resolve key word. Suspect it would also fail on Params Store as well

To Reproduce Throw the following into and RDS/RedShift properties definition:

      MasterUsername: !Join ['', ['{{resolve:secretsmanager:', !Ref Secret, ':SecretString:username}}' ]]
      MasterUserPassword: !Join ['', ['{{resolve:secretsmanager:', !Ref Secret, ':SecretString:password}}' ]]

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

kombustion upsert ./redshift.yaml --stack-name DataLake-DEV-RedShift --read-parameters ./params.json --region=ap-southeast-2 -i
➜  Generate Default Outputs: [false]
✖  Error: Failed to execute the template
☞  Resolution: File: ./redshift.yaml
template: cfn:123: function "resolve" not defined
✖  Fatal: template: cfn:123: function "resolve" not defined
☞  Resolution: An unknown error occured, please subbmit an issue
∞  More info: https://github.com/KablamoOSS/kombustion/issues/new?template=bug_report.md

Desktop (please complete the following information): Linux AMD 64 build of v0.5.1

Additional context Sounds like more custom logic to handle :)

iann0036 commented 5 years ago

Interesting. As a workaround, will this work?

MasterUsername: !Sub "{{resolve:secretsmanager:${Secret}:SecretString:username}}" MasterUserPassword: !Sub "{{resolve:secretsmanager:${Secret}:SecretString:password}}"

neoghostz commented 5 years ago

Good pickup but nope. Still failing:

➜  Generate Default Outputs: [false]
✖  Error: Failed to execute the template
☞  Resolution: File: ./redshift.yaml
template: cfn:134: function "resolve" not defined
✖  Fatal: template: cfn:134: function "resolve" not defined
☞  Resolution: An unknown error occured, please subbmit an issue
∞  More info: https://github.com/KablamoOSS/kombustion/issues/new?template=bug_report.md