Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use a custom service account for Cloud Build #387

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/codehealth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ jobs:

- name: Execute "npm run markdown-link-check"
run: npm run markdown-link-check

- name: Use terraform
uses: hashicorp/setup-terraform@v3

- name: terraform validate deployments
run: npm run terraform-validate
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ npm run eslint
npm run markdown-link-check
npm run mdlint
npm run typecheck
npm run terraform-validate
npm test

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"start-forwarder-function": "functions-framework --target=forwardFromHTTP",
"start-poller-function": "functions-framework --target=checkSpannerScaleMetricsHTTP",
"start-scaler-function": "functions-framework --target=scaleSpannerInstanceHTTP --port=8081",
"terraform-validate": "set -e ; package_root=\"$(pwd)\"; for x in gke/decoupled gke/unified cloud-functions/distributed/app-project cloud-functions/distributed/autoscaler-project cloud-functions/per-project ; do cd \"$package_root/terraform/$x\" ; echo \"\n\nValidating Terraform in $PWD\n\n\" ; terraform init ; terraform validate; done",
"test": "NODE_ENV=test nyc --reporter=text mocha --recursive src --extension=.test.js",
"test-e2e": "pushd terraform/cloud-functions/per-project/test && go test -run . -timeout 60m --tags=e2e && popd",
"typecheck": "tsc --project jsconfig.json --maxNodeModuleJsDepth 0 --noEmit",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion terraform/cloud-functions/distributed/app-project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.43.0"
version = ">= 6.2.0"
}
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.43.0"
version = ">= 6.2.0"
}
}
}
Expand Down Expand Up @@ -54,6 +54,7 @@ module "autoscaler-functions" {
poller_sa_email = google_service_account.poller_sa.email
scaler_sa_email = google_service_account.scaler_sa.email
forwarder_sa_emails = var.forwarder_sa_emails
build_sa_id = module.autoscaler-base.build_sa_id
}

module "firestore" {
Expand Down
90 changes: 40 additions & 50 deletions terraform/cloud-functions/per-project/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion terraform/cloud-functions/per-project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.43.0"
version = ">= 6.2.0"
}
}
}
Expand Down Expand Up @@ -53,6 +53,7 @@ module "autoscaler-functions" {
region = var.region
poller_sa_email = google_service_account.poller_sa.email
scaler_sa_email = google_service_account.scaler_sa.email
build_sa_id = module.autoscaler-base.build_sa_id
}

module "firestore" {
Expand Down
Loading