Support provisioning of several MIG Self Hosted Runners
danielfunke opened this issue · 1 comments
TL;DR
The gh-runner-mig-vm
module (v3.1.0) creates a secret in the Secret Manager with name gh-token
and value gh_token
. A second module, with other labels, image, service account, replicas, etc. will attempt to create the same secret, which will result in an error:
Error: Error creating Secret: googleapi: Error 409: Secret [projects/xxxxxxxxx/secrets/gh-token] already exists.
with module.my_module_name.google_secret_manager_secret.gh-secret
on .terraform/modules/my_module_name/modules/gh-runner-mig-vm/main.tf line 75, in resource "google_secret_manager_secret" "gh-secret":
Terraform Resources
Detailed design
Ideally, add a new optional variable, gh_token_key
, that defines what name should be given to the secret to avoid conflicts. Another alternative would be to add a variable, similarly to create_network
and create_subnetwork
, create_gh_token
so that it's possible to control whether to create the secret or attempt to use an existing one with the gh-token
name.
Additional information
No response
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days