-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7aacf94
commit be02948
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
resource "azurerm_servicebus_namespace" "asb" { | ||
name = var.name | ||
location = var.location | ||
resource_group_name = var.resource_group_name | ||
sku = var.sku | ||
capacity = var.capacity | ||
|
||
public_network_access_enabled = var.public_network_access_enabled | ||
|
||
dynamic "network_rule_set" { | ||
for_each = var.subnet_ids.length > 0 ? [1] : [] | ||
content { | ||
public_network_access_enabled = var.public_network_access_enabled | ||
default_action = var.network_rules_default_action | ||
trusted_services_allowed = var.trusted_services_allowed | ||
|
||
dynamic "network_rules" { | ||
for_each = var.subnet_ids | ||
content { | ||
subnet_id = network_rules.value | ||
} | ||
} | ||
} | ||
} | ||
|
||
tags = var.tags | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
variable "name" { | ||
description = "Name of the azure bus namespace" | ||
} | ||
|
||
variable "location" { | ||
description = "Azure Region Location" | ||
type = string | ||
} | ||
|
||
variable "resource_group_name" { | ||
description = "Resource group name of the azure bus namespace" | ||
} | ||
|
||
variable "sku" { | ||
description = "The SKU of the Azure Service Bus Namespace" | ||
type = string | ||
default = "Premium" | ||
} | ||
|
||
variable "capacity" { | ||
description = "The capacity of the Azure Service Bus Namespace" | ||
type = number | ||
default = 1 | ||
} | ||
|
||
variable "public_network_access_enabled" { | ||
description = "Is public network access enabled for the Azure Service Bus Namespace" | ||
type = bool | ||
default = false | ||
} | ||
|
||
variable "subnet_ids" { | ||
description = "The list of subnet ids to associate with the Azure Service Bus Namespace" | ||
type = list(string) | ||
default = [] | ||
} | ||
|
||
variable "network_rules_default_action" { | ||
description = "The default action of the network rules" | ||
type = string | ||
default = "Deny" | ||
} | ||
|
||
variable "trusted_services_allowed" { | ||
description = "The list of trusted services allowed" | ||
type = bool | ||
default = false | ||
} | ||
|
||
variable "tags" { | ||
description = "Tags to associate with resources." | ||
type = map(string) | ||
} |