Terraform for Azure: State Management
Find a file
2025-07-25 16:02:47 +05:30
.gitignore Initial Commit 2025-07-24 01:56:40 +05:30
main.tf Initial Commit 2025-07-24 01:56:40 +05:30
output.tf Initial Commit 2025-07-24 01:56:40 +05:30
provider.tf Initial Commit 2025-07-24 01:56:40 +05:30
README.md Update: Include Usage Instructions 2025-07-25 16:02:47 +05:30
terraform.tfvars.example Initial Commit 2025-07-24 01:56:40 +05:30
variables.tf Initial Commit 2025-07-24 01:56:40 +05:30

Terraform: Azure: State Management

This repository contains IaC to provision state back-end for Terraform in Azure. It uses an Azure Storage Account to store the Terraform state files, which is a best practice for managing state in a collaborative environment.

  • Authors: PaperCloud Tech OSS Division
  • Created on: 07/24/2025

Usage

To use the provisioned back-end, use the following provider configuration. Please ensure you have necessary environment variables setup or follow the guide here to understand on how to setup the necessary credentials for Terraform to successfully use the back-end with Azure.

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "VERSION"
    }
  }

  backend "azurerm" {
    tenant_id            = "AZURE_TENANT_ID"
    client_id            = "AZURE_APP_CLIENT_ID"

    resource_group_name  = "AZURE_RG_NAME"
    storage_account_name = "AZURE_SA_NAME"
    container_name       = "AZURE_CONTAINER_NAME"
    key                  = "STATE_KEY"
  }
}

Reference

This document was solely created from Azure documentation on state management for Terraform. You can learn more about it here.