Skip to content

Commit

Permalink
Make the gcp project id recognizable as a placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
Tereius committed Jan 9, 2025
1 parent 69ff087 commit c1579f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Overall, only the compute instance accounts for the "majority" of the costs.

The terraform error looks something like this:
```
Error applying IAM policy for cloudrun service "v1/projects/github-spot-runner/locations/us-east1/services/cloudrun-service": Error setting IAM policy for cloudrun service "v1/projects/github-spot-runner/locations/us-east1/services/cloudrun-service": googleapi: Error 400: One or more users named in the policy do not belong to a permitted customer, perhaps due to an Organization policy
Error applying IAM policy for cloudrun service "v1/projects/my-gcp-project-id/locations/us-east1/services/cloudrun-service": Error setting IAM policy for cloudrun service "v1/projects/my-gcp-project-id/locations/us-east1/services/cloudrun-service": googleapi: Error 400: One or more users named in the policy do not belong to a permitted customer, perhaps due to an Organization policy
```

1. Solution: Use project tags: [How to create public Cloud Run services when Domain Restricted Sharing is enforced](https://cloud.google.com/blog/topics/developers-practitioners/how-create-public-cloud-run-services-when-domain-restricted-sharing-enforced?hl=en)
Expand Down
10 changes: 5 additions & 5 deletions runner-autoscaler/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"program": "main.go",
"output": "debug",
"env": {
"PROJECT_ID": "github-spot-runner",
"ZONE": "europe-west1-c",
"TASK_QUEUE": "projects/github-spot-runner/locations/europe-west1/queues/autoscaler-callback-queue",
"INSTANCE_TEMPLATE": "projects/github-spot-runner/global/instanceTemplates/ephemeral-github-runner",
"SECRET_VERSION": "projects/github-spot-runner/secrets/github-pat-token/versions/latest",
"PROJECT_ID": "my-gcp-project-id",
"ZONE": "us-east1-c",
"TASK_QUEUE": "projects/my-gcp-project-id/locations/us-east1/queues/autoscaler-callback-queue",
"INSTANCE_TEMPLATE": "projects/my-gcp-project-id/global/instanceTemplates/ephemeral-github-runner",
"SECRET_VERSION": "projects/my-gcp-project-id/secrets/github-pat-token/versions/latest",
"GITHUB_ENTERPRISE": "Enterprise;dmVyeXNlY3JldA==",
"GITHUB_ORG": "Organization;dmVyeXNlY3JldA==",
"GITHUB_REPOS": "User/Repo1;dmVyeXNlY3JldA==,User/Repo2;dmVyeXNlY3JldA=="
Expand Down
6 changes: 3 additions & 3 deletions runner-autoscaler/test/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ var PORT = 9999

var scaler *pkg.Autoscaler

const PROJECT_ID = "github-spot-runner"
const REGION = "europe-west1"
const ZONE = "europe-west1-c"
const PROJECT_ID = "my-gcp-project-id"
const REGION = "us-east1"
const ZONE = "us-east1-c"
const GIT_HUB_ORG = "Privatehive"
const TEST_REPO = "Privatehive/runner-test"
const TEST_REPO_KEY = "repository-" + TEST_REPO
Expand Down

0 comments on commit c1579f2

Please sign in to comment.