terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

storage: upgrade giovanni SDK and support AAD auth

Open manicminer opened this issue 1 year ago • 4 comments

Storage Data Plane upgrades and support for AAD authentication

  • Use latest tombuildsstuff/giovanni which has switched to the go-azure-sdk base layer
  • Support for sdk-level retries for known eventually consistent scenarios
  • Support for AAD authentication for all data plane APIs (where the API supports it)
  • Refactor data plane client helpers to be operation-aware, so that supported authentication methods can be determined not just by endpoint but also by the capabilities of the operation (enables more granular support for preferred authentication methods).
  • Adopt data plane resource IDs from tombuildsstuff/giovanni- Some tidying of provider package - move helper functions into own source file
  • Some tidying of services/storage/client package - move data plane client helpers into own source file and add support for parsing out a storage account endpoint for constructing a data plane ID
  • internal/common: adopt client.BaseClient interface from go-azure-sdk to support more SDK base clients
  • internal/provider: move helper functions into own source file

CHANGELOG

  • dependencies: updating to v0.20240227.1200200 of github.com/hashicorp/go-azure-sdk
  • dependencies: updating to v0.25.0 of github.com/tombuildsstuff/giovanni
  • data.azurerm_storage_table_entities - support for AAD authentication
  • data.azurerm_storage_table_entity - support for AAD authentication
  • azurerm_storage_share_file - support for AAD authentication
  • azurerm_storage_share_directory - support for AAD authentication, deprecate share_name and storage_account_name in favor of storage_share_id
  • azurerm_storage_table_entity - support for AAD authentication, deprecate share_name and storage_account_name in favor of storage_table_id
  • azurerm_storage_table - support for AAD authentication
  • azurerm_storage_table_entity - support for AAD authentication

Depends on:

  • [x] https://github.com/hashicorp/go-azure-sdk/pull/876
  • [x] https://github.com/hashicorp/go-azure-sdk/pull/890
  • [x] https://github.com/tombuildsstuff/giovanni/pull/101
  • [x] https://github.com/tombuildsstuff/giovanni/pull/104
  • [x] https://github.com/hashicorp/go-azure-sdk/pull/902
  • [x] https://github.com/hashicorp/go-azure-sdk/pull/906
  • [x] https://github.com/tombuildsstuff/giovanni/pull/106
  • [x] https://github.com/hashicorp/terraform-provider-azurerm/pull/25055

Note: this updates the go-azure-sdk version to pull in the SharedKeyAuthorizer fix, but can be squashed out if this gets added in main before this PR is merged

manicminer avatar Feb 06 '24 21:02 manicminer

does this close #24213? and unblock #22583?

katbyte avatar Feb 16 '24 01:02 katbyte

@katbyte Yes and yes 👍

manicminer avatar Feb 19 '24 11:02 manicminer

~Still having some issues with tables, possible state migration needed for Table IDs~

^ this now resolved, PR is ready for review

manicminer avatar Feb 24 '24 03:02 manicminer

Test results

Screenshot 2024-02-28 at 16 36 44
Screenshot 2024-02-28 at 16 36 39
Screenshot 2024-02-28 at 16 36 34
Screenshot 2024-02-28 at 16 36 00
Screenshot 2024-03-01 at 01 02 55

(Legacy VM failures unrelated to this change)

manicminer avatar Feb 28 '24 16:02 manicminer

@manicminer Would it somehow fix this famous issue - https://github.com/hashicorp/terraform-provider-azurerm/issues/2977 ?

dkuzmenok avatar Feb 29 '24 13:02 dkuzmenok

@dkuzmenok Unfortunately not, the storage resources still use the storage data plane APIs as we will only be in a position to switch when there is feature parity in the resource manager API.

manicminer avatar Feb 29 '24 14:02 manicminer

Latest test results

Screenshot 2024-03-14 at 11 01 30
Screenshot 2024-03-14 at 11 01 40

manicminer avatar Mar 14 '24 11:03 manicminer

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Apr 18 '24 02:04 github-actions[bot]