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 me too comments, 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
The provider has a singular okta_request_sequence data source, but it requires both the resource_id and the sequence id to be known ahead of time. Sequence IDs are opaque 24-character identifiers (e.g. 0000aaaa1111bbbb2222cccc) and are typically created in the Okta Admin Console, so there is no practical way to discover them from Terraform today.
A plural okta_request_sequences data source that lists all access request sequences for a resource would let configurations discover sequences by name, e.g. to wire an okta_request_condition up to a sequence without hard-coding its ID.
The Okta Governance API already supports this via
GET /governance/api/v2/resources/{resourceId}/request-sequences
(listResourceRequestSequencesV2), which is exposed in okta-governance-sdk-golang as RequestSequencesAPI.ListResourceRequestSequencesV2 — the same API/SDK surface the existing singular data source uses.
New or Affected Resource(s)
- New data source:
okta_request_sequences
Potential Terraform Configuration
data "okta_request_sequences" "example" {
resource_id = "<okta_resource_id>"
}
locals {
manager_approval_sequence_id = one([
for seq in data.okta_request_sequences.example.request_sequences : seq.id
if seq.name == "Requester's Manager Approval"
])
}
References
Community Note
Description
The provider has a singular
okta_request_sequencedata source, but it requires both theresource_idand the sequenceidto be known ahead of time. Sequence IDs are opaque 24-character identifiers (e.g.0000aaaa1111bbbb2222cccc) and are typically created in the Okta Admin Console, so there is no practical way to discover them from Terraform today.A plural
okta_request_sequencesdata source that lists all access request sequences for a resource would let configurations discover sequences by name, e.g. to wire anokta_request_conditionup to a sequence without hard-coding its ID.The Okta Governance API already supports this via
GET /governance/api/v2/resources/{resourceId}/request-sequences(
listResourceRequestSequencesV2), which is exposed inokta-governance-sdk-golangasRequestSequencesAPI.ListResourceRequestSequencesV2— the same API/SDK surface the existing singular data source uses.New or Affected Resource(s)
okta_request_sequencesPotential Terraform Configuration
References
listResourceRequestSequencesV2— https://developer.okta.com/docs/api/openapi/okta-governance/governance/tag/Request-Sequences/okta_request_sequence