Open olfolfolf opened 3 weeks ago
Hi @olfolfolf ,
We tried to replicate your scenario and we did not encounter the error message which you observed.
We created a valid org role
with the sap/cloudfoundry
provider and then switched to the cloudfoundry/cloudfoundry
provider (with terraform init -upgrade
command).
We then tried 2 scenarios:
1) We then tried running terraform plan
. It was able to successfully read the status from the API and match against the state successfully.
2) We also tried to create a second org role
after the upgrade and this also worked without errors.
Can you please describe the setup/script you are using here and how you are upgrading? Is this on a pipeline or your laptop?
The error message you encountered occurs when you try to authenticate via a token or the provider picks the credentials used by CF-CLI from config.json. CF-CLI credentials is picked when an empty provider block is present in the script. Therefore our guess is that when trying to run the script with the new provider, somehow an empty provider block was provided, due to which the CF-CLI credentials were picked and not being logged in via CF-CLI would have caused the message to appear.
Is there an existing issue for this?
What version of the Terraform provider are you using?
1.0.0-rc1
What version of the Terraform CLI are you using?
1.9.8
What CF API version are you using?
3.178.0
What type of issue are you facing
regression (a behavior that used to work and stopped in a new version)
Describe the bug
As you wrote in README, the SAP provider is deprecated and we should switch official Cloud Foundry provider.
My old code is
I changed it to
Now I get the following error for ressource
cloudfoundry_org_role,
when runningterraform plan
(terraform init -upgrade
was run before):My provider config looks like this:
When I switch back to provider
SAP/cloudfoundry
, the error is gone.