diff --git a/4-projects/modules/ml_infra_projects/artifacts_project.tf b/4-projects/modules/ml_infra_projects/artifacts_project.tf index 5eaac184..29d9cbcc 100644 --- a/4-projects/modules/ml_infra_projects/artifacts_project.tf +++ b/4-projects/modules/ml_infra_projects/artifacts_project.tf @@ -15,7 +15,6 @@ */ locals { - artifacts_project_suffix = "artifacts" artifact_tf_sa_roles = [ "roles/artifactregistry.admin", "roles/cloudbuild.builds.editor", @@ -49,14 +48,14 @@ module "app_infra_artifacts_project" { "sourcerepo.googleapis.com", ] # Metadata - project_suffix = local.artifacts_project_suffix + project_suffix = var.artifacts_project_suffix application_name = "app-infra-artifacts" billing_code = var.billing_code primary_contact = var.primary_contact secondary_contact = var.secondary_contact business_code = var.business_code environment_kms_project_id = var.environment_kms_project_id - project_name = "${var.project_prefix}-${local.env_code}-${var.business_code}${local.artifacts_project_suffix}" + project_name = "${var.project_prefix}-${local.env_code}-${var.business_code}${var.artifacts_project_suffix}" prevent_destroy = var.prevent_destroy } diff --git a/4-projects/modules/ml_infra_projects/service_catalog_project.tf b/4-projects/modules/ml_infra_projects/service_catalog_project.tf index 98794cdc..089bb143 100644 --- a/4-projects/modules/ml_infra_projects/service_catalog_project.tf +++ b/4-projects/modules/ml_infra_projects/service_catalog_project.tf @@ -15,7 +15,6 @@ */ locals { - service_catalog_project_suffix = "service-catalog" service_catalog_tf_sa_roles = [ "roles/cloudbuild.builds.editor", "roles/iam.serviceAccountAdmin", @@ -47,14 +46,14 @@ module "app_service_catalog_project" { "sourcerepo.googleapis.com", ] # Metadata - project_suffix = local.service_catalog_project_suffix + project_suffix = var.service_catalog_project_suffix application_name = "app-infra-ml" billing_code = var.billing_code primary_contact = var.primary_contact secondary_contact = var.secondary_contact business_code = var.business_code environment_kms_project_id = var.environment_kms_project_id - project_name = "${var.project_prefix}-${local.env_code}-${var.business_code}${local.service_catalog_project_suffix}" + project_name = "${var.project_prefix}-${local.env_code}-${var.business_code}${var.service_catalog_project_suffix}" prevent_destroy = var.prevent_destroy } diff --git a/4-projects/modules/ml_infra_projects/variables.tf b/4-projects/modules/ml_infra_projects/variables.tf index 1e80bc60..e9144b5c 100644 --- a/4-projects/modules/ml_infra_projects/variables.tf +++ b/4-projects/modules/ml_infra_projects/variables.tf @@ -177,3 +177,15 @@ variable "prevent_destroy" { description = "Prevent Project Key destruction." type = bool } + +variable "artifacts_project_suffix" { + description = "Artifacts Project Suffix." + type = string + default = "artifacts" +} + +variable "service_catalog_project_suffix" { + description = "Service Catalog Project Suffix." + type = string + default = "service-catalog" +}