|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "workos_connect_application Resource - workos" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Manages a WorkOS Connect application. |
| 7 | +--- |
| 8 | + |
| 9 | +# workos_connect_application (Resource) |
| 10 | + |
| 11 | +Manages a WorkOS Connect application. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +# Create a first-party OAuth Connect application |
| 17 | +resource "workos_connect_application" "oauth" { |
| 18 | + name = "Customer Portal" |
| 19 | + application_type = "oauth" |
| 20 | + is_first_party = true |
| 21 | + uses_pkce = true |
| 22 | + scopes = ["openid", "profile", "email"] |
| 23 | +
|
| 24 | + redirect_uris = [ |
| 25 | + { |
| 26 | + uri = "https://app.example.com/callback" |
| 27 | + default = true |
| 28 | + }, |
| 29 | + { |
| 30 | + uri = "https://app.example.com/auth/workos/callback" |
| 31 | + }, |
| 32 | + ] |
| 33 | +} |
| 34 | +
|
| 35 | +# Create a machine-to-machine Connect application |
| 36 | +resource "workos_connect_application" "m2m" { |
| 37 | + name = "Billing Worker" |
| 38 | + application_type = "m2m" |
| 39 | + organization_id = workos_organization.example.id |
| 40 | + scopes = ["billing:read", "billing:write"] |
| 41 | +} |
| 42 | +
|
| 43 | +output "connect_application_client_id" { |
| 44 | + value = workos_connect_application.oauth.client_id |
| 45 | +} |
| 46 | +``` |
| 47 | + |
| 48 | +<!-- schema generated by tfplugindocs --> |
| 49 | +## Schema |
| 50 | + |
| 51 | +### Required |
| 52 | + |
| 53 | +- `application_type` (String) The Connect application type: oauth or m2m. |
| 54 | +- `name` (String) The Connect application name. |
| 55 | + |
| 56 | +### Optional |
| 57 | + |
| 58 | +- `description` (String) An optional Connect application description. |
| 59 | +- `is_first_party` (Boolean) Whether an OAuth application is first-party. |
| 60 | +- `organization_id` (String) The organization ID for organization-scoped applications. |
| 61 | +- `redirect_uris` (Attributes List) Redirect URIs configured for an OAuth application. (see [below for nested schema](#nestedatt--redirect_uris)) |
| 62 | +- `scopes` (List of String) OAuth scopes granted to the application. |
| 63 | +- `uses_pkce` (Boolean) Whether an OAuth application uses PKCE. |
| 64 | + |
| 65 | +### Read-Only |
| 66 | + |
| 67 | +- `client_id` (String) The client ID of the Connect application. |
| 68 | +- `created_at` (String) The timestamp when the application was created. |
| 69 | +- `id` (String) The unique identifier of the Connect application. |
| 70 | +- `updated_at` (String) The timestamp when the application was last updated. |
| 71 | +- `was_dynamically_registered` (Boolean) Whether the application was dynamically registered. |
| 72 | + |
| 73 | +<a id="nestedatt--redirect_uris"></a> |
| 74 | +### Nested Schema for `redirect_uris` |
| 75 | + |
| 76 | +Required: |
| 77 | + |
| 78 | +- `uri` (String) The redirect URI. |
| 79 | + |
| 80 | +Optional: |
| 81 | + |
| 82 | +- `default` (Boolean) Whether this redirect URI is the default. |
0 commit comments