We have some terraform that generates each developer their own GCP project, along with all the infrastructure and build pipelines they'd need to run their stack themselves.
It looks something like this:
module "incident_io" {
for_each = {
"staging" = {
project = "incident-io-staging"
}
"production" = {
project = "incident-io-production"
}
"dev-lawrence" = {
project = "incident-io-dev-lawrence"
autodeploy = true
}
"dev-lisa" = {
project = "incident-io-dev-lisa"
autodeploy = true
}
# ...
}
source = "./modules/stack"
application = "incident-io"
instance = each.key
google_project_id = each.value.project
autodeploy = lookup(each.value, "autodeploy", false)
}
So their traces + logs get sent to their own StackDriver instances, rather than polluting either staging or production.