Skip to content

Commit

Permalink
fix: Add public_network_access_enabled variable (#326)
Browse files Browse the repository at this point in the history
* add public_network_access_enabled variable

* add public_network_access_enabled variable

* code review
  • Loading branch information
umbcoppolabottazzi authored Jul 17, 2024
1 parent 54987d0 commit 4d6f6c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions cdn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ During the apply there will be 1 changed and 1 destroy related to storage see [s
| <a name="input_storage_account_nested_items_public"></a> [storage\_account\_nested\_items\_public](#input\_storage\_account\_nested\_items\_public) | (Optional) reflects to property 'allow\_nested\_items\_to\_be\_public' on storage account module | `bool` | `true` | no |
| <a name="input_storage_account_replication_type"></a> [storage\_account\_replication\_type](#input\_storage\_account\_replication\_type) | n/a | `string` | `"GRS"` | no |
| <a name="input_storage_account_tier"></a> [storage\_account\_tier](#input\_storage\_account\_tier) | n/a | `string` | `"Standard"` | no |
| <a name="input_storage_public_network_access_enabled"></a> [storage\_public\_network\_access\_enabled](#input\_storage\_public\_network\_access\_enabled) | Flag to set public public network for storage account | `bool` | `true` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | n/a | `map(string)` | n/a | yes |
| <a name="input_tenant_id"></a> [tenant\_id](#input\_tenant\_id) | n/a | `string` | `null` | no |

Expand Down
2 changes: 1 addition & 1 deletion cdn/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module "cdn_storage_account" {
resource_group_name = var.resource_group_name
location = var.location
allow_nested_items_to_be_public = var.storage_account_nested_items_public
public_network_access_enabled = true
public_network_access_enabled = var.storage_public_network_access_enabled

advanced_threat_protection = var.advanced_threat_protection_enabled

Expand Down
7 changes: 7 additions & 0 deletions cdn/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ variable "cdn_location" {
default = null
description = "If the location of the CDN needs to be different from that of the storage account, set this variable to the location where the CDN should be created. For example, cdn_location = westeurope and location = northitaly"
}

variable "storage_public_network_access_enabled" {
type = bool
default = true
description = "Flag to set public public network for storage account"
}

variable "tags" {
type = map(string)
}
Expand Down

0 comments on commit 4d6f6c0

Please sign in to comment.