Skip to content

Commit 62eddfb

Browse files
authored
Add api label and resource owners to TF (#2867)
1 parent 01f088f commit 62eddfb

40 files changed

Lines changed: 2507 additions & 20 deletions

docs/data-sources/label.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
page_title: "Data Source: okta_label"
3+
description: |-
4+
Manages an okta_label data source.
5+
---
6+
7+
# Data Source: okta_label
8+
9+
Retrieves a single label
10+
11+
## Argument Reference
12+
13+
The following arguments are supported:
14+
15+
## Attribute Reference
16+
17+
In addition to the arguments above, the following attributes are exported:
18+
19+
- `id` - The ID of the data source.
20+
- `label_id` - The ID of a label
21+
- `name` - Key name of the label
22+
- `values` - List of label values
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
page_title: "Data Source: okta_resource_label"
3+
description: |-
4+
Manages an okta_resource_label data source.
5+
---
6+
7+
# Data Source: okta_resource_label
8+
9+
Lists all labeled resources > **Note:** If you create a custom admin role to view labeled resources, ensure that the custom role has permissions to view the resource and governance labels.
10+
11+
## Argument Reference
12+
13+
The following arguments are supported:
14+
15+
## Attribute Reference
16+
17+
In addition to the arguments above, the following attributes are exported:
18+
19+
- `id` - The ID of the data source.
20+
- `labels` - List of assigned labels
21+
- `orn` - The Okta resource, in [ORN format](https://developer.okta.com/docs/api/openapi/okta-management/guides/roles/#okta-resource-name-orn) format.
22+
- `profile` - A limited set of properties from the resource's profile
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
page_title: "Data Source: okta_resource_owner"
3+
description: |-
4+
Manages an okta_resource_owner data source.
5+
---
6+
7+
# Data Source: okta_resource_owner
8+
9+
Lists all resources with assigned owners for an app (the parent resource).
10+
11+
## Argument Reference
12+
13+
The following arguments are supported:
14+
15+
## Attribute Reference
16+
17+
In addition to the arguments above, the following attributes are exported:
18+
19+
- `id` - The ID of the data source.
20+
- `parent_resource_orn` - The Okta resource, in [ORN format](https://developer.okta.com/docs/api/openapi/okta-management/guides/roles/#okta-resource-name-orn) format.
21+
- `principals` - The principals that own the resource (users or groups)
22+
- `resource` - Details of a resource that are owned by the principal, such as an app, an entitlement value, an entitlement bundle, or a collection
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
page_title: "Data Source: okta_resource_owners_catalog_resource"
3+
description: |-
4+
Manages an okta_resource_owners_catalog_resource data source.
5+
---
6+
7+
# Data Source: okta_resource_owners_catalog_resource
8+
9+
Lists all resources without assigned owners for an app (the parent resource).
10+
11+
## Argument Reference
12+
13+
The following arguments are supported:
14+
15+
## Attribute Reference
16+
17+
In addition to the arguments above, the following attributes are exported:
18+
19+
- `id` - The ID of the data source.
20+
- `data` - Resource owner details
21+
- `parent_resource_orn` - The Okta resource, in [ORN format](https://developer.okta.com/docs/api/openapi/okta-management/guides/roles/#okta-resource-name-orn) format.

docs/resources/label.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
page_title: "Resource: okta_label"
3+
description: |-
4+
Manages an okta_label resource.
5+
---
6+
7+
# Resource: okta_label
8+
9+
Manages an okta_label resource.
10+
11+
## Argument Reference
12+
13+
The following arguments are supported:
14+
- `label_id` - (Required) The ID of a label
15+
- `name` - (Required) Key name of the label
16+
- `values` - (Required) List of label values
17+
18+
## Attribute Reference
19+
20+
In addition to the arguments above, the following attributes are exported:
21+
22+
- `id` - The ID of the resource.

docs/resources/resource_owner.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
page_title: "Resource: okta_resource_owner"
3+
description: |-
4+
Manages an okta_resource_owner resource.
5+
---
6+
7+
# Resource: okta_resource_owner
8+
9+
Manages an okta_resource_owner resource.
10+
11+
## Argument Reference
12+
13+
The following arguments are supported:
14+
- `resource_orns` - (Required) The resources to assign owners
15+
- `principal_orns` - (Optional) Owners of the resource.
16+
17+
## Attribute Reference
18+
19+
In addition to the arguments above, the following attributes are exported:
20+
21+
- `id` - The ID of the resource.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
resource "okta_label" "test" {
2+
name = "test-label-replace_with_uuid"
3+
4+
values {
5+
name = "test-value"
6+
}
7+
}
8+
9+
data "okta_label" "test" {
10+
id = okta_label.test.id
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Data source without corresponding resource
3+
# TODO: Replace placeholders with real values from test org
4+
data "okta_resource_label" "test" {
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
resource "okta_resource_owner" "test" {
2+
resource_orns = ["orn:oktapreview:idp:00onkw1sbuAh3Q06I1d7:apps:oidc_client:0oanlpn0tzc7kh9bx1d7"]
3+
}
4+
5+
data "okta_resource_owner" "test" {
6+
parent_resource_orn = "orn:oktapreview:idp:00onkw1sbuAh3Q06I1d7:apps:oidc_client:0oanlpn0tzc7kh9bx1d7"
7+
depends_on = [okta_resource_owner.test]
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data "okta_resource_owners_catalog_resource" "test" {
2+
parent_resource_orn = "orn:oktapreview:idp:00onkw1sbuAh3Q06I1d7:apps:oidc_client:0oanlpn0tzc7kh9bx1d7"
3+
}

0 commit comments

Comments
 (0)