-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specified workspace "name" conflicts with TF_WORKSPACE environment variable #508
Comments
@unkinected Sorry for running into this.. From the error message:
Looks like there is an existing env var |
Hi @magodo , yea, that was the first thing I checked. I do not have any environment variables named We use powershell as our cli and Note that I am able to add, remove, and alter my resources otherwise just fine. It's the aztfexport map command that is causing problems. |
Unfortunately, the environment variable |
I think you misunderstood. I don’t want to use the TF_WORKSPACE environment variable. I have never set that. I have the workspace specified in my terraform.tf file but yet aztfexport map seems to be ignoring it. Or misinterpreting it or something, thinking that there’s a conflict when there isn’t. This used to work fine and somehow stopped recently, even though my terraform.tf hasn’t changed. |
I'm not quite sure when this started, but all of a sudden I'm receiving an error when trying to import resources into Terraform.
I've essentially followed the Azure guide: https://learn.microsoft.com/en-us/azure/developer/terraform/azure-export-for-terraform/export-advanced-scenarios. To reproduce
This has worked fine up til now, though I'll admit it has been a little while since I've needed to do this. My terraform file hasn't changed:
I've tried setting a TF_WORKSPACE environment variable but that doesn't do anything. If I remove the workspaces block from terraform.tf I get a new error:
I was on an older version of aztfexport and just upgraded to 0.14.0, no change.
I was on terraform 1.6.6 and upgraded to 1.7.4, no change.
Any ideas? Generating the resource files works, but importing them into terraform state does not.
The text was updated successfully, but these errors were encountered: