Loading...
Loading...
Learn how Terraform tracks infrastructure with state files
Terraform state (terraform.tfstate) maps your configuration to real-world infrastructure. It's Terraform's source of truth.
terraform {
backend "azurerm" {
storage_account_name = "mytfstate"
container_name = "tfstate"
key = "prod.terraform.tfstate"
}
}terraform {
backend "azurerm" {
storage_account_name = "mytfstate${random_string.suffix.result}"
container_name = "tfbackend"
key = "dev.terraform.tfstate"
resource_group_name = "terraform-rg"
}
}