Skip to content

Commit

Permalink
chore: Validations cleanup and old grants removal (#2884)
Browse files Browse the repository at this point in the history
- Remove the following validations (adjust the documentation to link
valid input formats for fields like passwords or account names):
  - `ValidatePassword`
  - `ValidateIsNotAccountLocator`
  - `ValidateAccountIdentifier`
  - `ValidateEmail`
  - `ValidateAdminName`
  - `ValidateIdentifier`
- implement `IsValidAccountIdentifier`(replacement for
ValidateIsNotAccountLocator)
- replace `ValidateAccountIdentifier` with already existing
`IsValidIdentifier[sdk.AccountObjectIdentifier]()`
- extract csv-based identifier parsing logic (with tests)
- fix tests using Errorf check (probably more to follow in other PR)
- resolve TODO with grant ownership
- remove old grant resources from
#2736
- remove old ownership resources
- add new issue to the known issues list
- remove preview resource from all grant resources
  • Loading branch information
sfc-gh-asawicki authored Jun 21, 2024
1 parent 85a7836 commit 05b7eee
Show file tree
Hide file tree
Showing 204 changed files with 386 additions and 20,465 deletions.
3 changes: 3 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ describe deprecations or breaking changes and help you to change your configurat
across different versions.

## v0.92.0 ➞ v0.93.0
### old grant resources removal
Following the [announcement](https://github.com/Snowflake-Labs/terraform-provider-snowflake/discussions/2736) we have removed the old grant resources. The two resources [snowflake_role_ownership_grant](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/role_ownership_grant) and [snowflake_user_ownership_grant](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/user_ownership_grant) were not listed in the announcement, but they were also marked as deprecated ones. We are removing them too to conclude the grants redesign saga.

### snowflake_scim_integration resource changes
#### *(behavior change)* Renamed fields

Expand Down
27 changes: 0 additions & 27 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,35 +229,8 @@ The Snowflake provider will use the following order of precedence when determini

## Currently deprecated resources

- [snowflake_account_grant](./docs/resources/account_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_database_grant](./docs/resources/database_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_database_old](./docs/resources/database_old)
- [snowflake_external_table_grant](./docs/resources/external_table_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_failover_group_grant](./docs/resources/failover_group_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_file_format_grant](./docs/resources/file_format_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_function_grant](./docs/resources/function_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_grant_privileges_to_role](./docs/resources/grant_privileges_to_role) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_integration_grant](./docs/resources/integration_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_masking_policy_grant](./docs/resources/masking_policy_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_materialized_view_grant](./docs/resources/materialized_view_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_pipe_grant](./docs/resources/pipe_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_procedure_grant](./docs/resources/procedure_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_resource_monitor_grant](./docs/resources/resource_monitor_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_role_grants](./docs/resources/role_grants) - use [snowflake_grant_account_role](./docs/resources/grant_account_role) instead
- [snowflake_role_ownership_grant](./docs/resources/role_ownership_grant) - use [snowflake_grant_ownership](./docs/resources/grant_ownership) instead
- [snowflake_row_access_policy_grant](./docs/resources/row_access_policy_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_schema_grant](./docs/resources/schema_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_sequence_grant](./docs/resources/sequence_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_stage_grant](./docs/resources/stage_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_stream_grant](./docs/resources/stream_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_table_grant](./docs/resources/table_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_tag_grant](./docs/resources/tag_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_task_grant](./docs/resources/task_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_unsafe_execute](./docs/resources/unsafe_execute)
- [snowflake_user_grant](./docs/resources/user_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_user_ownership_grant](./docs/resources/user_ownership_grant) - use [snowflake_grant_ownership](./docs/resources/grant_ownership) instead
- [snowflake_view_grant](./docs/resources/view_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead
- [snowflake_warehouse_grant](./docs/resources/warehouse_grant) - use [snowflake_grant_privileges_to_account_role](./docs/resources/grant_privileges_to_account_role) instead

## Currently deprecated datasources

Expand Down
43 changes: 0 additions & 43 deletions docs/resources/account_grant.md

This file was deleted.

53 changes: 0 additions & 53 deletions docs/resources/database_grant.md

This file was deleted.

61 changes: 0 additions & 61 deletions docs/resources/external_table_grant.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/resources/failover_group_grant.md

This file was deleted.

58 changes: 0 additions & 58 deletions docs/resources/file_format_grant.md

This file was deleted.

60 changes: 0 additions & 60 deletions docs/resources/function_grant.md

This file was deleted.

Loading

0 comments on commit 05b7eee

Please sign in to comment.