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

azurerm_network_security_group_association - prevent deadlock between association and network interface creation #4501

Merged
merged 3 commits into from
Oct 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ func resourceArmSubnetNetworkSecurityGroupAssociationCreate(d *schema.ResourceDa
virtualNetworkName := parsedSubnetId.Path["virtualNetworks"]
resourceGroup := parsedSubnetId.ResourceGroup

locks.ByName(virtualNetworkName, virtualNetworkResourceName)
defer locks.UnlockByName(virtualNetworkName, virtualNetworkResourceName)

locks.ByName(subnetName, subnetResourceName)
defer locks.UnlockByName(subnetName, subnetResourceName)

locks.ByName(virtualNetworkName, virtualNetworkResourceName)
defer locks.UnlockByName(virtualNetworkName, virtualNetworkResourceName)

subnet, err := client.Get(ctx, resourceGroup, virtualNetworkName, subnetName, "")
if err != nil {
if utils.ResponseWasNotFound(subnet.Response) {
Expand Down