Skip to content

Commit

Permalink
Merge pull request #1860 from okta/revert-1854-OKTA-650900_tfplugindo…
Browse files Browse the repository at this point in the history
…cs_resource_and_index

Revert "add tfplugindocs template for resource and index"
  • Loading branch information
duytiennguyen-okta authored Jan 3, 2024
2 parents db44053 + 1729faf commit fcbe853
Show file tree
Hide file tree
Showing 413 changed files with 1,623 additions and 8,356 deletions.
65 changes: 0 additions & 65 deletions docs/data-sources/default_signin_page.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/data-sources/group_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ data "okta_group_rule" "test" {

- `id` (String) The ID of the Group Rule.
- `name` (String) The name of the Group Rule.
- `status` (String) Default to `ACTIVE`
- `status` (String)

### Read-Only

Expand Down
41 changes: 0 additions & 41 deletions docs/data-sources/org_metadata.md

This file was deleted.

155 changes: 25 additions & 130 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,141 +1,36 @@
---
layout: "okta"
page_title: "Provider: Okta"
sidebar_current: "docs-okta-index"
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "okta Provider"
subcategory: ""
description: |-
The Okta provider is used to interact with the resources supported by Okta. The provider needs to be configured with the proper credentials before it can be used.
---

# Okta Provider
# okta Provider

The Okta provider is used to interact with the resources supported by Okta. The provider needs to be configured with the proper credentials before it can be used.

Use the navigation to the left to read about the available resources and data sources.

In case the provider configuration is still using old `"oktadeveloper/okta"` source, please change it to `"okta/okta"` and run
`terraform state replace-provider oktadeveloper/okta okta/okta`. Okta no longer supports `"oktadeveloper/okta"`.

## Example Usage

Terraform 0.14 and later:
<!-- schema generated by tfplugindocs -->
## Schema

```hcl
terraform {
required_providers {
okta = {
source = "okta/okta"
version = "~> 4.6.3"
}
}
}
### Optional

# Configure the Okta Provider
#
# NOTE: Change place holder values denoted by brackets to real values, including
# the brackets.
#
# NOTE: If environment variables are utilized for provider settings the
# corresponding variable name does not need to be set in the provider config
# block.
provider "okta" {
org_name = "[ORG NAME e.g. dev-123456]"
base_url = "[okta.com|oktapreview.com]"
client_id = "[APP CLIENT_ID]"
private_key_id = "[PRIVATE KEY ID - KID]"
private_key = "[PRIVATE KEY]"
scopes = "[COMMA,SEPARATED,SCOPE,VALUES]"
}
```

For the resources and data sources examples, please check the [examples](https://github.com/okta/terraform-provider-okta/tree/master/examples) directory.

## Authentication

The Okta provider offers a flexible means of providing credentials for
authentication. The following methods are supported, in this order, and
explained below:

- Environment variables
- Provider Config

### Environment variables

You can provide your credentials via the `OKTA_ORG_NAME`, `OKTA_BASE_URL`,
`OKTA_ACCESS_TOKEN`, `OKTA_API_TOKEN`, `OKTA_API_CLIENT_ID`, `OKTA_API_SCOPES`,
`OKTA_API_PRIVATE_KEY_ID`, and `OKTA_API_PRIVATE_KEY` environment variables,
representing your Okta Organization Name, Okta Base URL (i.e. `"okta.com"` or
`"oktapreview.com"`), Okta Access Token, Okta API Token, Okta Client ID, Okta
API scopes and Okta API private key respectively.

```hcl
# provider settings established with values from environment variables
provider "okta" {}
```

Usage:

```sh
# Change place holder values denoted by brackets to real values, including the
# brackets.

$ export OKTA_ORG_NAME="[ORG NAME e.g. dev-123456]"
$ export OKTA_BASE_URL="[okta.com|oktapreview.com]"
$ export OKTA_API_CLIENT_ID="[APP CLIENT_ID]"
$ export OKTA_API_PRIVATE_KEY_ID="[PRIVATE KEY ID - KID]"
$ export OKTA_API_PRIVATE_KEY="[PRIVATE KEY]"
$ export OKTA_API_SCOPES="[COMMA,SEPARATED,SCOPE,VALUES]"

$ terraform plan
```

## Argument Reference

Note: `api_token` is mutually exclusive of the set `access_token`, `client_id`,
`private_key_id`, `private_key`, and `scopes`. `client_id`, `private_key_id`,
`private_key`, and `scopes` are for [OAuth 2.0
client](https://developer.okta.com/docs/reference/api/apps/#add-oauth-2-0-client-application)
authentication for application operations. `access_token` is used in situations
where the caller has already performed the OAuth 2.0 client authentication
process. Okta recommend using OAuth2 for authorizing your Terraform modules. `api_token` is utilized for
Okta's [SSWS Authorization
Scheme](https://developer.okta.com/docs/reference/core-okta-api/#authentication)
and applies to org level operations. This is a legacy authorization scheme.

In addition to [generic `provider`
arguments](https://www.terraform.io/docs/configuration/providers.html) (e.g.
`alias` and `version`), the following arguments are supported in the Okta
`provider` block:

- `org_name` - (Optional) This is the org name of your Okta account, for example `dev-123456.oktapreview.com` would have an org name of `dev-123456`. It must be provided, but it can also be sourced from the `OKTA_ORG_NAME` environment variable.

- `base_url` - (Optional) This is the domain of your Okta account, for example `dev-123456.oktapreview.com` would have a base url of `oktapreview.com`. It must be provided, but it can also be sourced from the `OKTA_BASE_URL` environment variable.

- `http_proxy` - (Optional) This is a custom URL endpoint that can be used for unit testing or local caching proxies. Can also be sourced from the `OKTA_HTTP_PROXY` environment variable.

- `access_token` - (Optional) This is an OAuth 2.0 access token to interact with your Okta org. It can be sourced from the `OKTA_ACCESS_TOKEN` environment variable. `access_token` conflicts with `api_token`, `client_id`, `scopes` and `private_key`.

- `api_token` - (Optional) This is the API token to interact with your Okta org. It can also be sourced from the `OKTA_API_TOKEN` environment variable. `api_token` conflicts with `access_token`, `client_id`, `scopes` and `private_key`.

- `client_id` - (Optional) This is the client ID for obtaining the API token. It can also be sourced from the `OKTA_API_CLIENT_ID` environment variable. `client_id` conflicts with `access_token` and `api_token`.

- `scopes` - (Optional) These are scopes for obtaining the API token in form of a comma separated list. It can also be sourced from the `OKTA_API_SCOPES` environment variable. `scopes` conflicts with `access_token` and `api_token`.

- `private_key` - (Optional) This is the private key for obtaining the API token (can be represented by a filepath, or the key itself). It can also be sourced from the `OKTA_API_PRIVATE_KEY` environment variable. `private_key` conflicts with `access_token` and `api_token`. The format of the PK is PKCS#1 unencrypted (header starts with `-----BEGIN RSA PRIVATE KEY-----` or PKCS#8 unencrypted (header starts with `-----BEGIN PRIVATE KEY-----`).

- `private_key_id` - (Optional) This is the private key ID (kid) for obtaining the API token. It can also be sourced from `OKTA_API_PRIVATE_KEY_ID` environmental variable. `private_key_id` conflicts with `api_token`.

- `backoff` - (Optional) Whether to use exponential back off strategy for rate limits, the default is `true`.

- `min_wait_seconds` - (Optional) Minimum seconds to wait when rate limit is hit, the default is `30`.

- `max_wait_seconds` - (Optional) Maximum seconds to wait when rate limit is hit, the default is `300`.

- `max_retries` - (Optional) Maximum number of retries to attempt before returning an error, the default is `5`.

- `request_timeout` - (Optional) Timeout for single request (in seconds) which is made to Okta, the default is `0` (means no limit is set). The maximum value can be `300`.

- `max_api_capacity` - (Optional, experimental) sets what percentage of capacity the provider can use of the total
rate limit capacity while making calls to the Okta management API endpoints. Okta API operates in one minute buckets.
See Okta Management API Rate Limits: https://developer.okta.com/docs/reference/rl-global-mgmt. Can be set to a value between 1 and 100.
- `access_token` (String) Bearer token granting privileges to Okta API.
- `api_token` (String) API Token granting privileges to Okta API.
- `backoff` (Boolean) Use exponential back off strategy for rate limits.
- `base_url` (String) The Okta url. (Use 'oktapreview.com' for Okta testing)
- `client_id` (String) API Token granting privileges to Okta API.
- `http_proxy` (String) Alternate HTTP proxy of scheme://hostname or scheme://hostname:port format
- `log_level` (Number) providers log level. Minimum is 1 (TRACE), and maximum is 5 (ERROR)
- `max_api_capacity` (Number) (Experimental) sets what percentage of capacity the provider can use of the total rate limit capacity while making calls to the Okta management API endpoints. Okta API operates in one minute buckets. See Okta Management API Rate Limits: https://developer.okta.com/docs/reference/rl-global-mgmt/
- `max_retries` (Number) maximum number of retries to attempt before erroring out.
- `max_wait_seconds` (Number) maximum seconds to wait when rate limit is hit. We use exponential backoffs when backoff is enabled.
- `min_wait_seconds` (Number) minimum seconds to wait when rate limit is hit. We use exponential backoffs when backoff is enabled.
- `org_name` (String) The organization to manage in Okta.
- `parallelism` (Number) Number of concurrent requests to make within a resource where bulk operations are not possible. Take note of https://developer.okta.com/docs/api/getting_started/rate-limits.
- `private_key` (String) API Token granting privileges to Okta API.
- `private_key_id` (String) API Token Id granting privileges to Okta API.
- `request_timeout` (Number) Timeout for single request (in seconds) which is made to Okta, the default is `0` (means no limit is set). The maximum value can be `300`.
- `scopes` (Set of String) API Token granting privileges to Okta API.
54 changes: 1 addition & 53 deletions docs/resources/admin_role_custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,13 @@
page_title: "Resource: okta_admin_role_custom"
description: |-
Resource to manage administrative Role assignments for a User
These operations allow the creation and manipulation of custom roles as custom collections of permissions.
~> NOTE: This an Early Access feature.
---

# Resource: okta_admin_role_custom

Resource to manage administrative Role assignments for a User

These operations allow the creation and manipulation of custom roles as custom collections of permissions.

~> **NOTE:** This an Early Access feature.

## Example Usage

```terraform
resource "okta_admin_role_custom" "example" {
label = "AppAssignmentManager"
description = "This role allows app assignment management"
permissions = ["okta.apps.assignment.manage"]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -34,48 +20,10 @@ resource "okta_admin_role_custom" "example" {

### Optional

- `permissions` (Set of String) The permissions that the new Role grants. At least one
permission must be specified when creating custom role. Valid values: "okta.authzServers.manage",
"okta.authzServers.read",
"okta.apps.assignment.manage",
"okta.apps.manage",
"okta.apps.read",
"okta.customizations.manage",
"okta.customizations.read",
"okta.groups.appAssignment.manage",
"okta.groups.create",
"okta.groups.manage",
"okta.groups.members.manage",
"okta.groups.read",
"okta.profilesources.import.run",
"okta.users.appAssignment.manage",
"okta.users.create",
"okta.users.credentials.expirePassword",
"okta.users.credentials.manage",
"okta.users.credentials.resetFactors",
"okta.users.credentials.resetPassword",
"okta.users.groupMembership.manage",
"okta.users.lifecycle.activate",
"okta.users.lifecycle.clearSessions",
"okta.users.lifecycle.deactivate",
"okta.users.lifecycle.delete",
"okta.users.lifecycle.manage",
"okta.users.lifecycle.suspend",
"okta.users.lifecycle.unlock",
"okta.users.lifecycle.unsuspend",
"okta.users.manage",
"okta.users.read",
"okta.users.userprofile.manage",
"okta.workflows.invoke".,
- `permissions` (Set of String) The permissions that the new Role grants.

### Read-Only

- `id` (String) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import okta_admin_role_custom.example &#60;custom role id&#62
```
Loading

0 comments on commit fcbe853

Please sign in to comment.