File tree Expand file tree Collapse file tree 5 files changed +7
-3
lines changed Expand file tree Collapse file tree 5 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ resource "google_service_account" "gitlab" {
3636 project = var.project_id
3737 account_id = var.gitlab_account_id
3838 display_name = "GitLab CI (WIF)"
39- description = "Service Account for GitLab CI ${var.gitlab_repository} (Terraform managed)"
39+ description = "Service Account for self-managed GitLab CI ${var.gitlab_repository} (Terraform managed)"
4040}
4141
4242# Allow service account to login via WIF and only from GitLab repository (project path)
@@ -47,6 +47,7 @@ module "github-service-account" {
4747 pool_name = module.gitlab-custom-wif.pool_name
4848 account_id = google_service_account.gitlab.account_id
4949 repository = var.gitlab_repository
50+ depends_on = [google_service_account.gitlab]
5051}
5152
5253# Get the Workload Identity Pool Provider resource name for GitLab CI configuration
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ resource "google_service_account" "gitlab" {
1818 project = var. project_id
1919 account_id = var. gitlab_account_id
2020 display_name = " GitLab CI (WIF)"
21- description = " Service Account for GitLab CI ${ var . gitlab_repository } (Terraform managed)"
21+ description = " Service Account for self-managed GitLab CI ${ var . gitlab_repository } (Terraform managed)"
2222}
2323
2424# Allow service account to login via WIF and only from GitLab repository (project path)
@@ -29,6 +29,7 @@ module "github-service-account" {
2929 pool_name = module. gitlab-custom-wif . pool_name
3030 account_id = google_service_account. gitlab . account_id
3131 repository = var. gitlab_repository
32+ depends_on = [google_service_account . gitlab ]
3233}
3334
3435# Get the Workload Identity Pool Provider resource name for GitLab CI configuration
Original file line number Diff line number Diff line change 11project_id = "your-project-id"
2- gitlab_account_id = "gitlab-ci"
2+ gitlab_account_id = "gitlab-ci-custom "
33gitlab_repository = "your-org-or-user/your-repo"
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ module "github-service-account" {
3939 pool_name = module.gitlab-wif.pool_name
4040 account_id = google_service_account.gitlab.account_id
4141 repository = var.gitlab_repository
42+ depends_on = [google_service_account.gitlab]
4243}
4344
4445# Get the Workload Identity Pool Provider resource name for GitLab CI configuration
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ module "github-service-account" {
2121 pool_name = module. gitlab-wif . pool_name
2222 account_id = google_service_account. gitlab . account_id
2323 repository = var. gitlab_repository
24+ depends_on = [google_service_account . gitlab ]
2425}
2526
2627# Get the Workload Identity Pool Provider resource name for GitLab CI configuration
You can’t perform that action at this time.
0 commit comments