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

APP-15944 - Allow users to manage resource groups #225

Merged
merged 11 commits into from
Nov 14, 2024
Merged

APP-15944 - Allow users to manage resource groups #225

merged 11 commits into from
Nov 14, 2024

Conversation

jzolo22
Copy link
Member

@jzolo22 jzolo22 commented Nov 14, 2024

In this PR:

  • Adds jupiterone_resource_group resource
  • Adds jupiterone_resource_group data source
  • Updates jupiterone_resource_permission to better handle the case of an update to one of the 5 properties that define a resource permission as unique.

Some usage examples:

data "jupiterone_user_group" "jz_questions" {
  name = "Jz questions 2"
}

# NEW
resource "jupiterone_resource_group" "marketing" {
  name = "Marketing"
}

# NEW
data "jupiterone_resource_group" "marketing" {
  name = "Marketing"
}

resource "jupiterone_resource_permission" "jz_questions_permissions" {
  subject_id    = data.jupiterone_user_group.jz_questions.id
  subject_type  = "group"
  resource_area = "rule"
  resource_type = "resource_group"

  # reference the resource group data source 
  resource_id   = data.jupiterone_resource_group.marketing.id
  can_create    = true
  can_read      = true
  can_update    = false
  can_delete    = false
}

In the recorded example:

  • There is a user group data source which is being referenced in the subject_id of the resource permission resource
  • There is a resource group resource created and also referenced via data that is used in the resource_id of the resource permission resource
  • We see that updating that permission set updates the permissions for the correct resource group in the UI
Screen.Recording.2024-11-14.at.14.51.02.mov

@jzolo22 jzolo22 requested a review from a team as a code owner November 14, 2024 19:26
@jzolo22 jzolo22 changed the title App 15944 APP-15944 - Allow users to manage resource groups Nov 14, 2024
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-recorded the rule tests so there was no mention of collectionId

@jzolo22 jzolo22 merged commit 5e05be1 into main Nov 14, 2024
7 checks passed
@jzolo22 jzolo22 deleted the APP-15944 branch November 14, 2024 20:46
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