Blue Clouds
Blue Clouds

Reputation: 8161

What is the use of key property in terrform config

In this declaration, what is the use of key field? Can we give any value we like?

terraform {   backend "azurerm" {
    resource_group_name  = "StorageAccount-ResourceGroup"
    storage_account_name = "abcd1234"
    container_name       = "tfstate"
    key                  = "prod.terraform.tfstate"   } }

Upvotes: 0

Views: 746

Answers (1)

adp
adp

Reputation: 1271

The Key parameter keeps the Terraform state file name as a Blob within the Blob Container within the Blob Storage Account.

No matter which name you assign to Key, the TF state blob will be created with that name.

For a detailed explanation, you can refer to the documentation.

Upvotes: 3

Related Questions