Skip to content

Commit

Permalink
depends on fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyclenerd committed Apr 18, 2023
1 parent 0cf19b7 commit 2e8894f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/gitlab-ci-custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource "google_service_account" "gitlab" {
project = var.project_id
account_id = var.gitlab_account_id
display_name = "GitLab CI (WIF)"
description = "Service Account for GitLab CI ${var.gitlab_repository} (Terraform managed)"
description = "Service Account for self-managed GitLab CI ${var.gitlab_repository} (Terraform managed)"
}
# Allow service account to login via WIF and only from GitLab repository (project path)
Expand All @@ -47,6 +47,7 @@ module "github-service-account" {
pool_name = module.gitlab-custom-wif.pool_name
account_id = google_service_account.gitlab.account_id
repository = var.gitlab_repository
depends_on = [google_service_account.gitlab]
}
# Get the Workload Identity Pool Provider resource name for GitLab CI configuration
Expand Down
3 changes: 2 additions & 1 deletion examples/gitlab-ci-custom/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resource "google_service_account" "gitlab" {
project = var.project_id
account_id = var.gitlab_account_id
display_name = "GitLab CI (WIF)"
description = "Service Account for GitLab CI ${var.gitlab_repository} (Terraform managed)"
description = "Service Account for self-managed GitLab CI ${var.gitlab_repository} (Terraform managed)"
}

# Allow service account to login via WIF and only from GitLab repository (project path)
Expand All @@ -29,6 +29,7 @@ module "github-service-account" {
pool_name = module.gitlab-custom-wif.pool_name
account_id = google_service_account.gitlab.account_id
repository = var.gitlab_repository
depends_on = [google_service_account.gitlab]
}

# Get the Workload Identity Pool Provider resource name for GitLab CI configuration
Expand Down
2 changes: 1 addition & 1 deletion examples/gitlab-ci-custom/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
project_id = "your-project-id"
gitlab_account_id = "gitlab-ci"
gitlab_account_id = "gitlab-ci-custom"
gitlab_repository = "your-org-or-user/your-repo"
1 change: 1 addition & 0 deletions examples/gitlab-ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module "github-service-account" {
pool_name = module.gitlab-wif.pool_name
account_id = google_service_account.gitlab.account_id
repository = var.gitlab_repository
depends_on = [google_service_account.gitlab]
}
# Get the Workload Identity Pool Provider resource name for GitLab CI configuration
Expand Down
1 change: 1 addition & 0 deletions examples/gitlab-ci/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module "github-service-account" {
pool_name = module.gitlab-wif.pool_name
account_id = google_service_account.gitlab.account_id
repository = var.gitlab_repository
depends_on = [google_service_account.gitlab]
}

# Get the Workload Identity Pool Provider resource name for GitLab CI configuration
Expand Down

0 comments on commit 2e8894f

Please sign in to comment.