-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
117 additions
and
80 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
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 |
---|---|---|
@@ -1,20 +1,15 @@ | ||
locals { | ||
webhook_enterprise_url = local.hasEnterprise ? [format("Enterprise webhook Secret: %s Payload URL %s/%s?%s=%s", random_password.webhook_enterprise_secret.result, google_cloud_run_v2_service.autoscaler.uri, local.webhookUrl, local.sourceQueryParamName, urlencode(var.github_enterprise))] : [] | ||
webhook_org_url = local.hasOrg ? [format("Organization webhook Secret: %s Payload URL %s/%s?%s=%s", random_password.webhook_org_secret.result, google_cloud_run_v2_service.autoscaler.uri, local.webhookUrl, local.sourceQueryParamName, urlencode(var.github_organization))] : [] | ||
webhook_repos_urls = local.hasRepo ? [for i, v in var.github_repositories : format("Repository webhook Secret: %s Payload URL %s/%s?%s=%s", random_password.webhook_repo_secret[v].result, google_cloud_run_v2_service.autoscaler.uri, local.webhookUrl, local.sourceQueryParamName, urlencode(v))] : [] | ||
webhook_enterprise_url = local.hasEnterprise ? [format("Create Enterprise webhook with Secret: %s Payload URL %s%s?%s=%s", random_password.webhook_enterprise_secret.result, google_cloud_run_v2_service.autoscaler.uri, local.webhookUrl, local.sourceQueryParamName, urlencode(var.github_enterprise))] : [] | ||
webhook_org_url = local.hasOrg ? [format("Create Organization webhook with Secret: %s Payload URL %s%s?%s=%s", random_password.webhook_org_secret.result, google_cloud_run_v2_service.autoscaler.uri, local.webhookUrl, local.sourceQueryParamName, urlencode(var.github_organization))] : [] | ||
webhook_repos_urls = local.hasRepo ? [for i, v in var.github_repositories : format("Create Repository webhook with Secret: %s Payload URL %s%s?%s=%s", random_password.webhook_repo_secret[v].result, google_cloud_run_v2_service.autoscaler.uri, local.webhookUrl, local.sourceQueryParamName, urlencode(v))] : [] | ||
} | ||
|
||
output "runner_webhook_config" { | ||
value = join("\n", local.webhook_enterprise_url, local.webhook_org_url, local.webhook_repos_urls) | ||
description = "Create a webhook (for event: Workflow jobs) in your organization with this url and the given secret" | ||
description = "Create webhook(s) (for event: Workflow jobs) in your enterprise, organization or repositories with the url and secret" | ||
} | ||
|
||
output "github_pat_secret_name" { | ||
value = google_secret_manager_secret.github_pat_token.secret_id | ||
description = "The name of the secret where the GitHub Fine-grained personal access token has to be saved" | ||
} | ||
|
||
output "runner_registration_procedure" { | ||
value = var.github_runner_group_id > 0 ? "jit-config registration" : "registration token" | ||
description = "What runner registration procedure is used" | ||
description = "The name of the secret in gcp Secret Manager where the GitHub Fine-grained personal access token (classic) has to be saved" | ||
} |
Oops, something went wrong.