Add domain:gitlab.com IAP-secured Web App User for all GCP projects managed by terraform

Problem

In production#5740 (comment 707235844) we faced an issue where no one could access the Prometheus server behind IAP. This resulted into us having to manually add users in pre-prometheus, which worked. We also tried adding gitlab.com to that specific resource, however, we still get access defined, so we can only add specific users and not domains.

Looking at the gitlab-staging gitlab-produciton and gitlab-org-ci they seem to have added this IAM policy on a project level rather than a resource level.

Screenshot_2021-10-19_at_09.53.01

Proposal

Edited by Steve Xuereb