From a4c34298dbeb981b06682e74ea82a2b4f3ffe0d4 Mon Sep 17 00:00:00 2001 From: Roberto Capozzo Date: Wed, 25 Jan 2023 17:25:00 +0100 Subject: [PATCH] feature: create atp only if enabled --- main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/main.tf b/main.tf index 407532a..6f21999 100644 --- a/main.tf +++ b/main.tf @@ -78,6 +78,7 @@ resource "azurerm_storage_account" "storeacc" { # Storage Advanced Threat Protection #-------------------------------------- resource "azurerm_advanced_threat_protection" "atp" { + count = var.enable_advanced_threat_protection ? 1 : 0 target_resource_id = azurerm_storage_account.storeacc.id enabled = var.enable_advanced_threat_protection }