terraform-provider-rancher2: [BUG] rancher2_app_v2 values parameter shouldn't be marked as sensitive by the provider
Describe the bug
In response to #499, the values param for rancher2_app_v2 was set to be marked as sensitive by the provider. Now, its impossible to see which values have changed in terraform plan output. There is no way to override it to not be sensitive from outside the provider either.
Not really sure how best this could be addressed. Obviously cannot simply stop marking it as sensitive as that would be a problem for some users. Maybe add some way to tell the provider if you don’t want it to be sensitive or add a separate values param that is not sensitive and merge the two before passing to rancher API. 🤔 .
To Reproduce
- Deploy a
rancher2_app_v2resource that includes some data in thevaluesparam. - Make a change to the data in the
valuesparam. - Run terraform plan.
- You cant see what changed.
Actual Result
Cannot see what changed for in values param.
Expected Result
Ability to see what changed in values param.
Screenshots
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (17 by maintainers)
@rohitsakala We don’t have
sensitive=trueset for the variables in our configs. I just suggested that as a possible way for you to reproduce the issue locally. We use Terraform Cloud to handle our deployments. We do not run terraform plan or apply locally. It all happens on Terraform Cloud platform. Variables that are security related like api keys are stored in Terraform Cloud and they are marked as sensitive there. My guess is that when Terraform Cloud runs terraform it marks those variables as sensitive.It would not be very good security-wise to have all of our api keys, signing keys, tokens, etc included in terraform output anyway which is the entire point of sensitive variables. If this provider accepted a seperate
sensitive_valuesargument it would solve the problem because users could place any sensitive values there so they don’t interfere with the display of thevaluesfield in terraform plan diffs.@rohitsakala Your config appears to be using plain string values. Try using a variable that includes
sensitive = truein its declaration as the value instead:What version of Rancher is this targeting? Please don’t merge until the November release is complete.
@lots0logs Let me see if its feasible to offer sensitive_values field and then merge both of them before applying.
I think I know what’s causing it. In our terraform configs we define values like this:
Some of the vars used inside the object are defined in Terraform Cloud as sensitive. So I’m guessing that when the object uses any of those vars, terraform marks the entire thing as sensitive. If the provider offered a
sensitive_valuesparam in addition to the regular values param that would allow us to put all the sensitive values in one place so the rest of the non-sensitive values can be seen in diffs.@lots0logs I will add it to our backlog. It should be taken care soonish. Once I know the fix version, me or my team members will communicate it here.