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

Bug: List storage accounts returns only first page #5075

Conversation

benjamin37
Copy link
Contributor

@benjamin37 benjamin37 commented Dec 5, 2019

When calling the current list storage account method it just returns the first page of storage accounts if the response is a paginated response. When the storage account that the provider is looking for is not in the first page I get the error message

Unable to locate Storage Account $STORAGE_ACCOUNT_NAME!

How to reproduce? In one of our subscriptions this happens when updating storage accounts relative consistently (about 10% of the calls). Sadly I found no setup to reproduce this paginated response consistently. If you find a way to consistently reproduce a paginated response form list storage accounts please let me know.

…orage accounts instead of all storage accounts of the first page
@ghost ghost added the size/XS label Dec 5, 2019
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @benjamin37

Thanks for this PR :)

Taking a look through this LGTM - due to the nature of this change this is going to be hard to test in an automated fashion (since, whilst we could provision a bunch of storage accounts, given we run the test suite in parallel there could be a dynamic number, plus Azure's quota's) - as such providing the regular tests pass I think we should be good here (since they call into this function)

Thanks!

@tombuildsstuff
Copy link
Contributor

👋

I've run the tests for this PR but they fail due to a separate issue in master which has since been fixed (#5113), since this PR is branched off from that commit.

I've rebased this PR locally and run the Storage Container tests and this looks good:

$ acctests azurerm TestAccAzureRMStorageContainer_basic
=== RUN   TestAccAzureRMStorageContainer_basic
=== PAUSE TestAccAzureRMStorageContainer_basic
=== CONT  TestAccAzureRMStorageContainer_basic
--- PASS: TestAccAzureRMStorageContainer_basic (126.26s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	126.317s

.. as such I believe we're good here - thanks again for this PR / apologies for the delay with this one.

Thanks!

@tombuildsstuff tombuildsstuff merged commit caff2ac into hashicorp:master Dec 9, 2019
tombuildsstuff added a commit that referenced this pull request Dec 9, 2019
@benjamin37 benjamin37 deleted the bugfix/paginated_response_list_storage_accounts branch December 10, 2019 08:04
@ghost
Copy link

ghost commented Dec 16, 2019

This has been released in version 1.39.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.39.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jan 9, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants