This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch fix-terraform-azure-schema-registry in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
commit 658d0e6ef46608e213dfe65f069e87498d0bef2e Author: Andrea Cosentino <[email protected]> AuthorDate: Wed Oct 11 10:53:42 2023 +0200 Added a note about Terraform and role assignment in Azure Schema Registry example Signed-off-by: Andrea Cosentino <[email protected]> --- .../README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/jbang/azure-eventhubs-kafka-azure-schema-registry/README.md b/jbang/azure-eventhubs-kafka-azure-schema-registry/README.md index aa76f4f..d12271d 100644 --- a/jbang/azure-eventhubs-kafka-azure-schema-registry/README.md +++ b/jbang/azure-eventhubs-kafka-azure-schema-registry/README.md @@ -9,6 +9,28 @@ to solve the instantiation problem, as the class uses a builder for instantiatin Choose a globally unique name for the eventhubs namespace and edit it in the terraform [script](main.tf). Then, create the services using the script. +For having a working example you will need to add a role assignment of type "Schema Registry Contributor (Preview)" + +This could be done through the following Terraform configuration + +```bash +data "azurerm_subscription" "primary" { +} + +data "azurerm_client_config" "example" { +} + +resource "azurerm_role_assignment" "example" { + scope = data.azurerm_subscription.primary.id + role_definition_name = "Schema Registry Contributor (Preview)" + principal_id = data.azurerm_client_config.example.object_id +} +``` + +This will grant the correct role. You could do that even from the Azure CLI or Azure console. + +This step is important to fully run the example. + ## Configure the applications Use [application.properties.template](application.properties.template) to create `application.properties` and define your eventhubs namespace in there.
