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

Variables: Support resolving "raw" JSON string form of SSM params #9229

Merged
merged 1 commit into from
Apr 2, 2021

Conversation

medikoo
Copy link
Contributor

@medikoo medikoo commented Apr 2, 2021

Closes: #9217

@codecov
Copy link

codecov bot commented Apr 2, 2021

Codecov Report

Merging #9229 (a965001) into master (5e16a28) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head a965001 differs from pull request most recent head ac60cf2. Consider uploading reports for the commit ac60cf2 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9229   +/-   ##
=======================================
  Coverage   86.94%   86.94%           
=======================================
  Files         315      315           
  Lines       11672    11678    +6     
=======================================
+ Hits        10148    10154    +6     
  Misses       1524     1524           
Impacted Files Coverage Δ
...on/variables/sources/instance-dependent/get-ssm.js 93.47% <100.00%> (+0.97%) ⬆️

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 5e16a28...ac60cf2. Read the comment docs.

@medikoo medikoo merged commit 4eba512 into master Apr 2, 2021
@medikoo medikoo deleted the 0401-fix-ssm-handling branch April 2, 2021 10:03
@@ -20,6 +20,8 @@ module.exports = (serverlessInstance) => {
Error: ServerlessError,
errorMessage: 'Non-string address argument in variable "ssm" source: %v',
});
const region = !params || !params[0] || params[0] === 'raw' ? null : params[0];
Copy link

Choose a reason for hiding this comment

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

Looks like this change is causing an error for me:

Cannot resolve serverless.yml: Variables resolution errored with:
    - Cannot resolve variable at "<var name>": Missing region in config

I think this logic is resulting in region = null, but it used to resolve to false?

I haven't dug much deeper, but I was able to work around the error by adding the region param, ie. ssm(us-east-1):...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rschick great thanks for pointing. Will be fixed with #9236

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.

SSM variables: referencing variables that are a SecureString that contain a stringified JSON fails
2 participants