Skip to content

Commit

Permalink
chore: Remove deprecation from unsafe execute (#2941)
Browse files Browse the repository at this point in the history
- Remove the deprecation message from the unsafe_execute resource
because it's planned to be supported in V1 (references: #2934)
- Add #2938 to the list of known issues for the user object.
  • Loading branch information
sfc-gh-asawicki committed Jul 17, 2024
1 parent 4ce662d commit ed712d7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
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

0 comments on commit ed712d7

Please sign in to comment.