Open CharlieC3 opened 6 years ago
I am also very interested in this feature. Looking at the code, it seems the issue is due to the attempt to fetch a child token during the execution of the provider's ConfigureFunc
- https://github.com/terraform-providers/terraform-provider-vault/blob/master/vault/provider.go#L242
What would be the best approach to delaying this call? Or, perhaps a flag like use_child_token = false
could be introduced as a tradeoff to achieve the desired functionality.
Just leaving a comment to say this issue still exists in v2.0 of the vault provider, on terraform v0.12.0
Hi, can we get a comment from the developers on this please?
Is this recognised as a bug that can be fixed?
This issue is still a problem. Are there any plans to fix this?
In the event where a Terraform script is designed to first deploy a Vault server, then configure it using this Vault provider, the plan creation step will fail because the Vault provider attempts to connect to the Vault server when it does not exist yet.
The Vault provider should not attempt to establish a connection with a destination Vault server during the provider's initialization phase in order to avoid a failure in the scenario where the Vault server does not yet exist because Terraform hasn't deployed it yet.
The actual line causing the issue is here: https://github.com/terraform-providers/terraform-provider-vault/blob/master/vault/provider.go#L193
Terraform Version
Terraform v0.11.8
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/CharlieC3/a928e735bbe266057c0a5dbc6c25553a
Expected Behavior
I expected a Terraform plan to be generated.
Actual Behavior
The Vault provider attempted to establish a connection with the destination Vault server during a planning phase, causing the plan to fail to create because Vault was not yet deployed.
Like many other providers, the Vault provider should not attempt to establish a connection with the destination Vault server during the provider initialization phase in order to avoid failure in such where the Terraform script using the Vault provider is also the one deploying the Vault server.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan