Skip to content

feat(infra): add IAP API and static IP for monitoring.osv.dev - #6440

Open
jess-lowe wants to merge 1 commit into
google:masterfrom
jess-lowe:terraform_monitoring_prep
Open

jess-lowe wants to merge 1 commit into
google:masterfrom
jess-lowe:terraform_monitoring_prep

Conversation

@jess-lowe

@jess-lowe jess-lowe commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Adds the remaining additive Terraform resources needed to prepare oss-vdb and oss-vdb-test for production Plutono / GMP dashboard serving (monitoring.osv.dev), rebased onto #6448 (osv-monitoring Workload Identity).

Note: This pull request was developed with AI assistance.

Details

  • IAP API (modules/osv/gcp_apis.tf): Codifies iap.googleapis.com (disable_on_destroy = false).
  • Static Ingress IP (environments/oss-vdb/main.tf): Reserves google_compute_global_address.grafana_ingress_ip (grafana-ingress-ip) in oss-vdb and exports its address as an output for monitoring.osv.dev DNS configuration.
  • Cross-Project Monitoring Access Prep (environments/oss-vdb-test/main.tf): Stages a commented-out roles/monitoring.viewer binding for osv-monitoring@oss-vdb.iam.gserviceaccount.com on oss-vdb-test so production's gmp-frontend-test sidecar can query staging Cloud Monitoring once enable_workload_identity = true is applied in oss-vdb.

(The dedicated osv-monitoring SA and opt-in GKE Workload Identity pool previously drafted in this PR were superseded by #6448 and removed during rebase.)

Testing

  • Verified terraform fmt -check -recursive -diff passes with zero findings across deployment/terraform/.

role = "roles/iam.workloadIdentityUser"
member = "serviceAccount:oss-vdb.svc.id.goog[default/grafana-sa]"

depends_on = [module.osv_pipeline]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a module, seems like there's a bunch of duplicated code between oss and oss-vdb-test


# Workload Identity binding for the default Kubernetes ServiceAccount
resource "google_service_account_iam_member" "worker_sa_wi" {
count = var.enable_workload_identity ? 1 : 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't just enable it for worker, also need to apply it to the custom metrics

@jess-lowe
jess-lowe force-pushed the terraform_monitoring_prep branch from 6961625 to ca270ec Compare November 26, 2026 05:20
@jess-lowe
jess-lowe force-pushed the terraform_monitoring_prep branch from ca270ec to cf7f6ad Compare December 2, 2026 00:36
@jess-lowe jess-lowe changed the title feat(infra): add monitoring SA, static IP, and opt-in Workload Identity feat(infra): add IAP API and static IP for monitoring.osv.dev Dec 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants