Skip to content

Commit 7c7a1ef

Browse files
committed
change in bucket name
1 parent bdb467d commit 7c7a1ef

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

1-org/modules/cai-monitoring/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ locals {
2626
"run.googleapis.com",
2727
"eventarc.googleapis.com"
2828
]
29-
cai_source_name = var.random_suffix ? "CAI Monitoring - ${random_id.suffix.hex}" : "CAI Monitoring"
30-
cai_monitoring_bucket_suffix = "${random_id.suffix.hex}-sources-${data.google_project.project.number}-${var.location}"
29+
cai_source_name = var.random_suffix ? "CAI Monitoring - ${random_id.suffix.hex}" : "CAI Monitoring"
3130
}
3231

3332
data "google_project" "project" {
@@ -75,7 +74,7 @@ module "cloudfunction_source_bucket" {
7574
version = "~> 6.0"
7675

7776
project_id = var.project_id
78-
name = "bkt-cai-monitoring-${md5(local.cai_monitoring_bucket_suffix)}"
77+
name = "bkt-cai-monitoring-${random_id.suffix.hex}-sources-${data.google_project.project.number}"
7978
location = var.location
8079
storage_class = "REGIONAL"
8180
force_destroy = true

4-projects/modules/base_env/example_storage_cmek.tf

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
locals {
18-
cmek_bucket_prefix = "${var.gcs_bucket_prefix}-cmek-encrypted"
19-
cmek_bucket_suffix = "${module.base_shared_vpc_project.project_id}-${lower(var.location_gcs)}-${random_string.bucket_name.result}"
20-
}
21-
2217
data "google_storage_project_service_account" "gcs_account" {
2318
project = module.base_shared_vpc_project.project_id
2419
}
@@ -53,7 +48,7 @@ module "gcs_buckets" {
5348

5449
project_id = module.base_shared_vpc_project.project_id
5550
location = var.location_gcs
56-
name = "${local.cmek_bucket_prefix}-${md5(local.cmek_bucket_suffix)}"
51+
name = "${var.gcs_bucket_prefix}-${module.base_shared_vpc_project.project_id}-cmek-encrypted-${random_string.bucket_name.result}"
5752
bucket_policy_only = true
5853
custom_placement_config = var.gcs_custom_placement_config
5954

0 commit comments

Comments
 (0)