Skip to content

Commit 2e8894f

Browse files
author
Nils
committed
depends on fix
1 parent 0cf19b7 commit 2e8894f

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

examples/gitlab-ci-custom/README.md

+2-1
Original file line numberDiff line numberDiff 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

examples/gitlab-ci-custom/main.tf

+2-1
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
project_id = "your-project-id"
2-
gitlab_account_id = "gitlab-ci"
2+
gitlab_account_id = "gitlab-ci-custom"
33
gitlab_repository = "your-org-or-user/your-repo"

examples/gitlab-ci/README.md

+1
Original file line numberDiff line numberDiff 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

examples/gitlab-ci/main.tf

+1
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)