-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes: - resource added/adjusted - added `account_role` resource (the old one shares the same implementation as the new one, but it has the deprecation message) to fit with other resources that work with roles (mostly grants) - added show output attribute - data source adjusted - structure and attribute names adjusted to the conventions - documentation - Entries added to the migration guide - Examples adjusted (adjusted the old role documentation and replaced deprecated role resource with the new one in the examples for other resources) - Added V1 release candidate note ## Test Plan <!-- detail ways in which this PR has been tested or needs to be tested --> * [x] acceptance tests adjusted to the standard ones ## References <!-- issues documentation links, etc --> * [CREATE ROLE](https://docs.snowflake.com/en/sql-reference/sql/create-role)
- Loading branch information
1 parent
ef496c2
commit 32c7690
Showing
69 changed files
with
957 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
page_title: "snowflake_account_role Resource - terraform-provider-snowflake" | ||
subcategory: "" | ||
description: |- | ||
The resource is used for role management, where roles can be assigned privileges and, in turn, granted to users and other roles. When granted to roles they can create hierarchies of privilege structures. For more details, refer to the official documentation https://docs.snowflake.com/en/user-guide/security-access-control-overview. | ||
--- | ||
|
||
!> **V1 release candidate** This resource was reworked and is a release candidate for the V1. We do not expect significant changes in it before the V1. We will welcome any feedback and adjust the resource if needed. Any errors reported will be resolved with a higher priority. We encourage checking this resource out before the V1 release. Please follow the [migration guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#v0920--v0930) to use it. | ||
|
||
# snowflake_account_role (Resource) | ||
|
||
The resource is used for role management, where roles can be assigned privileges and, in turn, granted to users and other roles. When granted to roles they can create hierarchies of privilege structures. For more details, refer to the [official documentation](https://docs.snowflake.com/en/user-guide/security-access-control-overview). | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
## Minimal | ||
resource "snowflake_account_role" "minimal" { | ||
name = "role_name" | ||
} | ||
## Complete (with every optional set) | ||
resource "snowflake_account_role" "complete" { | ||
name = "role_name" | ||
comment = "my account role" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) | ||
|
||
### Optional | ||
|
||
- `comment` (String) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `show_output` (List of Object) Outputs the result of `SHOW ROLES` for the given role. (see [below for nested schema](#nestedatt--show_output)) | ||
|
||
<a id="nestedatt--show_output"></a> | ||
### Nested Schema for `show_output` | ||
|
||
Read-Only: | ||
|
||
- `assigned_to_users` (Number) | ||
- `comment` (String) | ||
- `created_on` (String) | ||
- `granted_roles` (Number) | ||
- `granted_to_roles` (Number) | ||
- `is_current` (Boolean) | ||
- `is_default` (Boolean) | ||
- `is_inherited` (Boolean) | ||
- `name` (String) | ||
- `owner` (String) | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import snowflake_account_role.example "name" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.