Skip to content

Commit 1268db6

Browse files
authored
adds entitlement bundle resource and data source (#2485)
1 parent fea125b commit 1268db6

20 files changed

Lines changed: 1545 additions & 5 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
page_title: "Data Source: okta_entitlement_bundle"
3+
description: |-
4+
Gets the full representation of a entitlement bundle.
5+
---
6+
7+
# Data Source: okta_entitlement
8+
9+
Get the entitlement bundle for the given id.
10+
11+
## Example Usage
12+
13+
```terraform
14+
data "okta_entitlement_bundle" "test" {
15+
id = "<entitlement_bundle id>"
16+
}
17+
```
18+
19+
<!-- schema generated by tfplugindocs -->
20+
## Schema
21+
22+
### Required
23+
- `id` (String) The ID of this resource.
24+
25+
### Read-Only
26+
- `name` (String) The display name for an entitlement bundle.
27+
- `description` (String) The description of an entitlement property.
28+
- `target_resource_orn` (String) The ORN of the target resource. Required when updating the entitlement bundle.
29+
- `status` (String) The status of the entitlement bundle.
30+
- `target` (Object) Representation of a resource (see [below for nested schema](#nestedatt--target))
31+
- `entitlements` (Array) List of entitlements in the bundle (see [below for nested schema](#nestedatt--entitlements))
32+
- `created` (String) The created timestamp of this resource.
33+
- `last_updated` (String) The last updated timestamp of this resource.
34+
- `created_by` (String) The ID of the user that created this resource.
35+
- `last_updated_by` (String) The ID of the user that last updated this resource.
36+
37+
38+
<a id="nestedatt--brands"></a>
39+
### Nested Schema for `entitlement`
40+
41+
### Read-Only
42+
43+
- `id` (String) The id property of an entitlement.
44+
- `data_type` (String) The data type of the entitlement property.
45+
- `description` (String) The description of an entitlement property.
46+
- `external_value` (String) The value of an entitlement property.
47+
- `multi_value` (Boolean) The property that determines if the entitlement property can hold multiple values.
48+
- `name` (String) The display name for an entitlement property.
49+
- `required` (Boolean) The property that determines if the entitlement property is a required attribute.
50+
- `values`(Array) (see [below for nested schema](#nestedblock----values))
51+
52+
<a id="nestedblock--values"></a>
53+
### Nested Schema for `values`
54+
Read-Only:
55+
- `id` (String) The id of an entitlement value.
56+
- `name` (String) The display name for an entitlement value.
57+
- `description` (String) The description of an entitlement value.
58+
- `external_id` (String) The ID of an entitlement property value in the downstream application.
59+
- `external_value` (String) The value of an entitlement property value.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
page_title: "Resource: okta_entitlement_bundle"
3+
description: |-
4+
Entitlement bundle allows you to manage entitlement bundles. Entitlement bundles allow you to grant multiple entitlements simultaneously to your users.
5+
---
6+
7+
# Resource: okta_entitlement
8+
9+
Manages Entitlement Bundles. This resource allows you to create and configure an Okta [Entitlement Bundle](https://developer.okta.com/docs/api/iga/openapi/governance.api/tag/Entitlement-Bundles/#tag/Entitlement-Bundles).
10+
11+
## Example Usage
12+
13+
```terraform
14+
resource "okta_entitlement_bundle" "example" {
15+
name = "example"
16+
}
17+
```
18+
19+
<!-- schema generated by tfplugindocs -->
20+
## Schema
21+
22+
### Required
23+
- `name` (String) The display name for an entitlement bundle.
24+
- `target` (Object) Representation of a resource (see [below for nested schema](#nestedblock--target))
25+
- `entitlements` (List) List of entitlements in the bundle (see [below for nested schema](#nestedblock--entitlements))
26+
27+
### Optional
28+
- `description` (String) The description of an entitlement property.
29+
- `target_resource_orn` (String) The ORN of the target resource. Required when updating the entitlement bundle.
30+
- `status` (String) The status of the entitlement bundle.
31+
32+
<a id="nestedblock--parent"></a>
33+
### Nested Schema for `target`
34+
### Required
35+
- `external_id` (String) The Okta app ID of the resource.
36+
- `type` (String) The type of resource.
37+
38+
<a id="nestedblock--values"></a>
39+
### Nested Schema for `entitlements`
40+
### Required
41+
- `id` (String) The ID of the entitlement.
42+
- `values` (List) (see [below for nested schema](#nestedblock--values))
43+
44+
<a id="nestedblock--values"></a>
45+
### Nested Schema for `values`
46+
### Required
47+
- `id` (String) The ID of the entitlement value.
48+
49+
50+
## Import
51+
52+
Import is supported using the following syntax:
53+
54+
```shell
55+
terraform import okta_entitlement_bundle.example <entitlement_bundle_id>
56+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data "okta_entitlement_bundle" test{
2+
3+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
resource "okta_entitlement_bundle" "test" {
2+
name = "entitlement bundle data source test"
3+
description = "test resource for entitlement bundle data source"
4+
5+
target {
6+
external_id = "0oao01ardu8r8qUP91d7"
7+
type = "APPLICATION"
8+
}
9+
10+
entitlements {
11+
id = "espzcbqd7Suwp4Y7A1d6"
12+
13+
values {
14+
id = "entzcbqd8lcD3BRWR1d6"
15+
}
16+
}
17+
}
18+
19+
data "okta_entitlement_bundle" "test" {
20+
id = okta_entitlement_bundle.test.id
21+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
resource "okta_entitlement_bundle" "test" {
2+
name = "test-entitlement-bundle"
3+
description = "testing entitlement bundle"
4+
5+
target {
6+
external_id = "0oao01ardu8r8qUP91d7"
7+
type = "APPLICATION"
8+
}
9+
10+
entitlements {
11+
id = "espzcbqd7Suwp4Y7A1d6"
12+
13+
values {
14+
id = "entzcbqd8lcD3BRWR1d6"
15+
}
16+
}
17+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import okta_entitlement_bundle.example <entitlement_bundle_id>

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/jarcoal/httpmock v1.4.1
2424
github.com/kelseyhightower/envconfig v1.4.0
2525
github.com/lestrrat-go/jwx v1.2.31
26-
github.com/okta/okta-governance-sdk-golang v1.0.0
26+
github.com/okta/okta-governance-sdk-golang v1.0.1
2727
github.com/okta/okta-sdk-golang/v4 v4.1.2
2828
github.com/okta/okta-sdk-golang/v5 v5.0.6
2929
github.com/patrickmn/go-cache v2.1.0+incompatible

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx
210210
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
211211
github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
212212
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
213-
github.com/okta/okta-governance-sdk-golang v1.0.0 h1:qByhbHCEbO8sWYKHdPYLGN7PkYiu2yjA/gWwBKDWWT4=
214-
github.com/okta/okta-governance-sdk-golang v1.0.0/go.mod h1:/CFokSsJXofAn/gve+vccBRFNwkHTxqm45ER2F8RMdU=
213+
github.com/okta/okta-governance-sdk-golang v1.0.1 h1:gUrN6d/ToDONlH5euT24M2rfZH++TC8ZyoTjDOQO1sk=
214+
github.com/okta/okta-governance-sdk-golang v1.0.1/go.mod h1:1YDtCwP5TL2yFmN2Wd3kSrlR8bc1lI62Hd4X52YoO00=
215215
github.com/okta/okta-sdk-golang/v4 v4.1.2 h1:gSycAYWGrvYeXBW8HakMZnNu/ptMuTvTQ/zZ7lgmtPI=
216216
github.com/okta/okta-sdk-golang/v4 v4.1.2/go.mod h1:01oiHDXvZQHlZo1Uw084VDYwXIqJe19z34b53PBZpUY=
217217
github.com/okta/okta-sdk-golang/v5 v5.0.6 h1:p7ptDMB1KxQ/7xSh+6FhMSybwl+ubTV4f1oL4N0Bu6U=

okta/resources/resources.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ const (
121121
OktaIDaaSUserType = "okta_user_type"
122122
OktaGovernanceCampaign = "okta_campaign"
123123
OktaGovernanceEntitlement = "okta_entitlement"
124+
OktaGovernanceEntitlementBundle = "okta_entitlement_bundle"
124125
OktaGovernanceReview = "okta_review"
125126
OktaGovernancePrincipalEntitlements = "okta_principal_entitlements"
126127
OktaGovernanceRequestCondition = "okta_request_condition"

0 commit comments

Comments
 (0)