Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure CreateOrUpdate failing due to Updating State (subnets & security groups) #8931

Closed
rjinski opened this issue Sep 20, 2016 · 5 comments
Closed

Comments

@rjinski
Copy link

rjinski commented Sep 20, 2016

Terraform Version

Terraform v0.7.3

Affected Resource(s)

  • azurerm_subnet
  • azurerm_network_security_group
  • azurerm_network_security_rule

Terraform Configuration Files

configuration

Debug Output

debug

Expected Behavior

A successful build

Actual Behavior

Race conditions. Terraform is attempting to update a resource that is currently locked. Re-running terraform apply provides a successful execution.

Steps to Reproduce

  • terraform apply
  • wait for error
  • terraform apply

Thank you

@rjinski
Copy link
Author

rjinski commented Sep 21, 2016

A fix for this seems to be to chain the azurerm_network_security_rule with depends_on to stop them updating the azurerm_network_security_group in parallel.

@jen20
Copy link
Contributor

jen20 commented Sep 22, 2016

Hi @rjinski, thanks for the analysis and report! This is not easy to fix - Terraform does not have the concept of implicit dependencies in this manner, so we can't build them in automatically. However, we could catch the locked status and retry if it is detectable.

@rjinski
Copy link
Author

rjinski commented Sep 22, 2016

The work around didn't actually work around :(

It seems as thought it depends how quick Azure updates the status depends on the chance of success or not. Manually adding a creation order still results in possible "RetryableError". This isn't isolated to only security rules either. Routing rules seem to be showing a similar behaviour.

@tombuildsstuff
Copy link
Contributor

Hi @rjinski

Thanks for reporting this issue - apologies for the delay in getting back to you here!

Using the Terraform config posted above I'm able to replicate this bug using Terraform 0.9.3. Once retrying using the master branch, where PR #13637 has been merged in - I'm now unable to replicate this issue, and so I believe this has been fixed.

As such I'm going to close this issue :)

Thanks!

@ghost
Copy link

ghost commented Apr 13, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants