okta / terraform-provider-okta

A Terraform provider to manage Okta resources, enabling infrastructure-as-code provisioning and management of users, groups, applications, and other Okta objects.
https://registry.terraform.io/providers/okta/okta
Mozilla Public License 2.0
255 stars 207 forks source link

data_source_okta_groups - support type and search simultaneously #1987

Open exitcode0 opened 6 months ago

exitcode0 commented 6 months ago

Community Note


Description

The following Are valid API requests

/api/v1/groups?search=type eq "APP_GROUP" and profile.name eq "example_group_name"
/api/v1/groups?search=type eq "OKTA_GROUP" and profile.name eq "example_group_name"

With this in mind, the terraform provider should support type and search at the same time on a data_source_okta_groups

New or Affected Resource(s)

Potential Terraform Configuration

data "okta_groups" "example_okta_group_name" {
  type   = "OKTA_GROUP"
  search = "profile.name eq \"example_okta_group_name\""
}
data "okta_groups" "example_app_group_name" {
  type   = "APP_GROUP"
  search = "profile.name eq \"example_app_group_name\""
}

References

duytiennguyen-okta commented 5 months ago

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-724401