Skip to content

ekristen/bug-terraform-azurerm-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of Terraform AzureRM Lock Bug

This is a repository to reproduce the azurerm lock bug.

Issue 17565

Overview

  • This doesn't always trigger the problem.
  • Parallelism tends to have an impact on RetryableErrors
    • Reducing to 5 seems to help with this.

Usage

There's a nice helper script that just loops through plans/apply/destroy, as soon as an error is encountered it exits.

Note: this assumes you have all the appropriate environment variables set for authenticating to Azure.

bash run.sh

Authenticating

The script and the entire project for reproducing uses a service principal.

export ARM_TENANT_ID="<tenant-id>"
export ARM_CLIENT_ID="<client-id>"
export ARM_CLIENT_SECRET="<client-secret>"
export ARM_SUBSCRIPTION_ID="<subscription-id>"

Logs / Evidence

As errors are encountered they are placed into the logs/ directory.

Runs

Note: distinct runs for errors.

Errors

  • Error: waiting for completion of Security Group Association for Network Interface: (Name "test-tpl-terraform-azure-j0xyh-private-server" / Resource Group "test-tpl-terraform-azure-j0xyh"): Code="InternalServerError" Message="An error occurred." Details=[]
  • Error: waiting for update of Network Interface: (Name "tf-azure-lock-bug-wmoql-private" / Resource Group "tf-azure-lock-bug-wmoql"): Code="OperationNotAllowed" Message="Operation 'startTenantUpdate' is not allowed on VM 'tf-azure-lock-bug-wmoql-private' since the VM is marked for deletion. You can only retry the Delete operation (or wait for an ongoing one to complete)." Details=[]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published