You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
�[31m│�[0m �[0m�[1m�[31mError: �[0m�[0m�[1mBackend initialization required, please run "terraform init"�[0m
�[31m│�[0m �[0m
�[31m│�[0m �[0m�[0mReason: Initial configuration of the requested backend "gcs"
�[31m│�[0m �[0m
�[31m│�[0m �[0mThe "backend" is the interface that Terraform uses to store state,
�[31m│�[0m �[0mperform operations, etc. If this message is showing up, it means that the
�[31m│�[0m �[0mTerraform configuration you're using is using a custom configuration for
�[31m│�[0m �[0mthe Terraform backend.
�[31m│�[0m �[0m
�[31m│�[0m �[0mChanges to backend configurations require reinitialization. This allows
�[31m│�[0m �[0mTerraform to set up the new configuration, copy existing state, etc. Please
�[31m│�[0m �[0mrun
�[31m│�[0m �[0m"terraform init" with either the "-reconfigure" or "-migrate-state" flags
�[31m│�[0m �[0mto
�[31m│�[0m �[0muse the current configuration.
�[31m│�[0m �[0m
�[31m│�[0m �[0mIf the change reason above is incorrect, please verify your configuration
�[31m│�[0m �[0mhasn't changed and try again. At this point, no changes to your existing
�[31m│�[0m �[0mconfiguration or state have been made.
�[31m╵�[0m�[0m
�[0m�[0m```
This is how the atlantis.yaml configuration looks like
### Overview of the Issue
I was using the `default` workspace and recently started using the custom workspace, e.g. `xyz`
I have copied the state file in the gcs bucket from `default.tfstate` to `xyz.tfstate`
It works fine from the local system while using the workspace `xyz`. While using the atlantis, I see above weird output.
However, Atlantis plan and apply works fine but I don't want to see that irrelevant output in my plan.
I am using Terraform `0.13.7`
The text was updated successfully, but these errors were encountered:
@Jenishk56 I too ran into trouble when switching from default to a new workspace. This is because atlantis is setting the TF_WORKSPACE env. There is a PR open #1578 to fix this. Meanwhile instead of running terraform workspace new $WORKSPACE || true; rm -rf .terraform/" you can unset the TF_WORKSPACE env variable in your atlantis.yalm file. I'm adding my sample atlantis.yaml file here.
Community Note
dir: xyz
workflow: xyz
workspace: xyz
terraform_version: 0.13.7
xyz:
plan:
steps:
- run: "terraform workspace new $WORKSPACE || true; rm -rf .terraform/"=
- init:
extra_args: ["-lock=false", "-reconfigure"]
- plan:
extra_args: ["-lock=false"]
apply:
steps:
- apply:
extra_args: ["-lock=false"]
The text was updated successfully, but these errors were encountered: