-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
refactor: splitting ManagedHSM
out into it’s own Service Package
#24737
refactor: splitting ManagedHSM
out into it’s own Service Package
#24737
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some goimports to tidy but LGTM
internal/services/managedhsm/key_vault_managed_hardware_security_module_data_source.go
Outdated
Show resolved
Hide resolved
...l/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource.go
Outdated
Show resolved
Hide resolved
...vices/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go
Outdated
Show resolved
Hide resolved
...ervices/managedhsm/key_vault_managed_hardware_security_module_role_definition_data_source.go
Outdated
Show resolved
Hide resolved
"github.com/hashicorp/terraform-provider-azurerm/internal/services/managedhsm/parse" | ||
"github.com/hashicorp/terraform-provider-azurerm/internal/services/managedhsm/validate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goimports
...vices/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource_test.go
Outdated
Show resolved
Hide resolved
This commit splits Managed HSM out into it's own package to provide a logical seperation between this and Key Vault. Whilst the two services share /some/ of the same APIs, and a similar payload, the values required for these are different particularly within the Data Plane API. As such - to provide logical separation between the two and discourage code reuse to avoid subtle/hard-to-diagnose issues this commit scaffolds out a Service Package for Managed HSM. Porting the existing resources over will come in a follow up commit.
…r than Key Vault / removing the unused clients
Calling out when these are Data Plane vs Resource Management so this is clearer
4299fbf
to
496ed9a
Compare
…m-to-its-own-servicepackage refactor: splitting `ManagedHSM` out into it’s own Service Package
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. |
Whilst Key Vault and Managed HSM are similar services, they’re now different enough that we should provide logical separations within the codebase to account for that.
In that vain, this PR splits Managed HSM out into it’s own package (
managedhsm
) meaning that all of that logic is grouped within that package. Doing this helps us ensure that we correctly account for the casing of constants, given this differs between Key Vault and Managed HSM - and is required in order to make the casing consistent within thekeyvault
package (and migrate that to the newer API version2023-07-01
, which useshashicorp/go-azure-sdk
s base layer).This means that PRs such as #24209 can be scoped to the Managed HSM service - meaning that we won’t unintentionally automatically supporting Managed HSM where a resource only expects Key Vault support.