go-tfe
go-tfe copied to clipboard
Update an error msg to avoid potential confusion
Description
This go-tfe error workspace is still being processed to discover resources
in combination with this provider-tfe error To delete this workspace without destroying the managed resources, add force_delete = true to the resource config
created confusion in a customer.
He thought that the latter error msg was saying that his workspace had resources, when in reality he had no resources. And then he thought that the former error msg was confirming that he had resources associated with that workspace, and that they were being processed.
The customer had the intuition that perhaps these were errors related to having a state version that is in middle of processing changes, but because the errors were saying something different, he opened a ticket with Support.
The change that I am making here is to clarify that, yes, what is "still being processed" is the state version. I was able to verify this by looking at the context where the atlas error is created.
And then I am making this change to provider-tfe to mention that force-delete option can be used for when a state version is being process or when a workspace has resources: https://github.com/hashicorp/terraform-provider-tfe/pull/1274
Testing plan
External links
Output from tests
Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.
$ TFE_ADDRESS="https://example" TFE_TOKEN="example" go test ./... -v -run TestFunctionsAffectedByChange
...