Skip to content

Commit 01f088f

Browse files
authored
feat: add data source resource set (#2861)
1 parent e59c130 commit 01f088f

7 files changed

Lines changed: 562 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
page_title: "Data Source: okta_iam_resource_set"
3+
description: |-
4+
Get a resource set from Okta.
5+
---
6+
7+
# Data Source: okta_iam_resource_set
8+
9+
Retrieves a resource set by `resourceSetIdOrLabel`.
10+
11+
## Example Usage
12+
13+
```terraform
14+
data "okta_iam_resource_set" "example" {
15+
id = "<resource_set_id_or_label>"
16+
}
17+
```
18+
19+
<!-- schema generated by tfplugindocs -->
20+
## Schema
21+
22+
### Required
23+
24+
- `id` (String) Unique identifier of the resource set.
25+
26+
### Read-Only
27+
28+
- `created` (String) Timestamp when the resource set was created.
29+
- `description` (String) Description of the resource set.
30+
- `label` (String) Unique label for the resource set.
31+
- `last_updated` (String) Timestamp when the resource set was last updated.
32+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
variable "hostname" {
2+
type = string
3+
}
4+
5+
resource "okta_resource_set" "test" {
6+
label = "testAcc_replace_with_uuid"
7+
description = "testing, testing"
8+
resources = [
9+
"https://${var.hostname}/api/v1/users",
10+
]
11+
lifecycle {
12+
ignore_changes = [resources]
13+
}
14+
}
15+
16+
data "okta_iam_resource_set" "test" {
17+
id = okta_resource_set.test.id
18+
}

okta/resources/resources.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const (
8282
OktaIDaaSGroups = "okta_groups"
8383
OktaIDaaSGroupSchemaProperty = "okta_group_schema_property"
8484
OktaIDaaSIamAssigneesUser = "okta_iam_assignees_user"
85+
OktaIDaaSIamResourceSet = "okta_iam_resource_set"
8586
OktaIDaaSIdentitySourceGroup = "okta_identity_source_group"
8687
OktaIDaaSIdentitySourceGroupMembership = "okta_identity_source_group_membership"
8788
OktaIDaaSIdentitySourceGroupMemberships = "okta_identity_source_group_memberships"

okta/services/idaas/data_source_okta_iam_resource_set.go

Lines changed: 119 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

okta/services/idaas/data_source_okta_iam_resource_set_test.go

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

okta/services/idaas/idaas.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ func FWProviderDataSources() []func() datasource.DataSource {
183183
newPoliciesRuleAccessPolicyDataSource,
184184
newAuthorizationServersPoliciesRuleDataSource,
185185
newIamAssigneesUserDataSource,
186+
newIamResourceSetDataSource,
186187
}
187188
}
188189

0 commit comments

Comments
 (0)