Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
nkvuong committed Oct 18, 2024
1 parent 4ff8c66 commit f34038f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
57 changes: 57 additions & 0 deletions docs/resources/custom_app_integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
subcategory: "Apps"
---
# databricks_custom_app_integration Resource

-> Initialize provider with `alias = "account"`, and `host` pointing to the account URL, like, `host = "https://accounts.cloud.databricks.com"`. Use `provider = databricks.account` for all account-level resources.

This resource allows you to enable [custom OAuth applications](https://docs.databricks.com/en/integrations/enable-disable-oauth.html#enable-custom-oauth-applications-using-the-databricks-ui).

## Example Usage

```hcl
resource "databricks_custom_app_integration" "this" {
name = "custom_integration_name"
redirect_urls = ["https://example.com"]
scopes = ["all-apis"]
token_access_policy {
access_token_ttl_in_minutes = %s
refresh_token_ttl_in_minutes = 30
}
}
```

## Argument Reference

The following arguments are available:

* `name` - (Required) Name of the custom OAuth app. Change requires a new resource
* `confidential` - Indicates whether an OAuth client secret is required to authenticate this client. Default to `false`
* `redirect_urls` - List of OAuth redirect urls

### token_access_policy Configuration Block (Optional)

* `access_token_ttl_in_minutes` - access token time to live in minutes
* `refresh_token_ttl_in_minutes` - refresh token time to live in minutes

## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `integration_id` - Unique integration id for the custom OAuth app.
* `client_id` - OAuth client-id generated by Databricks
* `client_secret` - OAuth client-secret generated by the Databricks if this is a confidential OAuth app.

## Import

This resource can be imported by Databricks account ID and integration ID.

```sh
terraform import databricks_budget.this '<account_id>|<budget_configuration_id>'
```

## Related Resources

The following resources are used in the context:

* [databricks_mws_workspaces](mws_workspaces.md) to set up Databricks workspaces.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var (
customAppIntegrationTemplate = `resource "databricks_custom_app_integration" "this" {
name = "custom_integration_name"
redirect_urls = ["https://example.com"]
scopes = ["all"]
scopes = ["all-apis"]
token_access_policy {
access_token_ttl_in_minutes = %s
refresh_token_ttl_in_minutes = 30
Expand Down

0 comments on commit f34038f

Please sign in to comment.