Body: <p>I am trying to deploy a VM in an existing availability set and VNET/SNET in a particular existing Resource Group I am using open source Terraform and my state file is stored in a storage container</p>
  <p>This is my pipeline file below</p>
  <pre><code>variables:
    - group: infra-variables
    
  trigger:
    branches:
      include:
      - master
    paths:
      include:
      - Terraform-Test 
      exclude:
      - README.md
    
  stages:
  - stage: Validate
    displayName: Validate
    jobs:
    - job: validate
      pool:
        vmImage: ubuntu-latest
      steps:
      - checkout : self 
      # - task: AzureCLI@2
      #   displayName : 
      #   inputs:
      #     azureSubscription: 'PalTest'
      #     scriptType: 'bash'
      #     scriptLocation: 'inlineScript'
      #     inlineScript: |
      #       az account set --subscription $AZURE_SUBSCRIPTION_ID
      #       az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET --tenant $AZURE_TENANT_ID 
      #       STORAGE_ACCOUNT_KEY=$(az storage account keys list -g $(Terraform_Backend_RG) -n $(TF_STATE_BLOB_ACCOUNT_NAME) | jq &quot;.[0].value&quot; -r)
      #       echo &quot;setting storage account key variable&quot;
      #       echo &quot;##vso[task.setvariable variable=ARM_ACCESS_KEY;issecret=true]$ARM_ACCESS_KEY&quot;
  
      - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
        displayName: Install Terraform
        inputs:
          terraformVersion: 'latest'
  
  
    # Init
      - task: TerraformCLI@0
        displayName: Terraform Init
        inputs:
          backendType : 'azurerm'
          command: 'init'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
          backendServiceArm: 'Pallab-ADO-Setup'
          backendAzureRmResourceGroupName: $(Terraform_Backend_RG)
          backendAzureRmStorageAccountName: $(TF_STATE_BLOB_ACCOUNT_NAME)
          backendAzureRmContainerName: $(TF_STATE_BLOB_CONTAINER_NAME)
          backendAzureRmKey: 'infrastructure/terraform.ntfstate'
          
  
    # Validate
      - task: TerraformCLI@0
        displayName: Validate Config
        inputs:
          command: 'validate'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
  
  - stage: Plan
    displayName: Plan
    jobs:
    - job: plan
      pool:
        vmImage: ubuntu-latest
      steps:
      - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
        displayName: Install Terraform
        inputs:
          terraformVersion: 'latest'
  
    # Init
      - task: TerraformCLI@0
        displayName: Terraform Init
        inputs:
          backendType : 'azurerm'
          command: 'init'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
          backendServiceArm: 'Pallab-ADO-Setup'
          backendAzureRmResourceGroupName: $(Terraform_Backend_RG)
          backendAzureRmStorageAccountName: $(TF_STATE_BLOB_ACCOUNT_NAME)
          backendAzureRmContainerName: $(TF_STATE_BLOB_CONTAINER_NAME)
          backendAzureRmKey: 'infrastructure/terraform.ntfstate'
  
    # Plan
      - task: TerraformCLI@0
        displayName: Plan Terraform Deployment
        inputs:
          backendType : 'azurerm'
          command: 'plan'
          commandOptions: '-input=false'
          environmentServiceName : 'Pallab-ADO-Setup'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
          # backendServiceArm: 'PalTest'
          # backendAzureRmResourceGroupName: $(Terraform_Backend_RG)
          # backendAzureRmStorageAccountName: $(TF_STATE_BLOB_ACCOUNT_NAME)
          # backendAzureRmContainerName: $(TF_STATE_BLOB_CONTAINER_NAME)
          # backendAzureRmKey: 'infrastructure/terraform.tfstate'
  
  # Approve
  - stage: Approve
    displayName: Approve
    jobs:
    - job: approve
      displayName: Wait for approval
      pool: server
      steps: 
      - task: ManualValidation@0
        timeoutInMinutes: 60
        inputs:
          notifyUsers: 'pallabcd@hotmail.com'
          instructions: 'Review the plan in the next hour'
  
  - stage: Apply
    displayName: Apply
    jobs:
    - job: apply
      pool:
        vmImage: ubuntu-latest
      steps:
        - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
          displayName: Install Terraform
          inputs:
            terraformVersion: 'latest'
        
        # Init
        - task: TerraformCLI@0
          displayName: TF Init 
          env:
            ARM_SAS_TOKEN: $(ARM_ACCESS_KEY)
          inputs:
            command: 'init'
            workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
            commandOptions: '-backend-config=storage_account_name=$(TF_STATE_BLOB_ACCOUNT_NAME) -backend-config=container_name=$(TF_STATE_BLOB_CONTAINER_NAME) -backend-config=key=$(ARM_ACCESS_KEY)'
            backendType: 'selfConfigured'
  
  
        # Apply
        - task: TerraformCLI@0
          displayName: TF Apply 
          env:
            ARM_SAS_TOKEN: $(ARM_ACCESS_KEY)
            ARM_CLIENT_ID: $(AZURE_CLIENT_ID)
            ARM_CLIENT_SECRET: $(AZURE_CLIENT_SECRET)
            ARM_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
            ARM_TENANT_ID: $(AZURE_TENANT_ID)
          inputs:
            command: 'apply'
            workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
            commandOptions: '-auto-approve'
  </code></pre>
  <p>The Plan Stage shows three resources are getting created successfully &quot;Terraform Init&quot; under Plan stage shows the below out put :</p>
  <pre><code>/opt/hostedtoolcache/terraform/1.9.5/x64/terraform init -backend-config=storage_account_name=glcontoso -backend-config=container_name=markdev -backend-config=key=infrastructure/terraform.ntfstate -backend-config=resource_group_name=CKA-Rg -backend-config=subscription_id=*** -backend-config=tenant_id=*** -backend-config=client_id=*** -backend-config=client_secret=***
  Initializing the backend...
  
  Successfully configured the backend &quot;azurerm&quot;! Terraform will automatically
  use this backend unless the backend configuration changes.
  Initializing provider plugins...
  - Finding hashicorp/azurerm versions matching &quot;~&gt; 2.0&quot;...
  - Finding hashicorp/azuread versions matching &quot;~&gt; 2.0&quot;...
  - Installing hashicorp/azurerm v2.99.0...
  - Installed hashicorp/azurerm v2.99.0 (signed by HashiCorp)
  - Installing hashicorp/azuread v2.53.1...
  - Installed hashicorp/azuread v2.53.1 (signed by HashiCorp)
  Terraform has created a lock file .terraform.lock.hcl to record the provider
  selections it made above. Include this file in your version control repository
  so that Terraform can guarantee to make the same selections by default when
  you run &quot;terraform init&quot; in the future.
  
  Terraform has been successfully initialized!
  </code></pre>
  <p>But TF init is failing in the apply stage The error that it throws is given below</p>
  <pre><code>##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]executed command 'init'
  ##[debug]set TERRAFORM_LAST_EXITCODE=1
  ##[debug]Processed: ##vso[task.setvariable variable=TERRAFORM_LAST_EXITCODE;isOutput=false;issecret=false;]1
  ##[debug]task result: Failed
  ##[error]╷
  │ Error: Failed to get existing workspaces: containers.Client#ListBlobs: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code=&quot;ResourceNotFound&quot; Message=&quot;The specified resource does not exist.\nRequestId:548f5df2-901e-005b-5bb8-fcf38a000000\nTime:2024-09-01T21:45:01.8826214Z&quot;
  │ 
  │ 
  ╵
  
  ##[debug]Processed: ##vso[task.issue type=error;]╷
  │ Error: Failed to get existing workspaces: containers.Client#ListBlobs: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code=&quot;ResourceNotFound&quot; Message=&quot;The specified resource does not exist.\nRequestId:548f5df2-901e-005b-5bb8-fcf38a000000\nTime:2024-09-01T21:45:01.8826214Z&quot;
  │ 
  │ 
  </code></pre>
  <p>I then changed the Access Level in the Storage Account to :</p>
  <p>&quot;Container(anonymous read access for containers and blobs)</p>
  <p>Now i am getting the below error :</p>
  <pre><code>##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]executed command 'init'
  ##[debug]set TERRAFORM_LAST_EXITCODE=1
  ##[debug]Processed: ##vso[task.setvariable variable=TERRAFORM_LAST_EXITCODE;isOutput=false;issecret=false;]1
  ##[debug]task result: Failed
  ##[error]╷
  │ Error: Error loading state: failed to lock azure state: blobs.Client#PutBlockBlob: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code=&quot;ResourceNotFound&quot; Message=&quot;The specified resource does not exist.\nRequestId:0c2f1a76-601e-003d-0ebf-fcbcaa000000\nTime:2024-09-01T22:40:47.8315889Z&quot;
  │ blobs.Client#GetProperties: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: error response cannot be parsed: {&quot;&quot; '\x00' '\x00'} error: EOF
  │ 
  │ 
  ╵
  
  ##[debug]Processed: ##vso[task.issue type=error;]╷
  │ Error: Error loading state: failed to lock azure state: blobs.Client#PutBlockBlob: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code=&quot;ResourceNotFound&quot; Message=&quot;The specified resource does not exist.\nRequestId:0c2f1a76-601e-003d-0ebf-fcbcaa000000\nTime:2024-09-01T22:40:47.8315889Z&quot;
  │ blobs.Client#GetProperties: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: error response cannot be parsed: {&quot;&quot; '\x00' '\x00'} error: EOF
  │ 
  │ 
  ╵
  
  ##[debug]Processed: ##vso[task.complete result=Failed;]╷
  │ Error: Error loading state: failed to lock azure state: blobs.Client#PutBlockBlob: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code=&quot;ResourceNotFound&quot; Message=&quot;The specified resource does not exist.\nRequestId:0c2f1a76-601e-003d-0ebf-fcbcaa000000\nTime:2024-09-01T22:40:47.8315889Z&quot;
  │ blobs.Client#GetProperties: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: error response cannot be parsed: {&quot;&quot; '\x00' '\x00'} error: EOF
  │ 
  </code></pre>
  
Comments: CC BY-SA 4.0
Comments: 2024-09-03T16:42:43.810Z
Comments: Can you also share your Terraform code, please?
Comments: James Geddes
Comments: CC BY-SA 4.0
Comments: 2024-09-03T16:45:20.663Z
Comments: Why are you running `terraform init` more than once?
Comments: James Geddes
Comments: CC BY-SA 4.0
Comments: 2024-09-03T16:49:58.127Z
Comments: Also, it is now generally considered bad practice to use Terraform workspaces, see https://www.youtube.com/watch?v=6QgHLncP5VA and https://developer.hashicorp.com/terraform/cli/workspaces#when-not-to-use-multiple-workspaces
Comments: James Geddes
Tags: <terraform><azure-devops><azure><azure-pipelines><terraform-workspace>
Title: Azure DevOps Pipeline Throwing Error while trying to deploy a VM to Azure
UserDisplayName: Pallab
ThreadText: # Azure DevOps Pipeline Throwing Error while trying to deploy a VM to Azure
  
  (Asked by: username_0 on 2024-09-01)
  
  I am trying to deploy a VM in an existing availability set and VNET/SNET in a particular existing Resource Group I am using open source Terraform and my state file is stored in a storage container
  
  This is my pipeline file below
  
  ```
  variables:
    - group: infra-variables
    
  trigger:
    branches:
      include:
      - master
    paths:
      include:
      - Terraform-Test 
      exclude:
      - README.md
    
  stages:
  - stage: Validate
    displayName: Validate
    jobs:
    - job: validate
      pool:
        vmImage: ubuntu-latest
      steps:
      - checkout : self 
      # - task: AzureCLI@2
      #   displayName : 
      #   inputs:
      #     azureSubscription: 'PalTest'
      #     scriptType: 'bash'
      #     scriptLocation: 'inlineScript'
      #     inlineScript: |
      #       az account set --subscription $AZURE_SUBSCRIPTION_ID
      #       az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET --tenant $AZURE_TENANT_ID 
      #       STORAGE_ACCOUNT_KEY=$(az storage account keys list -g $(Terraform_Backend_RG) -n $(TF_STATE_BLOB_ACCOUNT_NAME) | jq ".[0].value" -r)
      #       echo "setting storage account key variable"
      #       echo "##vso[task.setvariable variable=ARM_ACCESS_KEY;issecret=true]$ARM_ACCESS_KEY"
  
      - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
        displayName: Install Terraform
        inputs:
          terraformVersion: 'latest'
  
    # Init
      - task: TerraformCLI@0
        displayName: Terraform Init
        inputs:
          backendType : 'azurerm'
          command: 'init'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
          backendServiceArm: 'username_0-ADO-Setup'
          backendAzureRmResourceGroupName: $(Terraform_Backend_RG)
          backendAzureRmStorageAccountName: $(TF_STATE_BLOB_ACCOUNT_NAME)
          backendAzureRmContainerName: $(TF_STATE_BLOB_CONTAINER_NAME)
          backendAzureRmKey: 'infrastructure/terraform.ntfstate'
          
  
    # Validate
      - task: TerraformCLI@0
        displayName: Validate Config
        inputs:
          command: 'validate'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
  
  - stage: Plan
    displayName: Plan
    jobs:
    - job: plan
      pool:
        vmImage: ubuntu-latest
      steps:
      - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
        displayName: Install Terraform
        inputs:
          terraformVersion: 'latest'
  
    # Init
      - task: TerraformCLI@0
        displayName: Terraform Init
        inputs:
          backendType : 'azurerm'
          command: 'init'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
          backendServiceArm: 'username_0-ADO-Setup'
          backendAzureRmResourceGroupName: $(Terraform_Backend_RG)
          backendAzureRmStorageAccountName: $(TF_STATE_BLOB_ACCOUNT_NAME)
          backendAzureRmContainerName: $(TF_STATE_BLOB_CONTAINER_NAME)
          backendAzureRmKey: 'infrastructure/terraform.ntfstate'
  
    # Plan
      - task: TerraformCLI@0
        displayName: Plan Terraform Deployment
        inputs:
          backendType : 'azurerm'
          command: 'plan'
          commandOptions: '-input=false'
          environmentServiceName : 'username_0-ADO-Setup'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
          # backendServiceArm: 'PalTest'
          # backendAzureRmResourceGroupName: $(Terraform_Backend_RG)
          # backendAzureRmStorageAccountName: $(TF_STATE_BLOB_ACCOUNT_NAME)
          # backendAzureRmContainerName: $(TF_STATE_BLOB_CONTAINER_NAME)
          # backendAzureRmKey: 'infrastructure/terraform.tfstate'
  
  # Approve
  - stage: Approve
    displayName: Approve
    jobs:
    - job: approve
      displayName: Wait for approval
      pool: server
      steps: 
      - task: ManualValidation@0
        timeoutInMinutes: 60
        inputs:
          notifyUsers: 'pallabcd@hotmail.com'
          instructions: 'Review the plan in the next hour'
  
  - stage: Apply
    displayName: Apply
    jobs:
    - job: apply
      pool:
        vmImage: ubuntu-latest
      steps:
        - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
          displayName: Install Terraform
          inputs:
            terraformVersion: 'latest'
        
        # Init
        - task: TerraformCLI@0
          displayName: TF Init 
          env:
            ARM_SAS_TOKEN: $(ARM_ACCESS_KEY)
          inputs:
            command: 'init'
            workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
            commandOptions: '-backend-config=storage_account_name=$(TF_STATE_BLOB_ACCOUNT_NAME) -backend-config=container_name=$(TF_STATE_BLOB_CONTAINER_NAME) -backend-config=key=$(ARM_ACCESS_KEY)'
            backendType: 'selfConfigured'
  
        # Apply
        - task: TerraformCLI@0
          displayName: TF Apply 
          env:
            ARM_SAS_TOKEN: $(ARM_ACCESS_KEY)
            ARM_CLIENT_ID: $(AZURE_CLIENT_ID)
            ARM_CLIENT_SECRET: $(AZURE_CLIENT_SECRET)
            ARM_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
            ARM_TENANT_ID: $(AZURE_TENANT_ID)
          inputs:
            command: 'apply'
            workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform-Test'
            commandOptions: '-auto-approve'
  
  ```
  
  The Plan Stage shows three resources are getting created successfully "Terraform Init" under Plan stage shows the below out put :
  
  ```
  /opt/hostedtoolcache/terraform/1.9.5/x64/terraform init -backend-config=storage_account_name=glcontoso -backend-config=container_name=markdev -backend-config=key=infrastructure/terraform.ntfstate -backend-config=resource_group_name=CKA-Rg -backend-config=subscription_id=*** -backend-config=tenant_id=*** -backend-config=client_id=*** -backend-config=client_secret=***
  Initializing the backend...
  
  Successfully configured the backend "azurerm"! Terraform will automatically
  use this backend unless the backend configuration changes.
  Initializing provider plugins...
  - Finding hashicorp/azurerm versions matching "~> 2.0"...
  - Finding hashicorp/azuread versions matching "~> 2.0"...
  - Installing hashicorp/azurerm v2.99.0...
  - Installed hashicorp/azurerm v2.99.0 (signed by HashiCorp)
  - Installing hashicorp/azuread v2.53.1...
  - Installed hashicorp/azuread v2.53.1 (signed by HashiCorp)
  Terraform has created a lock file .terraform.lock.hcl to record the provider
  selections it made above. Include this file in your version control repository
  so that Terraform can guarantee to make the same selections by default when
  you run "terraform init" in the future.
  
  Terraform has been successfully initialized!
  
  ```
  
  But TF init is failing in the apply stage The error that it throws is given below
  
  ```
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]executed command 'init'
  ##[debug]set TERRAFORM_LAST_EXITCODE=1
  ##[debug]Processed: ##vso[task.setvariable variable=TERRAFORM_LAST_EXITCODE;isOutput=false;issecret=false;]1
  ##[debug]task result: Failed
  ##[error]╷
  │ Error: Failed to get existing workspaces: containers.Client#ListBlobs: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The specified resource does not exist.\nRequestId:548f5df2-901e-005b-5bb8-fcf38a000000\nTime:2024-09-01T21:45:01.8826214Z"
  │ 
  │ 
  ╵
  
  ##[debug]Processed: ##vso[task.issue type=error;]╷
  │ Error: Failed to get existing workspaces: containers.Client#ListBlobs: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The specified resource does not exist.\nRequestId:548f5df2-901e-005b-5bb8-fcf38a000000\nTime:2024-09-01T21:45:01.8826214Z"
  │ 
  │ 
  
  ```
  
  I then changed the Access Level in the Storage Account to :
  
  "Container(anonymous read access for containers and blobs)
  
  Now i am getting the below error :
  
  ```
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]backendType=selfConfigured
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]command=init
  ##[debug]executed command 'init'
  ##[debug]set TERRAFORM_LAST_EXITCODE=1
  ##[debug]Processed: ##vso[task.setvariable variable=TERRAFORM_LAST_EXITCODE;isOutput=false;issecret=false;]1
  ##[debug]task result: Failed
  ##[error]╷
  │ Error: Error loading state: failed to lock azure state: blobs.Client#PutBlockBlob: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The specified resource does not exist.\nRequestId:0c2f1a76-601e-003d-0ebf-fcbcaa000000\nTime:2024-09-01T22:40:47.8315889Z"
  │ blobs.Client#GetProperties: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: error response cannot be parsed: {"" '\x00' '\x00'} error: EOF
  │ 
  │ 
  ╵
  
  ##[debug]Processed: ##vso[task.issue type=error;]╷
  │ Error: Error loading state: failed to lock azure state: blobs.Client#PutBlockBlob: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The specified resource does not exist.\nRequestId:0c2f1a76-601e-003d-0ebf-fcbcaa000000\nTime:2024-09-01T22:40:47.8315889Z"
  │ blobs.Client#GetProperties: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: error response cannot be parsed: {"" '\x00' '\x00'} error: EOF
  │ 
  │ 
  ╵
  
  ##[debug]Processed: ##vso[task.complete result=Failed;]╷
  │ Error: Error loading state: failed to lock azure state: blobs.Client#PutBlockBlob: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The specified resource does not exist.\nRequestId:0c2f1a76-601e-003d-0ebf-fcbcaa000000\nTime:2024-09-01T22:40:47.8315889Z"
  │ blobs.Client#GetProperties: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: error response cannot be parsed: {"" '\x00' '\x00'} error: EOF
  │ 
  
  ```
  
  **Tags:** terraform, azure-devops, azure, azure-pipelines, terraform-workspace
  
  > **Comments:**
  > **username_1**: Can you also share your Terraform code, please?  
  > **username_1**: Why are you running `terraform init` more than once?  
  > **username_1**: Also, it is now generally considered bad practice to use Terraform workspaces, see https://www.youtube.com/watch?v=6QgHLncP5VA and https://developer.hashicorp.com/terraform/cli/workspaces#when-not-to-use-multiple-workspaces  
  
  ---
  
  ## 0 answers
  
  