Open dex4er opened 1 year ago
Suggestion:
See https://github.com/hashicorp/terraform/blob/main/internal/cloud/state.go#L412-L422
Instead of throwing an error it should be (nil, nil)
returned.
:wave: Hi Piotr!
Thanks for submitting this issue. Most if not all of TFC's endpoints return 404s if either the user is not authorized or the resource itself was not found, see status code table for Show Current State Version Outputs for a Workspace. Unfortunately the client is unable to make this distinction, so we couldn't necessarily ignore a "not found" error here and return nil, nil
.
Hopefully this clears things up for you! :smile:
@sebasslash Ok, but there is still a bug: TFC behaves differently than Terraform without TFC when I run terraform output
. It breaks my pipelines when I call terraform output
after terraform plan
for fresh projects without a stored state.
Is there any possibility to create a state version with Terraform just after a new workspace is created? I don't see anything like that in a documentation for terraform-provider-tfe
Terraform Version
Terraform Configuration Files
Debug Output
nothing special
Expected Behavior
Actual Behavior
Steps to Reproduce
then
Additional Context
No response
References
No response