File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
terraform/deployments/with-diagnostic-setting-logging Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,14 @@ module "prerequisites" {
1919 tags = var. tags
2020}
2121
22- data "azurerm_storage_account" "example" {
23- name = var. storage_account_name
24- resource_group_name = var. storage_account_resource_group
22+ resource "azurerm_storage_account" "example" {
23+ name = var. storage_account_name
24+ resource_group_name = module. prerequisites . resource_group_name
25+ location = var. location
26+ account_tier = " Standard"
27+ account_replication_type = " GRS"
28+
29+ tags = var. tags
2530}
2631
2732resource "azurerm_nginx_deployment" "example" {
8388resource "azurerm_monitor_diagnostic_setting" "example" {
8489 name = " ${ azurerm_nginx_deployment . example . name } -logs"
8590 target_resource_id = azurerm_nginx_deployment. example . id
86- storage_account_id = data . azurerm_storage_account . example . id
91+ storage_account_id = azurerm_storage_account. example . id
8792
8893 enabled_log {
8994 category = " NginxLogs"
Original file line number Diff line number Diff line change @@ -10,10 +10,7 @@ variable "name" {
1010
1111variable "storage_account_name" {
1212 description = " Name of the storage account to store NGINX logs."
13- }
14-
15- variable "storage_account_resource_group" {
16- description = " Resource group that contains the storage account to store NGINX logs."
13+ default = " examplenginxstorageacct"
1714}
1815
1916variable "sku" {
You can’t perform that action at this time.
0 commit comments