Configures storage buckets to be optionally exposed via service endpoints

This commit is contained in:
Rob Gil
2020-01-22 19:35:54 -05:00
parent 9042a960bb
commit 01703b1488
5 changed files with 40 additions and 10 deletions

View File

@@ -9,6 +9,12 @@ resource "azurerm_storage_account" "bucket" {
location = azurerm_resource_group.bucket.location
account_tier = "Standard"
account_replication_type = "LRS"
network_rules {
default_action = var.policy
virtual_network_subnet_ids = var.subnet_ids
#ip_rules = ["66.220.238.246/30"]
}
}
resource "azurerm_storage_container" "bucket" {

View File

@@ -29,3 +29,14 @@ variable "service_name" {
description = "Name of the service using this bucket"
type = string
}
variable "subnet_ids" {
description = "List of subnet_ids that will have access to this service"
type = list
}
variable "policy" {
description = "The default policy for the network access rules (Allow/Deny)"
default = "Deny"
type = string
}