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

chore: Remove deprecation from unsafe execute #2941

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ The Snowflake provider will use the following order of precedence when determini
- [snowflake_oauth_integration](./docs/resources/oauth_integration)
- [snowflake_role](./docs/resources/role) - use [snowflake_account_role](./docs/resources/account_role) instead
- [snowflake_saml_integration](./docs/resources/saml_integration) - use [snowflake_saml2_integration](./docs/resources/saml2_integration) instead
- [snowflake_unsafe_execute](./docs/resources/unsafe_execute)

## Currently deprecated datasources

Expand Down
10 changes: 5 additions & 5 deletions docs/resources/unsafe_execute.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
page_title: "snowflake_unsafe_execute Resource - terraform-provider-snowflake"
subcategory: ""
description: |-
Experimental resource used for testing purposes only. Allows to execute ANY SQL statement.
Experimental resource allowing execution of ANY SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.
---

# snowflake_unsafe_execute (Resource)

!> **Warning** This is a dangerous resource that allows executing **ANY** SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Will be deleted in the upcoming versions. Use at your own risk.
!> **Warning** This is a dangerous resource that allows executing **ANY** SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.

~> **Note** This resource will be included in the V1 (check [here](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/v1-preparations/ESSENTIAL_GA_OBJECTS.MD)) but may be slightly modified before. Design decisions and changes will be listed in the [migration guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#migration-guide).

~> **Note** It can be theoretically used to manage resource that are not supported by the provider. This is risky and may brake other resources if used incorrectly.

~> **Note** Use `query` parameter with caution. It will fetch **ALL** the results returned by the query provided. Try to limit the number of results by writing query with filters. Query failure does not stop resource creation; it simply results in `query_results` being empty.

~> **Deprecation** Experimental resource. Will be deleted in the upcoming versions. Use at your own risk. <deprecation>

Experimental resource used for testing purposes only. Allows to execute ANY SQL statement.
Experimental resource allowing execution of ANY SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.

## Example Usage

Expand Down
1 change: 0 additions & 1 deletion examples/additional/deprecated_resources.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
- [snowflake_oauth_integration](./docs/resources/oauth_integration)
- [snowflake_role](./docs/resources/role) - use [snowflake_account_role](./docs/resources/account_role) instead
- [snowflake_saml_integration](./docs/resources/saml_integration) - use [snowflake_saml2_integration](./docs/resources/saml2_integration) instead
- [snowflake_unsafe_execute](./docs/resources/unsafe_execute)
3 changes: 1 addition & 2 deletions pkg/resources/unsafe_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ func UnsafeExecute() *schema.Resource {

Schema: unsafeExecuteSchema,

DeprecationMessage: "Experimental resource. Will be deleted in the upcoming versions. Use at your own risk.",
Description: "Experimental resource used for testing purposes only. Allows to execute ANY SQL statement.",
Description: "Experimental resource allowing execution of ANY SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.",

CustomizeDiff: func(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error {
if diff.HasChange("query") {
Expand Down
4 changes: 3 additions & 1 deletion templates/resources/unsafe_execute.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ description: |-

# {{.Name}} ({{.Type}})

!> **Warning** This is a dangerous resource that allows executing **ANY** SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Will be deleted in the upcoming versions. Use at your own risk.
!> **Warning** This is a dangerous resource that allows executing **ANY** SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.

~> **Note** This resource will be included in the V1 (check [here](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/v1-preparations/ESSENTIAL_GA_OBJECTS.MD)) but may be slightly modified before. Design decisions and changes will be listed in the [migration guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#migration-guide).

~> **Note** It can be theoretically used to manage resource that are not supported by the provider. This is risky and may brake other resources if used incorrectly.

Expand Down
Loading
Loading