Skip to content

Conversation

@exitcode0
Copy link
Contributor

@exitcode0 exitcode0 commented Jul 4, 2025

Summary

Adds sorting capabilities and timestamp field to the schema of okta_groups data source
Enables better control over result ordering and access to previously unavailable group metadata

New Features

  • Sorting Parameters: sort_by and sort_order for API-level sorting
  • Timestamp Fields: created, last_updated, last_membership_updated as computed attributes
  • Supported Sort Fields: created, lastUpdated, lastMembershipUpdated, id, name
  • Sort Orders: asc and desc
  • Add tests for new sorting functionality
  • Update documentation with new examples and schema details

Example Configuration

data "okta_groups" "recent" {
  q          = "Engineering"
  sort_by    = "created"
  sort_order = "desc"
}

output "latest_group" {
  value = data.okta_groups.recent.groups[0].created
}

fixes #2466

@github-actions github-actions bot requested a review from pranav-okta July 4, 2025 07:43
@aditya-okta aditya-okta self-requested a review July 17, 2025 04:55
- Add sort_by and sort_order parameters for API-level sorting
- Expose created, last_updated, and last_membership_updated timestamp fields
- Update documentation with sorting examples and schema details
- Support sorting by created, lastUpdated, lastMembershipUpdated, id, and name fields

- Add comprehensive test coverage for sorting functionality
- Add TestAccDataSourceOktaGroups_sorting_comprehensive for all sort fields and orders
- Add TestAccDataSourceOktaGroups_timestamp_fields for timestamp validation
- Test all supported sort fields: created, lastUpdated, lastMembershipUpdated, id, name
- Test both sort orders: asc and desc
- Test combinations with other filters (type)
- Validate timestamp field exposure and formatting
- Verify data source ID uniqueness for different sort parameters
- Add comprehensive test fixtures with multiple scenarios
- Use replace_with_uuid in all test fixtures for group queries
- Re-record VCR cassettes with correct cassette name and UUIDs
- Ensure all acceptance tests pass in VCR playback mode
- Minor test and fixture cleanup for reliability
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.

data_source_okta_groups add missing fields

1 participant