Cloudshock / bootstrap

Describes the steps to get the project up and running
MIT License
0 stars 0 forks source link

Fixing Invalid Terraform Configuration #4

Closed marcboudreau closed 3 years ago

marcboudreau commented 3 years ago

This Pull Request fixes Issue #3

Change Description

The initial-setup.sh script was taking a JSON encoded file and using the base64 command to encode its content and saving it as a Terraform Cloud Variable, named google_credentials in the bootstrap Workspace. The problem arose, when that variable was used as the value for an attribute that cannot accept newlines in its value.

To solve this problem, the JSON encoded file was simply stripped of its newline characters before being base64 encoded. Since JSON encoding does not require newline characters, this elegant solution required only a small change.