27.1 C
Dubai
Friday, April 26, 2024

Remote Backend State for Terraform stored in Azure Storage

Let’s see how to create a remote state in a storage account for terraform So that Azure DevOps Pipelines can utilize them.

Create a Storage Account

Leave things default

Leave things default

Enable Versioning for blobs.


Create Storage Account

Create Container named tfstatefiles

Created Service Connections

Update terraform with backend.tf

Terraform – Visual Studio Marketplace

Install Terraform DevOps Extensions

Make sure it runs on Azure Pipelines agent – like ubuntu

Apply

if you are using .tfvars

You can see the state file gets locked

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?