diff --git a/examples/data-solutions/dp-foundation/01-lnd-datastorage.tf b/examples/data-solutions/dp-foundation/01-lnd-datastorage.tf index a9ae8dfe..b9d7716a 100644 --- a/examples/data-solutions/dp-foundation/01-lnd-datastorage.tf +++ b/examples/data-solutions/dp-foundation/01-lnd-datastorage.tf @@ -43,7 +43,7 @@ module "lnd-cs-0" { location = var.location_config.region storage_class = "REGIONAL" # retention_policy = local.lnd_bucket_retention_policy - encryption_key = try(local.service_encryption_keys.storage != null, false) ? try(local.service_encryption_keys.storage, null) : null + encryption_key = try(local.service_encryption_keys.storage, null) force_destroy = var.data_force_destroy } @@ -86,5 +86,5 @@ module "lnd-bq-0" { project_id = module.lnd-prj.project_id id = "${replace(local.prefix_lnd, "-", "_")}_bq_0" location = var.location_config.region - encryption_key = try(local.service_encryption_keys.bq != null, false) ? try(local.service_encryption_keys.bq, null) : null + encryption_key = try(local.service_encryption_keys.bq, null) } diff --git a/examples/data-solutions/dp-foundation/02-lod-datastorage.tf b/examples/data-solutions/dp-foundation/02-lod-datastorage.tf index c8147cba..af293f9a 100644 --- a/examples/data-solutions/dp-foundation/02-lod-datastorage.tf +++ b/examples/data-solutions/dp-foundation/02-lod-datastorage.tf @@ -38,5 +38,5 @@ module "lod-cs-df-0" { prefix = local.prefix_lod storage_class = "REGIONAL" location = var.location_config.region - encryption_key = try(local.service_encryption_keys.storage != null, false) ? try(local.service_encryption_keys.storage, null) : null + encryption_key = try(local.service_encryption_keys.storage, null) } diff --git a/examples/data-solutions/dp-foundation/03-orc-composer.tf b/examples/data-solutions/dp-foundation/03-orc-composer.tf index 1b5996bd..bd87b3ac 100644 --- a/examples/data-solutions/dp-foundation/03-orc-composer.tf +++ b/examples/data-solutions/dp-foundation/03-orc-composer.tf @@ -91,7 +91,7 @@ resource "google_composer_environment" "orc-cmp-0" { dynamic "encryption_config" { for_each = try(local.service_encryption_keys.composer != null, false) ? { 1 = 1 } : {} content { - kms_key_name = try(local.service_encryption_keys.composer != null, false) ? try(local.service_encryption_keys.composer, null) : null + kms_key_name = try(local.service_encryption_keys.composer, null) } } diff --git a/examples/data-solutions/dp-foundation/03-orc-datastorage.tf b/examples/data-solutions/dp-foundation/03-orc-datastorage.tf index 9cf47f90..63c60e85 100644 --- a/examples/data-solutions/dp-foundation/03-orc-datastorage.tf +++ b/examples/data-solutions/dp-foundation/03-orc-datastorage.tf @@ -23,5 +23,5 @@ module "orc-cs-0" { prefix = local.prefix_orc location = var.location_config.region storage_class = "REGIONAL" - encryption_key = try(local.service_encryption_keys.storage != null, false) ? try(local.service_encryption_keys.storage, null) : null + encryption_key = try(local.service_encryption_keys.storage, null) } diff --git a/examples/data-solutions/dp-foundation/04-trf-datastorage.tf b/examples/data-solutions/dp-foundation/04-trf-datastorage.tf index f6efb101..96a0ae31 100644 --- a/examples/data-solutions/dp-foundation/04-trf-datastorage.tf +++ b/examples/data-solutions/dp-foundation/04-trf-datastorage.tf @@ -39,7 +39,7 @@ module "trf-cs-df-0" { prefix = local.prefix_trf location = var.location_config.region storage_class = "REGIONAL" - encryption_key = try(local.service_encryption_keys.storage != null, false) ? try(local.service_encryption_keys.storage, null) : null + encryption_key = try(local.service_encryption_keys.storage, null) } # Bigquery diff --git a/examples/data-solutions/dp-foundation/05-dtl-datastorage.tf b/examples/data-solutions/dp-foundation/05-dtl-datastorage.tf index f1ac21fb..8d9308dd 100644 --- a/examples/data-solutions/dp-foundation/05-dtl-datastorage.tf +++ b/examples/data-solutions/dp-foundation/05-dtl-datastorage.tf @@ -21,7 +21,7 @@ module "dtl-0-bq-0" { project_id = module.dtl-0-prj.project_id id = "${replace(local.prefix_dtl, "-", "_")}_0_bq_0" location = var.location_config.region - encryption_key = try(local.service_encryption_keys.bq != null, false) ? try(local.service_encryption_keys.bq, null) : null + encryption_key = try(local.service_encryption_keys.bq, null) } module "dtl-1-bq-0" { @@ -29,7 +29,7 @@ module "dtl-1-bq-0" { project_id = module.dtl-1-prj.project_id id = "${replace(local.prefix_dtl, "-", "_")}_1_bq_0" location = var.location_config.region - encryption_key = try(local.service_encryption_keys.bq != null, false) ? try(local.service_encryption_keys.bq, null) : null + encryption_key = try(local.service_encryption_keys.bq, null) } module "dtl-2-bq-0" { @@ -37,7 +37,7 @@ module "dtl-2-bq-0" { project_id = module.dtl-2-prj.project_id id = "${replace(local.prefix_dtl, "-", "_")}_2_bq_0" location = var.location_config.region - encryption_key = try(local.service_encryption_keys.bq != null, false) ? try(local.service_encryption_keys.bq, null) : null + encryption_key = try(local.service_encryption_keys.bq, null) } module "dtl-exp-bq-0" { @@ -45,7 +45,7 @@ module "dtl-exp-bq-0" { project_id = module.dtl-exp-prj.project_id id = "${replace(local.prefix_dtl, "-", "_")}_exp_bq_0" location = var.location_config.region - encryption_key = try(local.service_encryption_keys.bq != null, false) ? try(local.service_encryption_keys.bq, null) : null + encryption_key = try(local.service_encryption_keys.bq, null) } # Cloud storage @@ -57,7 +57,7 @@ module "dtl-0-cs-0" { prefix = local.prefix_dtl location = var.location_config.region storage_class = "REGIONAL" - encryption_key = try(local.service_encryption_keys.storage != null, false) ? try(local.service_encryption_keys.storage, null) : null + encryption_key = try(local.service_encryption_keys.storage, null) force_destroy = var.data_force_destroy } @@ -68,7 +68,7 @@ module "dtl-1-cs-0" { prefix = local.prefix_dtl location = var.location_config.region storage_class = "REGIONAL" - encryption_key = try(local.service_encryption_keys.storage != null, false) ? try(local.service_encryption_keys.storage, null) : null + encryption_key = try(local.service_encryption_keys.storage, null) force_destroy = var.data_force_destroy } @@ -79,7 +79,7 @@ module "dtl-2-cs-0" { prefix = local.prefix_dtl location = var.location_config.region storage_class = "REGIONAL" - encryption_key = try(local.service_encryption_keys.storage != null, false) ? try(local.service_encryption_keys.storage, null) : null + encryption_key = try(local.service_encryption_keys.storage, null) force_destroy = var.data_force_destroy } @@ -90,6 +90,6 @@ module "dtl-exp-cs-0" { prefix = local.prefix_dtl location = var.location_config.region storage_class = "REGIONAL" - encryption_key = try(local.service_encryption_keys.storage != null, false) ? try(local.service_encryption_keys.storage, null) : null + encryption_key = try(local.service_encryption_keys.storage, null) force_destroy = var.data_force_destroy }