From c4fa9720ae501f3ecfb95328528c4a9f2517c1d8 Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Fri, 5 Jul 2024 14:48:55 +0200 Subject: [PATCH] Use newer methods --- ...ntication_integration_with_authorization_code_grant.md | 8 ++++---- ..._authentication_integration_with_client_credentials.md | 6 +++--- .../api_authentication_integration_with_jwt_bearer.md | 6 +++--- pkg/resources/api_authentication_integration_common.go | 4 ++-- ...ntication_integration_with_authorization_code_grant.go | 4 ++-- ..._authentication_integration_with_client_credentials.go | 2 +- .../api_authentication_integration_with_jwt_bearer.go | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/resources/api_authentication_integration_with_authorization_code_grant.md b/docs/resources/api_authentication_integration_with_authorization_code_grant.md index cbbbfd11e5..c63c383d9a 100644 --- a/docs/resources/api_authentication_integration_with_authorization_code_grant.md +++ b/docs/resources/api_authentication_integration_with_authorization_code_grant.md @@ -50,11 +50,11 @@ resource "snowflake_api_authentication_integration_with_authorization_code_grant - `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_authorization_endpoint` (String) Specifies the URL for authenticating to the external service. If removed from the config, the resource is recreated. +- `oauth_client_auth_method` (String) Specifies that POST is used as the authentication method to the external service. If removed from the config, the resource is recreated. Valid values are (case-insensitive): `CLIENT_SECRET_POST`. +- `oauth_grant` (String) Specifies the type of OAuth flow. If removed from the config, the resource is recreated. Valid values are (case-insensitive): AUTHORIZATION_CODE. - `oauth_refresh_token_validity` (Number) Specifies the value to determine the validity of the refresh token obtained from the 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). +- `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). If removed from the config, the resource is recreated. ### Read-Only diff --git a/docs/resources/api_authentication_integration_with_client_credentials.md b/docs/resources/api_authentication_integration_with_client_credentials.md index d6bffd9b18..bc38102a3e 100644 --- a/docs/resources/api_authentication_integration_with_client_credentials.md +++ b/docs/resources/api_authentication_integration_with_client_credentials.md @@ -48,10 +48,10 @@ resource "snowflake_api_authentication_integration_with_client_credentials" "tes - `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_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_client_auth_method` (String) Specifies that POST is used as the authentication method to the external service. If removed from the config, the resource is recreated. Valid values are (case-insensitive): `CLIENT_SECRET_POST`. +- `oauth_grant` (String) Specifies the type of OAuth flow. If removed from the config, the resource is recreated. Valid values are (case-insensitive): CLIENT_CREDENTIALS. - `oauth_refresh_token_validity` (Number) Specifies the value to determine the validity of the refresh token obtained from the 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). +- `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). If removed from the config, the resource is recreated. ### Read-Only diff --git a/docs/resources/api_authentication_integration_with_jwt_bearer.md b/docs/resources/api_authentication_integration_with_jwt_bearer.md index 28fc7276f9..4f73252155 100644 --- a/docs/resources/api_authentication_integration_with_jwt_bearer.md +++ b/docs/resources/api_authentication_integration_with_jwt_bearer.md @@ -52,10 +52,10 @@ resource "snowflake_api_authentication_integration_with_jwt_bearer" "test" { - `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_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_client_auth_method` (String) Specifies that POST is used as the authentication method to the external service. If removed from the config, the resource is recreated. Valid values are (case-insensitive): `CLIENT_SECRET_POST`. +- `oauth_grant` (String) Specifies the type of OAuth flow. If removed from the config, the resource is recreated. Valid values are (case-insensitive): JWT_BEARER. - `oauth_refresh_token_validity` (Number) Specifies the value to determine the validity of the refresh token obtained from the 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). +- `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). If removed from the config, the resource is recreated. ### Read-Only diff --git a/pkg/resources/api_authentication_integration_common.go b/pkg/resources/api_authentication_integration_common.go index 1657b555b1..46a2117c38 100644 --- a/pkg/resources/api_authentication_integration_common.go +++ b/pkg/resources/api_authentication_integration_common.go @@ -36,13 +36,13 @@ var apiAuthCommonSchema = map[string]*schema.Schema{ "oauth_token_endpoint": { Type: schema.TypeString, Optional: true, - Description: "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).", + Description: "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). If removed from the config, the resource is recreated.", }, "oauth_client_auth_method": { Type: schema.TypeString, Optional: true, ValidateDiagFunc: sdkValidation(sdk.ToApiAuthenticationSecurityIntegrationOauthClientAuthMethodOption), - Description: fmt.Sprintf("Specifies that POST is used as the authentication method to the external service. Valid values are (case-insensitive): %s.", possibleValuesListed(sdk.AsStringList(sdk.AllApiAuthenticationSecurityIntegrationOauthClientAuthMethodOption))), + Description: fmt.Sprintf("Specifies that POST is used as the authentication method to the external service. If removed from the config, the resource is recreated. Valid values are (case-insensitive): %s.", possibleValuesListed(sdk.AsStringList(sdk.AllApiAuthenticationSecurityIntegrationOauthClientAuthMethodOption))), }, "oauth_access_token_validity": { Type: schema.TypeInt, diff --git a/pkg/resources/api_authentication_integration_with_authorization_code_grant.go b/pkg/resources/api_authentication_integration_with_authorization_code_grant.go index cdb0eba0df..98a9f7ac1e 100644 --- a/pkg/resources/api_authentication_integration_with_authorization_code_grant.go +++ b/pkg/resources/api_authentication_integration_with_authorization_code_grant.go @@ -23,7 +23,7 @@ var apiAuthAuthorizationCodeGrantSchema = func() map[string]*schema.Schema { "oauth_authorization_endpoint": { Type: schema.TypeString, Optional: true, - Description: "Specifies the URL for authenticating to the external service.", + Description: "Specifies the URL for authenticating to the external service. If removed from the config, the resource is recreated.", }, "oauth_allowed_scopes": { Type: schema.TypeSet, @@ -35,7 +35,7 @@ var apiAuthAuthorizationCodeGrantSchema = func() map[string]*schema.Schema { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{sdk.ApiAuthenticationSecurityIntegrationOauthGrantAuthorizationCode}, true), - Description: "Specifies the type of OAuth flow.", + Description: fmt.Sprintf("Specifies the type of OAuth flow. If removed from the config, the resource is recreated. Valid values are (case-insensitive): %s.", sdk.ApiAuthenticationSecurityIntegrationOauthGrantAuthorizationCode), }, } return MergeMaps(apiAuthCommonSchema, apiAuthAuthorizationCodeGrant) diff --git a/pkg/resources/api_authentication_integration_with_client_credentials.go b/pkg/resources/api_authentication_integration_with_client_credentials.go index 9ce0d0b889..c3a35b9620 100644 --- a/pkg/resources/api_authentication_integration_with_client_credentials.go +++ b/pkg/resources/api_authentication_integration_with_client_credentials.go @@ -30,7 +30,7 @@ var apiAuthClientCredentialsSchema = func() map[string]*schema.Schema { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{sdk.ApiAuthenticationSecurityIntegrationOauthGrantClientCredentials}, true), - Description: "Specifies the type of OAuth flow.", + Description: fmt.Sprintf("Specifies the type of OAuth flow. If removed from the config, the resource is recreated. Valid values are (case-insensitive): %s.", sdk.ApiAuthenticationSecurityIntegrationOauthGrantClientCredentials), }, } return MergeMaps(apiAuthCommonSchema, apiAuthClientCredentials) diff --git a/pkg/resources/api_authentication_integration_with_jwt_bearer.go b/pkg/resources/api_authentication_integration_with_jwt_bearer.go index a80dedb4f5..3db4624e28 100644 --- a/pkg/resources/api_authentication_integration_with_jwt_bearer.go +++ b/pkg/resources/api_authentication_integration_with_jwt_bearer.go @@ -33,7 +33,7 @@ var apiAuthJwtBearerSchema = func() map[string]*schema.Schema { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{sdk.ApiAuthenticationSecurityIntegrationOauthGrantJwtBearer}, true), - Description: "Specifies the type of OAuth flow.", + Description: fmt.Sprintf("Specifies the type of OAuth flow. If removed from the config, the resource is recreated. Valid values are (case-insensitive): %s.", sdk.ApiAuthenticationSecurityIntegrationOauthGrantJwtBearer), }, } return MergeMaps(apiAuthCommonSchema, apiAuthJwtBearer)