From 6b01b8641cc84ef69e3cbbba1c8a551c3cbcbb91 Mon Sep 17 00:00:00 2001 From: lcaggio Date: Thu, 24 Nov 2022 15:25:29 +0100 Subject: [PATCH] Fix encryption. --- blueprints/data-solutions/data-playground/main.tf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blueprints/data-solutions/data-playground/main.tf b/blueprints/data-solutions/data-playground/main.tf index a561c1d63..ff079d5eb 100644 --- a/blueprints/data-solutions/data-playground/main.tf +++ b/blueprints/data-solutions/data-playground/main.tf @@ -32,6 +32,7 @@ module "project" { "bigqueryreservation.googleapis.com", "composer.googleapis.com", "compute.googleapis.com", + "dialogflow.googleapis.com", "dataflow.googleapis.com", "ml.googleapis.com", "notebooks.googleapis.com", @@ -113,7 +114,7 @@ module "bucket" { module "dataset" { source = "../../../modules/bigquery-dataset" project_id = module.project.project_id - id = "${var.prefix}_data" + id = "${replace(var.prefix, "-", "_")}_data" encryption_key = try(local.service_encryption_keys.bq, null) # Example assignment of an encryption key } @@ -133,6 +134,7 @@ module "service-account-notebook" { "roles/bigquery.jobUser", "roles/bigquery.dataEditor", "roles/bigquery.user", + "roles/dialogflow.client", "roles/storage.admin", ] } @@ -152,7 +154,7 @@ resource "google_notebooks_instance" "playground" { install_gpu_driver = true boot_disk_type = "PD_SSD" boot_disk_size_gb = 110 - disk_encryption = try(local.service_encryption_keys.compute != null, false) ? "CMEK" : "GMEK" + disk_encryption = try(local.service_encryption_keys.compute != null, false) ? "CMEK" : null kms_key = try(local.service_encryption_keys.compute, null) no_public_ip = true