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
