diff --git a/docs/data-sources/accounts.md b/docs/data-sources/accounts.md index d5407a19ea..5ecf9e14c8 100644 --- a/docs/data-sources/accounts.md +++ b/docs/data-sources/accounts.md @@ -45,5 +45,3 @@ Read-Only: - `organization_name` (String) - `region_group` (String) - `snowflake_region` (String) - - diff --git a/docs/data-sources/alerts.md b/docs/data-sources/alerts.md index b291c9a58c..b62b8d86fc 100644 --- a/docs/data-sources/alerts.md +++ b/docs/data-sources/alerts.md @@ -45,5 +45,3 @@ Read-Only: - `name` (String) - `owner` (String) - `schema_name` (String) - - diff --git a/docs/data-sources/current_account.md b/docs/data-sources/current_account.md index 01f3bf9c57..1235c17211 100644 --- a/docs/data-sources/current_account.md +++ b/docs/data-sources/current_account.md @@ -31,5 +31,3 @@ resource "aws_ssm_parameter" "snowflake_account_url" { - `id` (String) The ID of this resource. - `region` (String) The Snowflake Region; as returned by CURRENT_REGION() - `url` (String) The Snowflake URL. - - diff --git a/docs/data-sources/current_role.md b/docs/data-sources/current_role.md index 7477345c01..a091f63435 100644 --- a/docs/data-sources/current_role.md +++ b/docs/data-sources/current_role.md @@ -19,5 +19,3 @@ description: |- - `id` (String) The ID of this resource. - `name` (String) The name of the [primary role](https://docs.snowflake.com/en/user-guide/security-access-control-overview.html#label-access-control-role-enforcement) in use for the current session. - - diff --git a/docs/data-sources/database.md b/docs/data-sources/database.md index e43d459a54..76bf939bbb 100644 --- a/docs/data-sources/database.md +++ b/docs/data-sources/database.md @@ -36,5 +36,3 @@ data "snowflake_database" "this" { - `origin` (String) - `owner` (String) - `retention_time` (Number) - - diff --git a/docs/data-sources/database_roles.md b/docs/data-sources/database_roles.md index 6c29618af5..e9aacbcb2e 100644 --- a/docs/data-sources/database_roles.md +++ b/docs/data-sources/database_roles.md @@ -38,5 +38,3 @@ Read-Only: - `comment` (String) - `name` (String) - `owner` (String) - - diff --git a/docs/data-sources/databases.md b/docs/data-sources/databases.md index a265da78a4..edf95ae66d 100644 --- a/docs/data-sources/databases.md +++ b/docs/data-sources/databases.md @@ -54,5 +54,3 @@ Read-Only: - `accounts` (List of String) - `ignore_edition_check` (Boolean) - - diff --git a/docs/data-sources/external_functions.md b/docs/data-sources/external_functions.md index 2dd93021f0..be25f330a0 100644 --- a/docs/data-sources/external_functions.md +++ b/docs/data-sources/external_functions.md @@ -42,5 +42,3 @@ Read-Only: - `language` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/external_tables.md b/docs/data-sources/external_tables.md index ec4a589c1d..bed0a5dccf 100644 --- a/docs/data-sources/external_tables.md +++ b/docs/data-sources/external_tables.md @@ -41,5 +41,3 @@ Read-Only: - `database` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/failover_groups.md b/docs/data-sources/failover_groups.md index 25a23bb2b2..2fbb0da353 100644 --- a/docs/data-sources/failover_groups.md +++ b/docs/data-sources/failover_groups.md @@ -46,5 +46,3 @@ Read-Only: - `secondary_state` (String) - `snowflake_region` (String) - `type` (String) - - diff --git a/docs/data-sources/file_formats.md b/docs/data-sources/file_formats.md index afcc04b540..2cba917412 100644 --- a/docs/data-sources/file_formats.md +++ b/docs/data-sources/file_formats.md @@ -42,5 +42,3 @@ Read-Only: - `format_type` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/functions.md b/docs/data-sources/functions.md index e58a9cf1c6..7a1a18c2b3 100644 --- a/docs/data-sources/functions.md +++ b/docs/data-sources/functions.md @@ -43,5 +43,3 @@ Read-Only: - `name` (String) - `return_type` (String) - `schema` (String) - - diff --git a/docs/data-sources/grants.md b/docs/data-sources/grants.md index ca58ddee76..36993ba4b5 100644 --- a/docs/data-sources/grants.md +++ b/docs/data-sources/grants.md @@ -154,5 +154,3 @@ Read-Only: - `grantee_name` (String) - `name` (String) - `privilege` (String) - - diff --git a/docs/data-sources/masking_policies.md b/docs/data-sources/masking_policies.md index c90515eee3..56229578c6 100644 --- a/docs/data-sources/masking_policies.md +++ b/docs/data-sources/masking_policies.md @@ -42,5 +42,3 @@ Read-Only: - `kind` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/materialized_views.md b/docs/data-sources/materialized_views.md index dfc9ef9543..c382777187 100644 --- a/docs/data-sources/materialized_views.md +++ b/docs/data-sources/materialized_views.md @@ -41,5 +41,3 @@ Read-Only: - `database` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/parameters.md b/docs/data-sources/parameters.md index 8b18f48276..fe82ffeb2c 100644 --- a/docs/data-sources/parameters.md +++ b/docs/data-sources/parameters.md @@ -64,5 +64,3 @@ Read-Only: - `key` (String) - `level` (String) - `value` (String) - - diff --git a/docs/data-sources/pipes.md b/docs/data-sources/pipes.md index 664a31338d..a422097f09 100644 --- a/docs/data-sources/pipes.md +++ b/docs/data-sources/pipes.md @@ -42,5 +42,3 @@ Read-Only: - `integration` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/procedures.md b/docs/data-sources/procedures.md index 5b567f4fb4..a5e7fbbb4f 100644 --- a/docs/data-sources/procedures.md +++ b/docs/data-sources/procedures.md @@ -43,5 +43,3 @@ Read-Only: - `name` (String) - `return_type` (String) - `schema` (String) - - diff --git a/docs/data-sources/resource_monitors.md b/docs/data-sources/resource_monitors.md index e68f6311c9..02d1207cde 100644 --- a/docs/data-sources/resource_monitors.md +++ b/docs/data-sources/resource_monitors.md @@ -34,5 +34,3 @@ Read-Only: - `credit_quota` (String) - `frequency` (String) - `name` (String) - - diff --git a/docs/data-sources/role.md b/docs/data-sources/role.md index cab6a28183..75ff282301 100644 --- a/docs/data-sources/role.md +++ b/docs/data-sources/role.md @@ -29,5 +29,3 @@ data "snowflake_role" "this" { - `comment` (String) The comment on the role - `id` (String) The ID of this resource. - - diff --git a/docs/data-sources/roles.md b/docs/data-sources/roles.md index d91943b077..d7077c13d3 100644 --- a/docs/data-sources/roles.md +++ b/docs/data-sources/roles.md @@ -42,5 +42,3 @@ Read-Only: - `comment` (String) - `name` (String) - `owner` (String) - - diff --git a/docs/data-sources/row_access_policies.md b/docs/data-sources/row_access_policies.md index aeb975f87a..38c17dcb1a 100644 --- a/docs/data-sources/row_access_policies.md +++ b/docs/data-sources/row_access_policies.md @@ -41,5 +41,3 @@ Read-Only: - `database` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/schemas.md b/docs/data-sources/schemas.md index dd90fe336e..72b28c41a3 100644 --- a/docs/data-sources/schemas.md +++ b/docs/data-sources/schemas.md @@ -38,5 +38,3 @@ Read-Only: - `comment` (String) - `database` (String) - `name` (String) - - diff --git a/docs/data-sources/sequences.md b/docs/data-sources/sequences.md index 35861b7ef2..46960a6035 100644 --- a/docs/data-sources/sequences.md +++ b/docs/data-sources/sequences.md @@ -41,5 +41,3 @@ Read-Only: - `database` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/shares.md b/docs/data-sources/shares.md index d22761c8cb..8f23d620b1 100644 --- a/docs/data-sources/shares.md +++ b/docs/data-sources/shares.md @@ -44,5 +44,3 @@ Read-Only: - `name` (String) - `owner` (String) - `to` (List of String) - - diff --git a/docs/data-sources/stages.md b/docs/data-sources/stages.md index 5d641d6c53..b05df05922 100644 --- a/docs/data-sources/stages.md +++ b/docs/data-sources/stages.md @@ -42,5 +42,3 @@ Read-Only: - `name` (String) - `schema` (String) - `storage_integration` (String) - - diff --git a/docs/data-sources/storage_integrations.md b/docs/data-sources/storage_integrations.md index 96e9e15821..e080f723c4 100644 --- a/docs/data-sources/storage_integrations.md +++ b/docs/data-sources/storage_integrations.md @@ -34,5 +34,3 @@ Read-Only: - `enabled` (Boolean) - `name` (String) - `type` (String) - - diff --git a/docs/data-sources/streams.md b/docs/data-sources/streams.md index 7f41a66f36..93dcfa2021 100644 --- a/docs/data-sources/streams.md +++ b/docs/data-sources/streams.md @@ -42,5 +42,3 @@ Read-Only: - `name` (String) - `schema` (String) - `table` (String) - - diff --git a/docs/data-sources/system_generate_scim_access_token.md b/docs/data-sources/system_generate_scim_access_token.md index e176949460..ea5fde16c6 100644 --- a/docs/data-sources/system_generate_scim_access_token.md +++ b/docs/data-sources/system_generate_scim_access_token.md @@ -29,5 +29,3 @@ data "snowflake_system_generate_scim_access_token" "scim" { - `access_token` (String) SCIM Access Token - `id` (String) The ID of this resource. - - diff --git a/docs/data-sources/system_get_aws_sns_iam_policy.md b/docs/data-sources/system_get_aws_sns_iam_policy.md index b1a77fc963..6328ecdff9 100644 --- a/docs/data-sources/system_get_aws_sns_iam_policy.md +++ b/docs/data-sources/system_get_aws_sns_iam_policy.md @@ -23,5 +23,3 @@ description: |- - `aws_sns_topic_policy_json` (String) IAM policy for Snowflake’s SQS queue to subscribe to this topic - `id` (String) The ID of this resource. - - diff --git a/docs/data-sources/system_get_privatelink_config.md b/docs/data-sources/system_get_privatelink_config.md index 22b8a894ad..d85e18e5f0 100644 --- a/docs/data-sources/system_get_privatelink_config.md +++ b/docs/data-sources/system_get_privatelink_config.md @@ -82,5 +82,3 @@ resource "aws_route53_record" "snowflake_private_link_ocsp_url" { - `regionless_account_url` (String) The regionless URL to connect to your Snowflake account using AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect. - `regionless_snowsight_url` (String) The URL for your organization to access Snowsight using Private Connectivity to the Snowflake Service. - `snowsight_url` (String) The URL containing the cloud region to access Snowsight and the Snowflake Marketplace using Private Connectivity to the Snowflake Service. - - diff --git a/docs/data-sources/system_get_snowflake_platform_info.md b/docs/data-sources/system_get_snowflake_platform_info.md index 20bf46a7c8..7c70cd944f 100644 --- a/docs/data-sources/system_get_snowflake_platform_info.md +++ b/docs/data-sources/system_get_snowflake_platform_info.md @@ -20,5 +20,3 @@ description: |- - `aws_vpc_ids` (List of String) Snowflake AWS Virtual Private Cloud IDs - `azure_vnet_subnet_ids` (List of String) Snowflake Azure Virtual Network Subnet IDs - `id` (String) The ID of this resource. - - diff --git a/docs/data-sources/tables.md b/docs/data-sources/tables.md index 1ad64ed0e7..354f0e236c 100644 --- a/docs/data-sources/tables.md +++ b/docs/data-sources/tables.md @@ -41,5 +41,3 @@ Read-Only: - `database` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/tasks.md b/docs/data-sources/tasks.md index 1f06773350..946f2bb838 100644 --- a/docs/data-sources/tasks.md +++ b/docs/data-sources/tasks.md @@ -42,5 +42,3 @@ Read-Only: - `name` (String) - `schema` (String) - `warehouse` (String) - - diff --git a/docs/data-sources/users.md b/docs/data-sources/users.md index 6ea8efaf71..3614f54ed5 100644 --- a/docs/data-sources/users.md +++ b/docs/data-sources/users.md @@ -48,5 +48,3 @@ Read-Only: - `last_name` (String) - `login_name` (String) - `name` (String) - - diff --git a/docs/data-sources/views.md b/docs/data-sources/views.md index 77af53ec7b..a79bcd69dc 100644 --- a/docs/data-sources/views.md +++ b/docs/data-sources/views.md @@ -41,5 +41,3 @@ Read-Only: - `database` (String) - `name` (String) - `schema` (String) - - diff --git a/docs/data-sources/warehouses.md b/docs/data-sources/warehouses.md index 82f371aee5..51688bcb75 100644 --- a/docs/data-sources/warehouses.md +++ b/docs/data-sources/warehouses.md @@ -36,5 +36,3 @@ Read-Only: - `size` (String) - `state` (String) - `type` (String) - - diff --git a/docs/resources/account_password_policy_attachment.md b/docs/resources/account_password_policy_attachment.md index 864b2cad2b..e67e6f0b99 100644 --- a/docs/resources/account_password_policy_attachment.md +++ b/docs/resources/account_password_policy_attachment.md @@ -34,5 +34,3 @@ resource "snowflake_account_password_policy_attachment" "attachment" { ### Read-Only - `id` (String) The ID of this resource. - - diff --git a/docs/resources/failover_group_grant.md b/docs/resources/failover_group_grant.md index 6f0249828a..f0028bf7ec 100644 --- a/docs/resources/failover_group_grant.md +++ b/docs/resources/failover_group_grant.md @@ -30,5 +30,3 @@ description: |- ### Read-Only - `id` (String) The ID of this resource. - - diff --git a/docs/resources/password_policy.md b/docs/resources/password_policy.md index 3ee4cdaa8c..370aa89549 100644 --- a/docs/resources/password_policy.md +++ b/docs/resources/password_policy.md @@ -40,5 +40,3 @@ A password policy specifies the requirements that must be met to create and rese - `id` (String) The ID of this resource. - `qualified_name` (String) The qualified name for the password policy. - - diff --git a/docs/resources/role_ownership_grant.md b/docs/resources/role_ownership_grant.md index 1d66d2720a..fca231a8dc 100644 --- a/docs/resources/role_ownership_grant.md +++ b/docs/resources/role_ownership_grant.md @@ -28,5 +28,3 @@ description: |- ### Read-Only - `id` (String) The ID of this resource. - - diff --git a/docs/resources/user_ownership_grant.md b/docs/resources/user_ownership_grant.md index 4a50c5ca32..e9c4558b18 100644 --- a/docs/resources/user_ownership_grant.md +++ b/docs/resources/user_ownership_grant.md @@ -28,5 +28,3 @@ description: |- ### Read-Only - `id` (String) The ID of this resource. - - diff --git a/docs/resources/user_public_keys.md b/docs/resources/user_public_keys.md index ee548a98be..f9ead47fe3 100644 --- a/docs/resources/user_public_keys.md +++ b/docs/resources/user_public_keys.md @@ -27,5 +27,3 @@ description: |- ### Read-Only - `id` (String) The ID of this resource. - - diff --git a/go.mod b/go.mod index 5e2516855f..0b46ac4c6f 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/buger/jsonparser v1.1.1 github.com/google/uuid v1.3.0 github.com/hashicorp/go-uuid v1.0.3 - github.com/hashicorp/terraform-plugin-docs v0.14.1 + github.com/hashicorp/terraform-plugin-docs v0.16.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 github.com/jmoiron/sqlx v1.3.5 github.com/luna-duclos/instrumentedsql v1.1.3 @@ -19,7 +19,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a golang.org/x/crypto v0.13.0 - golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 + golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df golang.org/x/text v0.13.0 golang.org/x/tools v0.13.0 ) diff --git a/go.sum b/go.sum index d6aa72804f..b14c5216b1 100644 --- a/go.sum +++ b/go.sum @@ -174,8 +174,8 @@ github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81Sp github.com/hashicorp/terraform-exec v0.19.0/go.mod h1:tbxUpe3JKruE9Cuf65mycSIT8KiNPZ0FkuTE3H4urQg= github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= -github.com/hashicorp/terraform-plugin-docs v0.14.1 h1:MikFi59KxrP/ewrZoaowrB9he5Vu4FtvhamZFustiA4= -github.com/hashicorp/terraform-plugin-docs v0.14.1/go.mod h1:k2NW8+t113jAus6bb5tQYQgEAX/KueE/u8X2Z45V1GM= +github.com/hashicorp/terraform-plugin-docs v0.16.0 h1:UmxFr3AScl6Wged84jndJIfFccGyBZn52KtMNsS12dI= +github.com/hashicorp/terraform-plugin-docs v0.16.0/go.mod h1:M3ZrlKBJAbPMtNOPwHicGi1c+hZUh7/g0ifT/z7TVfA= github.com/hashicorp/terraform-plugin-go v0.19.0 h1:BuZx/6Cp+lkmiG0cOBk6Zps0Cb2tmqQpDM3iAtnhDQU= github.com/hashicorp/terraform-plugin-go v0.19.0/go.mod h1:EhRSkEPNoylLQntYsk5KrDHTZJh9HQoumZXbOGOXmec= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= @@ -328,8 +328,8 @@ golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2Uz golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 h1:pVgRXcIictcr+lBQIFeiwuwtDIs4eL21OuM9nyAADmo= -golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= diff --git a/pkg/sdk/helper_test.go b/pkg/sdk/helper_test.go index 548bee1741..eda4e3419a 100644 --- a/pkg/sdk/helper_test.go +++ b/pkg/sdk/helper_test.go @@ -2,6 +2,7 @@ package sdk import ( "context" + "errors" "fmt" "testing" "time" @@ -347,7 +348,7 @@ func createDatabaseWithOptions(t *testing.T, client *Client, id AccountObjectIde require.NoError(t, err) return database, func() { err := client.Databases.Drop(ctx, id, nil) - if err == errObjectNotExistOrAuthorized { + if errors.Is(err, errObjectNotExistOrAuthorized) { return } require.NoError(t, err) @@ -369,7 +370,7 @@ func createSchemaWithIdentifier(t *testing.T, client *Client, database *Database require.NoError(t, err) return schema, func() { err := client.Schemas.Drop(ctx, schemaID, nil) - if err == errObjectNotExistOrAuthorized { + if errors.Is(err, errObjectNotExistOrAuthorized) { return } require.NoError(t, err)