We have been writing a lot of TF against the Akamai provider and I am trying to build a provider for credentialing the executions.
The Akamai provider accepts a path to a credentials file – and fails the run if that file is not found.
In order to create that file on the fly I would need code to execute [in Enterprise] prior to the Akamai provider – and I also would need access to the submitted TF.
How can I confirm in which state/stage the Akamai provider is complaining?
How can I run prior to the Akamai validation step and also have access to the job TF ?
I think it might possibly work, if your custom provider wrote the credentials file as part of a Terraform data source, and returned the path to the file as a result attribute of the data source.
You might be able to test this out by using Terraform Registry, a provider that provides a data source that executes an external program that must return JSON on stdout.