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

Update iam.tf #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,13 @@ resource "google_project_iam_member" "service_account_project_event_driven_sink_
resource "google_service_account_key" "credentials" {
service_account_id = google_service_account.firefly.name
}

resource "google_organization_iam_binding" "example" {
count = var.enable_folder_viewer ? 1 : 0
organization = var.org_id
role = "roles/resourcemanager.folderViewer"

members = [
"serviceAccount:${google_service_account.firefly.email}",
]
}
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,15 @@ variable "exclude_projects_discovery_regex" {
default = []
description = "Regex to exclude projects from discovery. If empty, all found projects will be discovered and added as integration to Firefly"
}

variable "enable_folder_viewer" {
type = bool
default = true
description = "Should Firefly discover the projects' folder names?"
}

variable "org_id" {
type = string
description = "Mandatory only for folders viewer."
default = ""
}