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

Expose custom group attributes in data_source_okta_groups #1009

Closed
exitcode0 opened this issue Mar 10, 2022 · 1 comment · Fixed by #1041
Closed

Expose custom group attributes in data_source_okta_groups #1009

exitcode0 opened this issue Mar 10, 2022 · 1 comment · Fixed by #1041
Assignees
Labels
enhancement Asking for new behavior or feature

Comments

@exitcode0
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Exposing custom group attributes in the okta_groups datasource would allow for powerful list comprehensions based on custom attributes

New or Affected Resource(s)

  • data_source_okta_groups

Potential Terraform Configuration

data "okta_groups" "all_groups" {
  search = "type eq \"OKTA_GROUP\""
}

locals {
  org_name = "example"
  base_url = "okta.com"
}

resource "okta_resource_set" "example" {
  label       = "admin groups"
  description = "Groups that may grant privileged/sensitive access to an application"
  resources = [ 
    for group in data.okta_groups.all_groups.groups : 
    "https://${local.org_name}.${local.base_url}/api/v1/groups/${group.id}" 
    if group.profile.admin == True 
  ]
}

References

  • #0000
@exitcode0 exitcode0 added the enhancement Asking for new behavior or feature label Mar 10, 2022
@monde monde self-assigned this Mar 10, 2022
@monde
Copy link
Collaborator

monde commented Mar 10, 2022

thanks @exitcode0 , this looks like a good idea to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Asking for new behavior or feature
Projects
None yet
2 participants