-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
hashicorp/go-azure-sdk refactoring for azurerm_subscriptions - pagination and modelling issue #24948
Comments
Hi @jschoombee , Thank you for reporting this issue. It appears that the OData structure lost some information during unmarshalling. Could you please provide the API response that caused the issue? (I don't have an account with multiple subscriptions to reproduce the problem.) |
Hi @wuxu92, I logged the raw responses when testing, below is a redacted snippet of the output. I haven't worked with the MS graph APIs much but it seems like OData was not implemented for subscriptions in azurerm - api ref {
"value": [
{
"id": "/subscriptions/11111111-9f71-4226-ae1b-7995c4af4ccc",
"authorizationSource": "RoleBased",
"managedByTenants": [],
"tags": {
"redacted": 1
},
"subscriptionId": "11111111-9f71-4226-ae1b-7995c4af4ccc",
"tenantId": "11111111-a3da-442a-1111-235cac24cd5c",
"displayName": "redacted",
"state": "Enabled",
"subscriptionPolicies": {
"locationPlacementId": "Public_2014-09-01",
"quotaId": "EnterpriseAgreement_2014-09-01",
"spendingLimit": "Off"
}
}
],
"nextLink": "https://management.azure.com/subscriptions?$skipToken=redacted%3d&api-version=2022-12-01",
"count": {
"type": "Total",
"value": 5297
}
} |
Is there any progress on this? This is a blocking issue. |
Confirm this bug still exists in |
They dont seem to care or believe us |
@tombuildsstuff This issue should remain open for now. The Pandora PR only fixes the SDK generation problem, and AzureRM needs to update its SDK to address the current issue. |
can we re-open? |
Can this be re-opened? |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.7.5
AzureRM Provider Version
3.92.0
Affected Resource(s)/Data Source(s)
azurerm_subscriptions
Terraform Configuration Files
Debug Output/Panic Output
Less subscriptions in the tf state instances than expected.
Expected Behaviour
No response
Actual Behaviour
No response
Steps to Reproduce
Use a version prior to 3.90.0 and all subscriptions (>1000) are returned. This PR seemed to have created the issue
I debugged the provider locally and managed to resolve the issue by dropping the
@odata
prefix fornextLink
hereFurther
count
in the subscriptions response needed changing as it is not of typeint
. Below is what I ended up with which did the trick for me:Important Factoids
Have a local branch to fix this issue and happy to submit but not sure if other resources/data sources depending on this package might be affected
References
PR
The text was updated successfully, but these errors were encountered: