drakkan / terraform-provider-sftpgo

Terraform provider for SFTPGo
Apache License 2.0
21 stars 6 forks source link

Delay initial Access Token Request #6

Closed JustinSchulte closed 2 months ago

JustinSchulte commented 4 months ago

Version: v0.0.8

https://github.com/drakkan/terraform-provider-sftpgo/blame/46115861254f5b7fa41e01be82fadf4b6b8a9664/sftpgo/client/client.go#L86-L91

We want to create our sftpgo server using terraform in a create-module and configure our server using this provider in a second module.

The problem we are facing is that this provider will try to get the access token from a server that doesn't exist yet during the terraform plan. Would it be possible to delay the initial request for the token until it is actually needed?

For example, move the marked code block to the doRequest function.

ixLikro commented 4 months ago

any news on this issue? We're facing a similar problem.