Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: API Authentication integration v1 readiness #2898

Merged
merged 23 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c471a3c
Common changes
sfc-gh-jmichalak Jun 27, 2024
ff5439d
Add api auth security integrations
sfc-gh-jmichalak Jun 27, 2024
39e8db7
Merge remote-tracking branch 'origin/main' into api-auth-integration-v1
sfc-gh-jmichalak Jun 28, 2024
a8315fa
Merge remote-tracking branch 'origin/main' into api-auth-integration-v1
sfc-gh-jmichalak Jun 28, 2024
f1e3668
authorization code grant v1
sfc-gh-jmichalak Jun 28, 2024
e70b123
Add remaining api auth flows
sfc-gh-jmichalak Jul 1, 2024
a304868
Small fixes
sfc-gh-jmichalak Jul 1, 2024
6c99578
Revert "Common changes"
sfc-gh-jmichalak Jul 1, 2024
433c4d7
fix after restore
sfc-gh-jmichalak Jul 1, 2024
a46e58d
fix tests
sfc-gh-jmichalak Jul 1, 2024
007c776
Merge remote-tracking branch 'origin/main' into api-auth-integration-v1
sfc-gh-jmichalak Jul 1, 2024
f0ff5f7
Address review comments
sfc-gh-jmichalak Jul 2, 2024
aa93eaf
Minor fixes
sfc-gh-jmichalak Jul 2, 2024
d5bfef6
Merge remote-tracking branch 'origin/main' into api-auth-integration-v1
sfc-gh-jmichalak Jul 2, 2024
33b9a5f
Merge remote-tracking branch 'origin/main' into api-auth-integration-v1
sfc-gh-jmichalak Jul 4, 2024
744b4ed
Fixes
sfc-gh-jmichalak Jul 4, 2024
6f18db2
Use new methods
sfc-gh-jmichalak Jul 5, 2024
c4fa972
Use newer methods
sfc-gh-jmichalak Jul 5, 2024
c218ed7
Fix tests
sfc-gh-jmichalak Jul 5, 2024
319a5b7
Fix tests
sfc-gh-jmichalak Jul 8, 2024
326bae9
Fix tests
sfc-gh-jmichalak Jul 8, 2024
068841f
Address review comments and add disclaimers
sfc-gh-jmichalak Jul 8, 2024
255b14a
Add normalizeandcompare to client auth method diff suppress
sfc-gh-jmichalak Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
---
page_title: "snowflake_api_authentication_integration_with_authorization_code_grant Resource - terraform-provider-snowflake"
subcategory: ""
description: |-

---

# snowflake_api_authentication_integration_with_authorization_code_grant (Resource)



## Example Usage

```terraform
# basic resource
resource "snowflake_api_authentication_integration_with_authorization_code_grant" "test" {
enabled = true
name = "foo"
oauth_client_id = "foo"
oauth_client_secret = "foo"
}
# resource with all fields set
resource "snowflake_api_authentication_integration_with_authorization_code_grant" "test" {
comment = "foo"
enabled = true
name = "foo"
oauth_access_token_validity = 42
oauth_authorization_endpoint = "https://example.com"
oauth_client_auth_method = "CLIENT_SECRET_POST"
oauth_client_id = "foo"
oauth_client_secret = "foo"
oauth_refresh_token_validity = 42
oauth_token_endpoint = "https://example.com"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `enabled` (Boolean) Specifies whether this security integration is enabled or disabled.
- `name` (String) Specifies the identifier (i.e. name) for the integration. This value must be unique in your account.
- `oauth_client_id` (String) Specifies the client ID for the OAuth application in the external service.
- `oauth_client_secret` (String) Specifies the client secret for the OAuth application in the ServiceNow instance from the previous step. The connector uses this to request an access token from the ServiceNow instance.

### Optional

- `comment` (String) Specifies a comment for the integration.
- `oauth_access_token_validity` (Number) Specifies the default lifetime of the OAuth access token (in seconds) issued by an OAuth server.
- `oauth_allowed_scopes` (Set of String) Specifies a list of scopes to use when making a request from the OAuth by a role with USAGE on the integration during the OAuth client credentials flow.
- `oauth_authorization_endpoint` (String) Specifies the URL for authenticating to the external service.
- `oauth_client_auth_method` (String) Specifies that POST is used as the authentication method to the external service. Valid options are: [CLIENT_SECRET_POST]
- `oauth_grant` (String) Specifies the type of OAuth flow.
- `oauth_refresh_token_validity` (Number) Specifies the default lifetime of the OAuth access token (in seconds) issued by an OAuth server.
- `oauth_token_endpoint` (String) Specifies the token endpoint used by the client to obtain an access token by presenting its authorization grant or refresh token. The token endpoint is used with every authorization grant except for the implicit grant type (since an access token is issued directly).

### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--describe_output))
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--show_output))

<a id="nestedatt--describe_output"></a>
### Nested Schema for `describe_output`

Read-Only:

- `auth_type` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--auth_type))
- `comment` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--comment))
- `enabled` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--enabled))
- `oauth_access_token_validity` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--oauth_access_token_validity))
- `oauth_allowed_scopes` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--oauth_allowed_scopes))
- `oauth_authorization_endpoint` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--oauth_authorization_endpoint))
- `oauth_client_auth_method` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--oauth_client_auth_method))
- `oauth_client_id` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--oauth_client_id))
- `oauth_grant` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--oauth_grant))
- `oauth_refresh_token_validity` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--oauth_refresh_token_validity))
- `oauth_token_endpoint` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--oauth_token_endpoint))
- `parent_integration` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--parent_integration))

<a id="nestedobjatt--describe_output--auth_type"></a>
### Nested Schema for `describe_output.auth_type`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--comment"></a>
### Nested Schema for `describe_output.comment`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--enabled"></a>
### Nested Schema for `describe_output.enabled`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--oauth_access_token_validity"></a>
### Nested Schema for `describe_output.oauth_access_token_validity`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--oauth_allowed_scopes"></a>
### Nested Schema for `describe_output.oauth_allowed_scopes`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--oauth_authorization_endpoint"></a>
### Nested Schema for `describe_output.oauth_authorization_endpoint`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--oauth_client_auth_method"></a>
### Nested Schema for `describe_output.oauth_client_auth_method`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--oauth_client_id"></a>
### Nested Schema for `describe_output.oauth_client_id`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--oauth_grant"></a>
### Nested Schema for `describe_output.oauth_grant`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--oauth_refresh_token_validity"></a>
### Nested Schema for `describe_output.oauth_refresh_token_validity`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--oauth_token_endpoint"></a>
### Nested Schema for `describe_output.oauth_token_endpoint`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)


<a id="nestedobjatt--describe_output--parent_integration"></a>
### Nested Schema for `describe_output.parent_integration`

Read-Only:

- `default` (String)
- `name` (String)
- `type` (String)
- `value` (String)



<a id="nestedatt--show_output"></a>
### Nested Schema for `show_output`

Read-Only:

- `category` (String)
- `comment` (String)
- `created_on` (String)
- `enabled` (Boolean)
- `integration_type` (String)
- `name` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_api_authentication_integration_with_authorization_code_grant.example "name"
```
Loading
Loading