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

Stop wrapping yamldecode with try() #1812

Merged
merged 8 commits into from Oct 25, 2023
Merged

Stop wrapping yamldecode with try() #1812

merged 8 commits into from Oct 25, 2023

Conversation

sruffilli
Copy link
Collaborator

@sruffilli sruffilli commented Oct 25, 2023

Per #1794, updating all factories to avoid wrapping yamldecode in try, to have terraform explicitly fail in case of a malformed yaml file.

Since empty yaml files result in yamldecode to fail, this PR also updates all yaml files used in factories, adding the comment below to advice the user on how to create an empty document.

---
# Terraform will be unable to decode this file if it does not contain valid YAML
# You can retain `---` (start of the document) to indicate an empty document.

Checklist

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

@sruffilli sruffilli enabled auto-merge (squash) October 25, 2023 11:30
@sruffilli sruffilli merged commit 4decc64 into master Oct 25, 2023
13 checks passed
@sruffilli sruffilli deleted the sr_yamldecode branch October 25, 2023 14:16
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.

None yet

4 participants