-
Notifications
You must be signed in to change notification settings - Fork 75
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
r/heroku_app: always read all config vars #17
Conversation
Related to hashicorp/terraform#15962? |
@danp they appear to be unrelated; my change still gives that weird diff. The diff presented in that issue is... misleading? The net result is that var |
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.
This generally makes sense to me with the explanation you provided.
I would question why the field was added in the first place, but all I found is this commit and you know Heroku a lot better than me 😄 , so I will assume you know what you're doing.
I know in K8S it's common (expected) practice for the kubelet to mess up with annotations + let users specify their own, which is (unfortunately) probably going to force me to do the exact opposite: hashicorp/terraform-provider-kubernetes#60
oh btw. keep in mind that we don't print out deprecation warnings for computed-only field, so this won't have any effect in the UI. |
I'm going to go ahead and merge this on Friday, November 3rd, if I don't hear otherwise before then. Thanks! |
…pdate r/heroku_app: always read all config vars
The current implementation of
resource_heroku_app
only reads values for configuration variables for values defined in the current Terraform configuration files. This is counter to how Terraform Resources generally work. Unless there is an extreme circumstance, Terraform Resources should read all supported values regardless if they are set locally, so that a user can detect configuration drift.Consider this config:
If another user were to add additional configuration variables via the Web or API outside of Terraform, the current implementation would not detect it. I found this by importing an app with vars and none in my config, and no diff was detected.
In this patch, we read and save all configuration values. The
all_config_vars
(?) attribute should be removed in a future release.Test results after the patch: