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

Encode heredoc for terragrunt action output #14

Merged
merged 1 commit into from
Aug 3, 2023
Merged

Conversation

oredavids
Copy link
Contributor

@oredavids oredavids commented Aug 3, 2023

Fixes heredoc encoding issue in Github Action:

Error: Unable to process file command 'output' successfully.
Error: Invalid format 'tg_action_output=%0AInitializing the backend...%0A%0ASuccessfully configured the backend "s3"! Terraform will automatically%0Ause this backend unless the backend configuration changes.%0AInitializing modules..

Explanation:
It seems that GitHub actions is particular about the < character. Especially when it encounters two of them << as is the case when the output of terragrunt happens to have a heredoc. In this case, GitHub actions treats the unescaped << as a reserved keyword and hits the error above. URL encoding the < addresses the issue.

Copy link
Contributor

@eak12913 eak12913 left a comment

Choose a reason for hiding this comment

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

LGTM. FYI @denis256

@oredavids oredavids changed the title Update main.sh Encode heredoc for terragrunt action output Aug 3, 2023
@oredavids oredavids merged commit cb1fb27 into main Aug 3, 2023
@denis256 denis256 deleted the oredavids-patch-1 branch October 20, 2023 17:09
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.

2 participants