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

fix: remove extra characters on inputs passed to deployment script in pipeline #433

Merged
merged 2 commits into from
Jan 20, 2023

Conversation

shubydo
Copy link
Collaborator

@shubydo shubydo commented Jan 20, 2023

Proposed changes

Remove double quotes and extra characters on inputs passed to deploy.sh script in pipeline. Currently the values being passed to this script in the pipeline are coming from terraform outputs using the terraform output command. This can cause additional double quotes and a new line character to be added to the result (depending on the version of terraform) and can cause the script to fail. Example below:

Current output being interpolated to build S3 path:
s3://"0123456789-dce-artifacts-cd"/lambda/account_pool_metrics.zip

Error:

Invalid bucket name ""0123456789-dce-artifacts-cd"": Bucket name must match the regex "^[a-zA-Z0-9.\-_]{1,255}$" or be an ARN matching the regex...

New output (Valid S3 bucket path):
s3://0123456789-dce-artifacts-cd/lambda/account_pool_metrics.zip

Currently this error is causing the pipeline in #431 to fail. This may be due to a change made in the terraform output command as the PR involves upgrading from 0.12.x -> 1.3.x.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (changes to code, which do not change application behavior)

Checklist

  • I have filled out this PR template
  • I have read the CONTRIBUTING doc
  • I have added automated tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (README.md, inline comments, etc.)
  • I have updated the CHANGELOG.md under a ## next release, with a short summary of my changes

Relevant Links

-raw flag for terraform output - https://github.com/hashicorp/terraform/releases/tag/v0.14.3
Dependent PR #431

Further comments

@shubydo shubydo force-pushed the fix/extra-double-quotes-in-deploy-script branch from b69ed12 to 848194e Compare January 20, 2023 13:30
@shubydo shubydo self-assigned this Jan 20, 2023
@shubydo shubydo marked this pull request as draft January 20, 2023 14:07
@shubydo shubydo marked this pull request as ready for review January 20, 2023 14:40
@shubydo shubydo changed the title fix: remove double quotes and extra characters on inputs passed to deployment script in pipeline fix: remove extra characters on inputs passed to deployment script in pipeline Jan 20, 2023
@shubydo shubydo merged commit 6032e9d into master Jan 20, 2023
@shubydo shubydo deleted the fix/extra-double-quotes-in-deploy-script branch January 20, 2023 17:52
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