Skip to content

feat(enterprises): Enterprise role bindings resource#580

Merged
0msokolowski0 merged 8 commits intomasterfrom
msokolowski.WIRE-1497
Oct 17, 2025
Merged

feat(enterprises): Enterprise role bindings resource#580
0msokolowski0 merged 8 commits intomasterfrom
msokolowski.WIRE-1497

Conversation

@0msokolowski0
Copy link
Copy Markdown
Contributor

@0msokolowski0 0msokolowski0 commented Oct 13, 2025

This PR introduces a new resource castai_enterprise_role_bindings to manage enterprise role bindings in CAST AI.

The resource supports the following operations:

  • Create: EnterpriseAPI_BatchCreateEnterpriseRoleBindings
  • Read: EnterpriseAPI_ListEnterpriseRoleBindings
  • Update: EnterpriseAPI_BatchUpdateEnterpriseRoleBindings
  • Delete: EnterpriseAPI_BatchDeleteEnterpriseRoleBindings

Example

resource "castai_enterprise_role_binding" "enterprise_rb" {
  enterprise_id   = "63a24904-9ae7-4a6b-bdb2-15dcafc42b66"
  organization_id = "63a24904-9ae7-4a6b-bdb2-15dcafc42b66"

  name        = "Enterprise Role Binding - Owner"
  description = "Enterprise Role Binding for Owner role"
  role_id     = "0145fead-6c09-41cb-a262-cfaaab392971"

  scopes {
    organization {
      id = "63a24904-9ae7-4a6b-bdb2-15dcafc42b66"
    }
  }

  subjects {
    user {
      id = "67e71067-04c4-4423-8655-9c366b7234b0"
    }
  }
}

resource "castai_enterprise_role_binding" "child_rb" {
  enterprise_id   = "63a24904-9ae7-4a6b-bdb2-15dcafc42b66"
  organization_id = "76452f30-9b42-4847-a33e-9bc39e80ead2"

  name        = "Child Role Binding - Member"
  description = "Child Role Binding for Member role"
  role_id     = "8c60bd8e-21de-402a-969f-add07fd22c1b"

  scopes {
    organization {
      id = "76452f30-9b42-4847-a33e-9bc39e80ead2"
    }
  }

  subjects {
    user {
      id = "67e71067-04c4-4423-8655-9c366b7234b0"
    }

    service_account {
      id = "7ae72c7f-c0ac-4e15-8287-cc058b43eb14"
    }

    service_account {
      id = "8dd98f12-43f3-48f5-89b3-d0ca96ec00b2"
    }

    service_account {
      id = "66be7d78-7081-41d8-9549-97fd5767801b"
    }

    group {
      id = "0fbeba03-d1c0-48b9-8deb-09da9f43a75b"
    }
  }
}

@0msokolowski0 0msokolowski0 changed the title Init Enterprises: Terraform Provider: Enterprise role bindings management Oct 15, 2025
@0msokolowski0 0msokolowski0 changed the title Enterprises: Terraform Provider: Enterprise role bindings management feat(enterprises): Enterprise role bindings resource Oct 15, 2025
@0msokolowski0 0msokolowski0 marked this pull request as ready for review October 15, 2025 08:39
@0msokolowski0 0msokolowski0 requested a review from a team as a code owner October 15, 2025 08:39
@0msokolowski0 0msokolowski0 merged commit f21c8e7 into master Oct 17, 2025
11 checks passed
@0msokolowski0 0msokolowski0 deleted the msokolowski.WIRE-1497 branch October 17, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants