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

New resource: azurerm_eventhub_namespace_customer_managed_key #12159

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

neil-yechenwei
Copy link
Contributor

@neil-yechenwei neil-yechenwei commented Jun 10, 2021

Currently, The EventHub Namespace resource doesn't support to enable customer-managed key encryption. So I submitted this PR to implement it.

The encryption property only can be set on an existing resource.

--- PASS: TestAccEventHubNamespaceCustomerManagedKey_basic (15164.75s)
--- PASS: TestAccEventHubNamespaceCustomerManagedKey_complete (15168.92s)
--- PASS: TestAccEventHubNamespaceCustomerManagedKey_update (15377.69s)
--- PASS: TestAccEventHubNamespaceCustomerManagedKey_requiresImport (15387.40s)

API Reference:
https://github.com/Azure/azure-rest-api-specs/blob/d3a5ab585146ee8ee09f43eb0948c45daacd36f7/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2021-01-01-preview/namespaces-preview.json#L662

@katbyte
Copy link
Collaborator

katbyte commented Jun 11, 2021

whats the reasoning for making this a seperate resource instead of adding it to the existing resource?

@neil-yechenwei
Copy link
Contributor Author

neil-yechenwei commented Jun 15, 2021

@katbyte , I think we cannot directly add it to the existing resource. Because eventhub namespace would use the identity generated by itself at first creation to access the linked key vault while adding the encryption property. So we have to add key vault access policy for the generated identity before adding the encryption property. If we directly add the encryption property in eventhub namespace resource, we have to handle kv access policy in eventhub namespace resource and it would cause diff on kv. So I suggest to make it as a separate resource like other existing resource with similar scenario.

@katbyte katbyte added this to the v2.64.0 milestone Jun 15, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @neil-yechenwei - LGTM 👍

@katbyte katbyte merged commit 2c9086e into hashicorp:master Jun 15, 2021
katbyte added a commit that referenced this pull request Jun 15, 2021
@github-actions
Copy link

This functionality has been released in v2.64.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
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