This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch 19
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git

commit 8b1dc27f1cc7e7b75aef1754ec57843ed7ab145c
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon May 22 13:20:43 2023 +0200

    Add example for securely connecting to Kafka - Terraform part
    
    Signed-off-by: Andrea Cosentino <[email protected]>
---
 .../azure-eventhubs-kafka-ibm-mq/terraform/main.tf | 67 ++++++++++++++++++++++
 jbang/kafka-mq/kafka-mq.yaml                       |  1 -
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/jbang/azure-eventhubs-kafka-ibm-mq/terraform/main.tf 
b/jbang/azure-eventhubs-kafka-ibm-mq/terraform/main.tf
new file mode 100644
index 0000000..f26d802
--- /dev/null
+++ b/jbang/azure-eventhubs-kafka-ibm-mq/terraform/main.tf
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+# We strongly recommend using the required_providers block to set the
+# Azure Provider source and version being used
+terraform {
+  required_providers {
+    azurerm = {
+      source  = "hashicorp/azurerm"
+      version = "=3.0.0"
+    }
+  }
+}
+
+# Configure the Microsoft Azure Provider
+provider "azurerm" {
+  features {}
+}
+
+resource "azurerm_resource_group" "example" {
+  name     = "example-resources"
+  location = "West Europe"
+}
+
+resource "azurerm_eventhub_namespace" "example" {
+  name                = "test12345678910"
+  location            = azurerm_resource_group.example.location
+  resource_group_name = azurerm_resource_group.example.name
+  sku                 = "Standard"
+  capacity            = 1
+
+  tags = {
+    environment = "Development"
+  }
+}
+
+resource "azurerm_eventhub" "example" {
+  name                = "camel-test"
+  namespace_name      = azurerm_eventhub_namespace.example.name
+  resource_group_name = azurerm_resource_group.example.name
+  partition_count     = 2
+  message_retention   = 1
+}
+
+resource "azurerm_eventhub_authorization_rule" "example" {
+  name                = "navi"
+  namespace_name      = azurerm_eventhub_namespace.example.name
+  eventhub_name       = azurerm_eventhub.example.name
+  resource_group_name = azurerm_resource_group.example.name
+  listen              = true
+  send                = true
+  manage              = true
+}
diff --git a/jbang/kafka-mq/kafka-mq.yaml b/jbang/kafka-mq/kafka-mq.yaml
index bff0eea..1298e70 100644
--- a/jbang/kafka-mq/kafka-mq.yaml
+++ b/jbang/kafka-mq/kafka-mq.yaml
@@ -36,4 +36,3 @@
             serverName: 172.17.0.2
             serverPort: 1414
             username: app
-

Reply via email to