From 90174fefc7ab3275647a262e76a8ca4f2138fa86 Mon Sep 17 00:00:00 2001 From: Ritika Patil <94649368+riragh@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:44:08 -0500 Subject: [PATCH] feat: (PSKD-729) Removed experimental Azure Service Bus support (#403) --- main.tf | 13 ------- modules/azurerm_message_broker/main.tf | 26 -------------- modules/azurerm_message_broker/outputs.tf | 10 ------ modules/azurerm_message_broker/variables.tf | 40 --------------------- outputs.tf | 14 -------- variables.tf | 25 ------------- 6 files changed, 128 deletions(-) delete mode 100644 modules/azurerm_message_broker/main.tf delete mode 100644 modules/azurerm_message_broker/outputs.tf delete mode 100644 modules/azurerm_message_broker/variables.tf diff --git a/main.tf b/main.tf index 9557dfc7..4f47ce6d 100644 --- a/main.tf +++ b/main.tf @@ -257,19 +257,6 @@ module "netapp" { depends_on = [module.vnet] } -module "message_broker" { - source = "./modules/azurerm_message_broker" - count = var.create_azure_message_broker ? 1 : 0 - - resource_group_name = local.aks_rg.name - location = var.location - prefix = var.prefix - message_broker_sku = var.message_broker_sku - message_broker_name = var.message_broker_name - message_broker_capacity = var.message_broker_capacity - tags = var.tags -} - data "external" "git_hash" { program = ["files/tools/iac_git_info.sh"] } diff --git a/modules/azurerm_message_broker/main.tf b/modules/azurerm_message_broker/main.tf deleted file mode 100644 index 5a931eea..00000000 --- a/modules/azurerm_message_broker/main.tf +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright © 2020-2024, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 - -# Azure Service Bus -# - https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview -# - https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/servicebus_namespace -# - https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/servicebus_namespace_authorization_rule - -resource "azurerm_servicebus_namespace" "message_broker" { - name = "${var.prefix}-message-broker" - location = var.location - resource_group_name = var.resource_group_name - sku = var.message_broker_sku - capacity = var.message_broker_capacity - - tags = var.tags -} - -resource "azurerm_servicebus_namespace_authorization_rule" "message_broker_config" { - name = var.message_broker_name - namespace_id = azurerm_servicebus_namespace.message_broker.id - - listen = true - send = true - manage = true -} diff --git a/modules/azurerm_message_broker/outputs.tf b/modules/azurerm_message_broker/outputs.tf deleted file mode 100644 index fdc175d2..00000000 --- a/modules/azurerm_message_broker/outputs.tf +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright © 2020-2024, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 - -output "message_broker_hostname" { - value = regex("//(.*):", azurerm_servicebus_namespace.message_broker.endpoint) -} - -output "message_broker_primary_key" { - value = azurerm_servicebus_namespace_authorization_rule.message_broker_config.primary_key -} diff --git a/modules/azurerm_message_broker/variables.tf b/modules/azurerm_message_broker/variables.tf deleted file mode 100644 index 5610b28b..00000000 --- a/modules/azurerm_message_broker/variables.tf +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright © 2020-2024, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 - -variable "prefix" { - description = "A prefix used in the name for all the Azure resources created by this script." - type = string -} - -variable "resource_group_name" { - description = "The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created." - type = string -} - -variable "location" { - description = "Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created." - type = string -} - -variable "message_broker_sku" { - description = "Defines which tier to use. Options are Basic, Standard or Premium. SAS Viya Platform recommends using 'Premium'." - type = string - default = "Premium" -} - -variable "message_broker_name" { - description = "Specifies the name of the message broker, also specified for the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created." - type = string - default = "Arke" -} - -variable "message_broker_capacity" { - description = "Specifies the capacity. When sku is Premium, capacity can be 1, 2, 4, 8 or 16. When sku is Basic or Standard, capacity can be 0 only." - type = number - default = 1 -} - -variable "tags" { - description = "Map of common tags to be placed on the Resources" - type = map(any) -} diff --git a/outputs.tf b/outputs.tf index 7e3b9226..46d7778e 100644 --- a/outputs.tf +++ b/outputs.tf @@ -148,17 +148,3 @@ output "cluster_node_pool_mode" { output "cluster_api_mode" { value = var.cluster_api_mode } - -## Message Broker - Azure Service Bus -output "message_broker_hostname" { - value = var.create_azure_message_broker ? element(flatten(module.message_broker[*].message_broker_hostname), 0) : null -} - -output "message_broker_primary_key" { - value = var.create_azure_message_broker ? element(coalescelist(module.message_broker[*].message_broker_primary_key, [""]), 0) : null - sensitive = true -} - -output "message_broker_name" { - value = var.create_azure_message_broker ? var.message_broker_name : null -} diff --git a/variables.tf b/variables.tf index a7b5b63c..1ac7515d 100644 --- a/variables.tf +++ b/variables.tf @@ -802,28 +802,3 @@ variable "aks_cluster_private_dns_zone_id" { type = string default = "" } - -## Message Broker - Azure Service Bus - Experimental -variable "create_azure_message_broker" { - description = "Allows user to create a fully managed enterprise message broker: Azure Service Bus" - type = bool - default = false -} - -variable "message_broker_sku" { - description = "Defines which tier to use. Options are Basic, Standard or Premium. SAS Viya Platform recommends using 'Premium'." - type = string - default = "Premium" -} - -variable "message_broker_name" { - description = "Specifies the name of the message broker, also specified for the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created." - type = string - default = "Arke" -} - -variable "message_broker_capacity" { - description = "Specifies the capacity. When sku is Premium, capacity can be 1, 2, 4, 8 or 16. When sku is Basic or Standard, capacity can be 0 only." - type = number - default = 1 -}