Skip to content

Commit e234169

Browse files
author
radomarina
committed
feat: 1.2.0 add option to enforce network_rules on storage account
1 parent a2212e9 commit e234169

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

eventdriven.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ resource "azurerm_storage_account" "current" {
1313
location = var.location
1414
name = "${module.naming.storage_account.name}${var.prefix != "" ? regex("\\w+", var.prefix) : ""}firefly${var.suffix != "" ? regex("\\w+", var.suffix) : ""}"
1515
resource_group_name = local.resource_group_name
16+
dynamic "network_rules" {
17+
for_each = var.enforce_storage_network_rules ? [1] : []
18+
content {
19+
default_action = "Deny"
20+
ip_rules = var.firefly_eips
21+
}
22+
}
1623
tags = local.tags
1724
}
1825

vars.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ variable "client_secret" {
110110
type = string
111111
}
112112

113+
variable "enforce_storage_network_rules" {
114+
type = bool
115+
default = false
116+
}
117+
113118
variable "firefly_eips" {
114119
type = list(string)
115120
default = [

0 commit comments

Comments
 (0)