Configurable list of headers to avoid writing to tfstate#12
Configurable list of headers to avoid writing to tfstate#12hynd wants to merge 1 commit intohashicorp:mainfrom
Conversation
|
Hi @hynd! Thanks for working on this. We're currently working on some changes to how exactly Terraform Core and providers will interact when processing changes, with development in a feature branch in the main repository. Since this change is doing something slightly unusual (modifying how a value from configuration is stored in state) I'd like to hold on this change for the moment until we've finished that work in progress, and then we can see how this interacts with it. Usually providers only use For other providers, we usually recommend using non-Terraform-specific means to pass credentials, so they can be set for your session and apply to other tools that might talk to the same API. This usual practice isn't a perfect fit for the
Once the situation looks clearer with the provider protocol changes in progress I'll take another look here and test how your technique is behaving under the new assumptions. Thanks again for working on this! |
|
I had similar thoughts about alternate ways of providing credentials (inc envvars) and multiple hosts, but couldn't think of anything nice :/ Thanks for the info about the refactor - i'll hang ten! |
|
@apparentlymart - Any updates on the approach here? |
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
I'd like to avoid writing some headers (eg; "Authorization") to Terraform state...
Not sure what you think about the config name?
The implementation is a little... unusual - it doesn't seem like
StateFuncapplies early enough to data sources (vs resources), so i had to resort to Set() to overwrite the state in the Read function(ditto for
ImportStateet al for testing state set by a data source).