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

Setup access to audit logs for kyma-project admins #12295

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
5 changes: 5 additions & 0 deletions configs/terraform/environments/prod/iam-variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "kyma_developer_admins_email" {
KacperMalachowski marked this conversation as resolved.
Show resolved Hide resolved
description = "The email of the Kyma Developer Admins group."
type = string
default = "[email protected]"
}
20 changes: 20 additions & 0 deletions configs/terraform/environments/prod/iam.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Setups IAM for the project administrators in the kyma-project GCP project.
import {
id = "kyma-project roles/editor group:[email protected]"
to = google_project_iam_member.kyma_developer_admins_editor
}

resource "google_project_iam_member" "kyma_developer_admins_editor" {
provider = google.kyma_project
project = var.kyma_project_gcp_project_id
role = "roles/editor"
member = "group:${var.kyma_developer_admins_email}"
KacperMalachowski marked this conversation as resolved.
Show resolved Hide resolved
}

# Add roles required to see audit logs in kyma-project GCP project.
resource "google_project_iam_member" "kyma_developer_admins_logging_viewer" {
provider = google.kyma_project
project = var.kyma_project_gcp_project_id
role = "roles/logging.viewer"
member = "group:${var.kyma_developer_admins_email}"
KacperMalachowski marked this conversation as resolved.
Show resolved Hide resolved
}
6 changes: 0 additions & 6 deletions configs/terraform/environments/prod/service_accounts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ resource "google_service_account" "sa-gke-kyma-integration" {
description = "Service account is used by Prow to integrate with GKE. Will be removed with Prow"
}

resource "google_service_account" "gcr-cleaner" {
account_id = "gcr-cleaner"
display_name = "gcr-cleaner"
description = "Service account is used by gcr-cleaner tool."
}

resource "google_service_account" "control-plane" {
account_id = "control-plane"
display_name = "control-plane"
Expand Down
Loading