feat: add okta_request_sequences data source - #2920
Open
exitcode0 wants to merge 1 commit into
Open
Conversation
Adds a plural data source that lists all access request sequences for a resource via the Governance API listResourceRequestSequencesV2 endpoint, so sequence IDs can be discovered by name instead of hard-coded. Also renames the singular data source constructor from newRequestSequencesDataSource to newRequestSequenceDataSource to match the okta_request_sequence type it registers, freeing the plural name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2919
Summary
Adds a new
okta_request_sequencesdata source that lists all access request sequences for a resource, using the Governance APIlistResourceRequestSequencesV2endpoint (GET /governance/api/v2/resources/{resourceId}/request-sequences), which is already exposed byokta-governance-sdk-golangv1.1.0.The existing singular
okta_request_sequencedata source requires the sequenceidto be known ahead of time, but sequence IDs are opaque and typically created in the Okta Admin Console — there was previously no way to discover them from Terraform. This data source enables looking up a sequence ID by name:Changes
okta_request_sequences(okta/services/governance/data_source_request_sequences.go)resource_id(required) — the resource in Okta ID or ORN formatrequest_sequences(computed) — list of objects withid,name,description,linkandcompatible_resource_typesschema.ListAttributewithtypes.ObjectTypefor protocol v5 mux compatibilitynewRequestSequencesDataSource→newRequestSequenceDataSourceso its name matches theokta_request_sequencetype it registers (internal only, no user-facing change), freeing the plural name for the new data sourceTestAccDataSourceOktaRequestSequences_readplus example fixturestfplugindocsNotes
0oaoum6j3cElINe1z1d7) used byTestAccDataSourceOktaRequestSequence_read, so this can be recorded against the maintainer test orgs the same way that cassette was. Recording it from an external org isn't practical today: the VCR hook sanitizes request hostnames but not response bodies, and this list endpoint returns the names, descriptions and org-domainlinks of every sequence on the resource (see feat: check for leaked data in VCRs after recording #2740 / fix: sanitize hostnames in existing VCR cassettes #2741 for proposed response-body sanitization).