Hi,
I’m in upgrading mu modules to TF 12 and for some reason, the provider AzureRM stoped to store the state file remotely even after initializing the backend correctly.
I’m using the backend partial configuration, as I was using in TF 11, but after to plan and apply the state file is saved locally and I’m not able to use the TF outputs for the other automation because Jenkins remove the workspace.
Here is the part of the code and how I’m initializing the backend.
providers.tf
terraform {
required_providers {
template = "~> 2.1.2"
azurerm = ">= 1.28"
}
required_version = ">= 0.12"
backend "azurerm" {}
}
and the command to initialize the TF using the backend file as parameter:
+ 0.12.0/terraform init -backend-config=westus/az-sandbox-01/s5-unixmanagedINT-rg-01/backend.config westus/az-sandbox-01/s5-unixmanagedINT-rg-01
Initializing modules...
Downloading git::ssh://git@github.XXXXX.com/dlrs/tf-azure-compute?ref=fjorg1_v0.12 for validation...
- validation in .terraform/modules/validation
Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "azurerm" (terraform-providers/azurerm) 1.31.0...
[...]
Then, after applying I got the following message
**Apply complete! Resources: 5 added, 0 changed, 0 destroyed.**
The state of your infrastructure has been saved to the path below. This state is required to modify and destroy your infrastructure, so keep it safe. To inspect the complete state use the `terraform show` command.
State path: terraform.tfstate
What can be wrong? I’m using exactly the same backend configuration than I was used to use in TF 0.11
The weird part is that file is not even being created remotely on the storage container.