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

WIP: azurerm_private_endpoint: Retry on "RetryableError" and "StorageAccountOperationInProgress" errors during LRO #28112

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Nov 26, 2024

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

This PR makes azurerm_private_endpoint retry on "RetryableError" and "StorageAccountOperationInProgress" errors during LRO.

Depends on hashicorp/go-azure-sdk#1124

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)
Plan: 28 to add, 0 to change, 0 to destroy.
2024-11-26T14:47:53.547+1100 [INFO]  provider: configuring client automatic mTLS
2024-11-26T14:47:53.592+1100 [INFO]  provider.terraform-provider-azurerm: configuring server automatic mTLS: timestamp="2024-11-26T14:47:53.592+1100"
azurerm_virtual_network.example: Creating...
azurerm_virtual_network.example: Creation complete after 6s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11]
azurerm_subnet.example["ssub9"]: Creating...
azurerm_subnet.example["ssub8"]: Creating...
azurerm_subnet.example["ssub7"]: Creating...
azurerm_subnet.example["ssub1"]: Creating...
2024-11-26T14:48:00.386+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
azurerm_subnet.example["ssub2"]: Creating...
azurerm_subnet.example["ssub3"]: Creating...
azurerm_subnet.example["ssub6"]: Creating...
azurerm_subnet.example["ssub5"]: Creating...
azurerm_subnet.example["ssub4"]: Creating...
2024-11-26T14:48:00.387+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
2024-11-26T14:48:00.387+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
2024-11-26T14:48:00.387+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
2024-11-26T14:48:00.387+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
2024-11-26T14:48:00.387+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
2024-11-26T14:48:00.387+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
2024-11-26T14:48:00.388+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
2024-11-26T14:48:00.388+1100 [INFO]  provider.terraform-provider-azurerm: [INFO] preparing arguments for Azure ARM Subnet creation.
azurerm_subnet.example["ssub1"]: Creation complete after 6s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub1]
azurerm_subnet.example["ssub7"]: Still creating... [10s elapsed]
azurerm_subnet.example["ssub5"]: Still creating... [10s elapsed]
azurerm_subnet.example["ssub3"]: Still creating... [10s elapsed]
azurerm_subnet.example["ssub9"]: Still creating... [10s elapsed]
azurerm_subnet.example["ssub6"]: Still creating... [10s elapsed]
azurerm_subnet.example["ssub8"]: Still creating... [10s elapsed]
azurerm_subnet.example["ssub4"]: Still creating... [10s elapsed]
azurerm_subnet.example["ssub2"]: Still creating... [10s elapsed]
azurerm_subnet.example["ssub6"]: Creation complete after 12s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub6]
azurerm_subnet.example["ssub3"]: Creation complete after 16s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub3]
azurerm_subnet.example["ssub4"]: Still creating... [20s elapsed]
azurerm_subnet.example["ssub9"]: Still creating... [20s elapsed]
azurerm_subnet.example["ssub2"]: Still creating... [20s elapsed]
azurerm_subnet.example["ssub5"]: Still creating... [20s elapsed]
azurerm_subnet.example["ssub8"]: Still creating... [20s elapsed]
azurerm_subnet.example["ssub7"]: Still creating... [20s elapsed]
azurerm_subnet.example["ssub9"]: Creation complete after 20s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub9]
azurerm_subnet.example["ssub8"]: Creation complete after 24s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub8]
azurerm_subnet.example["ssub7"]: Creation complete after 28s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub7]
azurerm_subnet.example["ssub4"]: Still creating... [30s elapsed]
azurerm_subnet.example["ssub5"]: Still creating... [30s elapsed]
azurerm_subnet.example["ssub2"]: Still creating... [30s elapsed]
azurerm_subnet.example["ssub4"]: Creation complete after 33s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub4]
azurerm_subnet.example["ssub5"]: Creation complete after 38s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub5]
azurerm_subnet.example["ssub2"]: Still creating... [40s elapsed]
azurerm_subnet.example["ssub2"]: Creation complete after 43s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub2]
azurerm_subnet_network_security_group_association.example["ssub2"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub7"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub9"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub5"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub8"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub1"]: Creating...
azurerm_private_endpoint.example["ssub4"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub6"]: Creating...
azurerm_private_endpoint.example["ssub9"]: Creating...
azurerm_private_endpoint.example["ssub6"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub3"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub4"]: Creating...
azurerm_private_endpoint.example["ssub7"]: Creating...
azurerm_private_endpoint.example["ssub3"]: Creating...
azurerm_private_endpoint.example["ssub2"]: Creating...
azurerm_private_endpoint.example["ssub1"]: Creating...
azurerm_private_endpoint.example["ssub5"]: Creating...
azurerm_private_endpoint.example["ssub8"]: Creating...
azurerm_subnet_network_security_group_association.example["ssub7"]: Creation complete after 4s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub7]
azurerm_subnet_network_security_group_association.example["ssub2"]: Still creating... [9s elapsed]
azurerm_subnet_network_security_group_association.example["ssub5"]: Still creating... [9s elapsed]
azurerm_subnet_network_security_group_association.example["ssub1"]: Still creating... [9s elapsed]
azurerm_subnet_network_security_group_association.example["ssub9"]: Still creating... [9s elapsed]
azurerm_subnet_network_security_group_association.example["ssub8"]: Still creating... [9s elapsed]
azurerm_subnet_network_security_group_association.example["ssub6"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub4"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub9"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub8"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub2"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub3"]: Still creating... [9s elapsed]
azurerm_subnet_network_security_group_association.example["ssub4"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub1"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub5"]: Still creating... [9s elapsed]
azurerm_subnet_network_security_group_association.example["ssub3"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub6"]: Still creating... [9s elapsed]
azurerm_private_endpoint.example["ssub7"]: Still creating... [9s elapsed]
azurerm_subnet_network_security_group_association.example["ssub2"]: Creation complete after 9s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub2]
azurerm_subnet_network_security_group_association.example["ssub6"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub7"]: Still creating... [19s elapsed]
azurerm_subnet_network_security_group_association.example["ssub9"]: Still creating... [19s elapsed]
azurerm_subnet_network_security_group_association.example["ssub5"]: Still creating... [19s elapsed]
azurerm_subnet_network_security_group_association.example["ssub8"]: Still creating... [19s elapsed]
azurerm_subnet_network_security_group_association.example["ssub1"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub4"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub5"]: Still creating... [19s elapsed]
azurerm_subnet_network_security_group_association.example["ssub3"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub6"]: Still creating... [19s elapsed]
azurerm_subnet_network_security_group_association.example["ssub4"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub1"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub9"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub8"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub3"]: Still creating... [19s elapsed]
azurerm_private_endpoint.example["ssub2"]: Still creating... [19s elapsed]
2024-11-26T14:49:03.419+1100 [WARN]  provider.terraform-provider-azurerm: [WARN] Retry polling "Private Endpoint (Subscription: \"xxxx\"\nResource Group Name: \"acctest-mgd-petestt4\"\nPrivate Endpoint Name: \"example-endpoint-in-ssub3\")" on error code: "RetryableError"
azurerm_subnet_network_security_group_association.example["ssub1"]: Creation complete after 22s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub1]
azurerm_subnet_network_security_group_association.example["ssub5"]: Creation complete after 27s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub5]
azurerm_private_endpoint.example["ssub2"]: Still creating... [29s elapsed]
azurerm_private_endpoint.example["ssub3"]: Still creating... [29s elapsed]
azurerm_private_endpoint.example["ssub6"]: Still creating... [29s elapsed]
azurerm_private_endpoint.example["ssub7"]: Still creating... [29s elapsed]
azurerm_subnet_network_security_group_association.example["ssub3"]: Still creating... [29s elapsed]
azurerm_private_endpoint.example["ssub1"]: Still creating... [29s elapsed]
azurerm_private_endpoint.example["ssub9"]: Still creating... [29s elapsed]
azurerm_private_endpoint.example["ssub8"]: Still creating... [29s elapsed]
azurerm_subnet_network_security_group_association.example["ssub4"]: Still creating... [29s elapsed]
azurerm_private_endpoint.example["ssub4"]: Still creating... [29s elapsed]
azurerm_private_endpoint.example["ssub5"]: Still creating... [29s elapsed]
azurerm_subnet_network_security_group_association.example["ssub8"]: Still creating... [29s elapsed]
azurerm_subnet_network_security_group_association.example["ssub6"]: Still creating... [29s elapsed]
azurerm_subnet_network_security_group_association.example["ssub9"]: Still creating... [29s elapsed]
azurerm_subnet_network_security_group_association.example["ssub9"]: Creation complete after 35s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub9]
azurerm_subnet_network_security_group_association.example["ssub6"]: Still creating... [38s elapsed]
azurerm_subnet_network_security_group_association.example["ssub8"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub6"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub8"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub7"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub1"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub4"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub3"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub5"]: Still creating... [38s elapsed]
azurerm_subnet_network_security_group_association.example["ssub4"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub2"]: Still creating... [38s elapsed]
azurerm_subnet_network_security_group_association.example["ssub3"]: Still creating... [38s elapsed]
azurerm_private_endpoint.example["ssub9"]: Still creating... [38s elapsed]
azurerm_subnet_network_security_group_association.example["ssub8"]: Creation complete after 40s [id=/subscriptions/xxxx/re
sourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub8]
2024-11-26T14:49:24.508+1100 [WARN]  provider.terraform-provider-azurerm: [WARN] Retry polling "Private Endpoint (Subscription: \"xxxx\"\nResource Group Name: \"acctest-mgd-petestt4\"\nPrivate Endpoint Name: \"example-endpoint-in-ssub8\")" on error code: "StorageAccountOperationInProgress"
azurerm_subnet_network_security_group_association.example["ssub6"]: Creation complete after 44s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub6]
azurerm_private_endpoint.example["ssub1"]: Still creating... [48s elapsed]
azurerm_private_endpoint.example["ssub3"]: Still creating... [48s elapsed]
azurerm_private_endpoint.example["ssub9"]: Still creating... [48s elapsed]
azurerm_private_endpoint.example["ssub4"]: Still creating... [48s elapsed]
azurerm_subnet_network_security_group_association.example["ssub3"]: Still creating... [48s elapsed]
azurerm_private_endpoint.example["ssub2"]: Still creating... [48s elapsed]
azurerm_private_endpoint.example["ssub6"]: Still creating... [48s elapsed]
azurerm_private_endpoint.example["ssub8"]: Still creating... [48s elapsed]
azurerm_private_endpoint.example["ssub7"]: Still creating... [48s elapsed]
azurerm_private_endpoint.example["ssub5"]: Still creating... [48s elapsed]
azurerm_subnet_network_security_group_association.example["ssub4"]: Still creating... [48s elapsed]
azurerm_subnet_network_security_group_association.example["ssub4"]: Creation complete after 48s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub4]
azurerm_private_endpoint.example["ssub7"]: Creation complete after 54s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub7]
azurerm_private_endpoint.example["ssub9"]: Creation complete after 54s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub9]
azurerm_private_endpoint.example["ssub6"]: Creation complete after 54s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub6]
azurerm_private_endpoint.example["ssub4"]: Creation complete after 56s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub4]
azurerm_subnet_network_security_group_association.example["ssub3"]: Creation complete after 56s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/virtualNetworks/virtnetname11/subnets/ssub3]
azurerm_private_endpoint.example["ssub1"]: Creation complete after 57s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub1]
azurerm_private_endpoint.example["ssub5"]: Still creating... [58s elapsed]
azurerm_private_endpoint.example["ssub8"]: Still creating... [58s elapsed]
azurerm_private_endpoint.example["ssub3"]: Still creating... [58s elapsed]
azurerm_private_endpoint.example["ssub2"]: Still creating... [58s elapsed]
azurerm_private_endpoint.example["ssub8"]: Still creating... [1m7s elapsed]
azurerm_private_endpoint.example["ssub5"]: Still creating... [1m7s elapsed]
azurerm_private_endpoint.example["ssub3"]: Still creating... [1m7s elapsed]
azurerm_private_endpoint.example["ssub2"]: Still creating... [1m7s elapsed]
azurerm_private_endpoint.example["ssub3"]: Creation complete after 1m8s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub3]
azurerm_private_endpoint.example["ssub2"]: Creation complete after 1m9s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub2]
azurerm_private_endpoint.example["ssub5"]: Still creating... [1m17s elapsed]
azurerm_private_endpoint.example["ssub8"]: Still creating... [1m17s elapsed]
azurerm_private_endpoint.example["ssub8"]: Creation complete after 1m18s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub8]
azurerm_private_endpoint.example["ssub5"]: Still creating... [1m27s elapsed]
azurerm_private_endpoint.example["ssub5"]: Still creating... [1m36s elapsed]
azurerm_private_endpoint.example["ssub5"]: Creation complete after 1m38s [id=/subscriptions/xxxx/resourceGroups/acctest-mgd-petestt4/providers/Microsoft.Network/privateEndpoints/example-endpoint-in-ssub5]
2024-11-26T14:50:20.857+1100 [INFO]  provider: plugin process exited: plugin=/home/magodo/go/bin/terraform-provider-azurerm id=71897

Apply complete! Resources: 28 added, 0 changed, 0 destroyed.

Note about the [WARN] logs above.

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • azurerm_private_endpoint: Retry on "RetryableError" and "StorageAccountOperationInProgress" errors during LRO [GH-00000]

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #21293

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

…ountOperationInProgress" errors during LRO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azurerm_private_endpoint fails intermittently with retriable error #2
1 participant