-
-
Notifications
You must be signed in to change notification settings - Fork 338
feat: show config.toml
and user data in Terraform plan
#754
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
feat: show config.toml
and user data in Terraform plan
#754
Conversation
Appreciated. Makes it easier to check for changes without deploying the module. Simplifies the development process. |
See #755 for KICS issue |
…ner into feat/show-config-files-in-diff
…ner into feat/show-config-files-in-diff
@kayman-mk apart from the PR linter error, this one is ready for re-review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! Makes it very easy to check for configuration changes.
Tested an upgrade from 6.1.2 to this version. Looks good. |
config.toml
and user data in Terraform plan
🤖 I have created a release *beep* *boop* --- ## [6.2.0](6.1.2...6.2.0) (2023-03-22) ### Features * show `config.toml` and user data in Terraform plan ([#754](#754)) ([5b5c335](5b5c335)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: Niek Palm <[email protected]> Co-authored-by: cattle-ops-releaser[bot] <126345536+cattle-ops-releaser[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
## Description In #754 I unfortunately made a major oversight: the `local_file` doesn't persist between machines (duh 🤦🏾 ). So for example in a CI/CD pipeline the file is not present so it wants to render the whole file as new every time. This defeats the main purpose that I had intended for this feature... Also if the pipeline applies the plan, there will be a perpetual diff, even if you save the file in repository. I still think this is useful locally for debugging purposes, but therefore I propose we disable this mechanism by default. In addition, when these variables are enabled I changed the location to the Root module for easier access if you want to debug the rendered files. ## Migrations required YES/NO - Feature is quite new, if someone wants to use keep this as introduced they now need to explicitly enable it. ## Verification ```hcl output_runner_config_to_file = true output_user_data_to_file = true ``` Results:  --------- Co-authored-by: kayma <[email protected]> Co-authored-by: Matthias Kay <[email protected]>
Description
What
Adds a new variable
show_user_data_in_plan
which isfalse
by default (there could be sensitive data leaked).config.toml
to a fileWhy
config.toml
to a file we get an actual diff of theconfig.toml
when we change values in our Terraform plan. In addition this would help us with the refactoring work were currently doing.Migrations required
NO
Verification
show_user_data_in_plan = true
Example of
config.toml
showing a diff in plan: