-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3675 from mr0re1/ctr_prj
Allow deploy controller & config bucket in different project
- Loading branch information
Showing
6 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ locals { | |
} | ||
] | ||
|
||
synth_def_sa_email = "${data.google_project.this.number}[email protected]" | ||
synth_def_sa_email = "${data.google_project.controller_project.number}[email protected]" | ||
|
||
service_account = { | ||
email = coalesce(var.service_account_email, local.synth_def_sa_email) | ||
|
@@ -46,13 +46,19 @@ locals { | |
var.metadata, | ||
local.universe_domain | ||
) | ||
|
||
controller_project_id = coalesce(var.controller_project_id, var.project_id) | ||
} | ||
|
||
data "google_project" "controller_project" { | ||
project_id = var.controller_project_id | ||
} | ||
|
||
# INSTANCE TEMPLATE | ||
module "slurm_controller_template" { | ||
source = "../../internal/slurm-gcp/instance_template" | ||
|
||
project_id = var.project_id | ||
project_id = local.controller_project_id | ||
region = var.region | ||
slurm_instance_role = "controller" | ||
slurm_cluster_name = local.slurm_cluster_name | ||
|
@@ -97,7 +103,7 @@ module "slurm_controller_template" { | |
# INSTANCE | ||
resource "google_compute_instance_from_template" "controller" { | ||
name = "${local.slurm_cluster_name}-controller" | ||
project = var.project_id | ||
project = local.controller_project_id | ||
zone = var.zone | ||
source_instance_template = module.slurm_controller_template.self_link | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters