Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ao Zhang committed May 14, 2024
1 parent f4d1ac8 commit 26594d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_roles.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "google_project_iam_custom_role" "agentless_orchestrate_monitored_proje
// Role created at organization
// Note this binding happens at the organization level because the custom role requires organization level permissions
resource "google_organization_iam_custom_role" "agentless_orchestrate_monitored_project_resource_group" {
count = var.integration_type == "PROJECT" ? 1 : 0
count = var.global && (var.integration_type == "PROJECT") ? 1 : 0

org_id = var.organization_id
role_id = replace("${var.prefix}-resource-group-${local.suffix}", "-", "_")
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ resource "google_project_iam_member" "agentless_orchestrate_monitored_project" {
member = "serviceAccount:${local.agentless_orchestrate_service_account_email}"
}

// Orchestrate Service Account <-> Role Binding for Custom Role created for project-level integration
// Orchestrate Service Account <-> Role Binding for Custom Role project-level resource group support
resource "google_organization_iam_member" "agentless_orchestrate_monitored_project_resource_group" {
count = var.integration_type == "PROJECT" ? 1 : 0
count = var.global && (var.integration_type == "PROJECT") ? 1 : 0

org_id = var.organization_id
org_id = local.organization_id
role = google_organization_iam_custom_role.agentless_orchestrate_monitored_project_resource_group[0].id
member = "serviceAccount:${local.agentless_orchestrate_service_account_email}"
}
Expand Down

0 comments on commit 26594d9

Please sign in to comment.