Skip to content

Commit

Permalink
feat: enable public network access (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
hknutsen authored Aug 21, 2023
1 parent d94484e commit c963c3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ resource "azurerm_key_vault" "this" {
access_policy = local.access_policies
enable_rbac_authorization = var.enable_rbac_authorization

tags = var.tags
public_network_access_enabled = var.public_network_access_enabled

network_acls {
default_action = "Deny"
bypass = var.network_acls_bypass_azure_services ? "AzureServices" : "None"
ip_rules = var.network_acls_ip_rules
virtual_network_subnet_ids = var.network_acls_virtual_network_subnet_ids
}

tags = var.tags
}

resource "azurerm_monitor_diagnostic_setting" "this" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "enable_rbac_authorization" {
default = true
}

variable "public_network_access_enabled" {
description = "Should public network access be enabled for this Key Vault?"
type = bool
default = true
}

variable "network_acls_bypass_azure_services" {
description = "Should Azure services be allowed to bypass the network ACLs of this Key Vault?."
type = bool
Expand Down

0 comments on commit c963c3d

Please sign in to comment.