Hi All,
========= Works Fine to fetch state list
$ pwd
/home/devops/webmodule/
$ /usr/local/bin/terraform init -backend=true --backend-config=./sim/eastus/backend.tfvars
$ /usr/local/bin/terraform state list
module.azurerm_image.image
========= does not fetch fetch state list, whereas TF, plan apply works with nodule directory
$ pwd
/home/devops/web01/
# /usr/local/bin/terraform init -backend=true --backend-config=./sim/eastus/backend.tfvars ../webmodule/
# /usr/local/bin/terraform state list
Backend reinitialization required. Please run "terraform init".
Reason: Unsetting the previously set backend "azurerm"
The "backend" is the interface that Terraform uses to store state,
perform operations, etc. If this message is showing up, it means that the
Terraform configuration you're using is using a custom configuration for
the Terraform backend.
Changes to backend configurations require reinitialization. This allows
Terraform to setup the new configuration, copy existing state, etc. This is
only done during "terraform init". Please run that command now then try again.
If the change reason above is incorrect, please verify your configuration
hasn't changed and try again. At this point, no changes to your existing
configuration or state have been made.
Failed to load backend: Initialization required. Please see the error message above.
Thanks,
Dhinesh