diff --git a/docs/resources/grant_privileges_to_share.md b/docs/resources/grant_privileges_to_share.md index ea241bddd6..0beac830ba 100644 --- a/docs/resources/grant_privileges_to_share.md +++ b/docs/resources/grant_privileges_to_share.md @@ -6,6 +6,8 @@ description: |- --- +~> **Note** This is a preview resource. It's ready for general use. In case of any errors, please file an issue in our GitHub repository. + # snowflake_grant_privileges_to_share (Resource) @@ -106,3 +108,35 @@ resource "snowflake_grant_privileges_to_share" "example" { ### Read-Only - `id` (String) The ID of this resource. + +## Import + +~> **Note** All the ..._name parts should be fully qualified names, e.g. for database object it is `"".""` + +Import is supported using the following syntax: + +`terraform import "|||"` + +where: +- share_name - fully qualified identifier +- privileges - list of privileges, comma separated. See the available privileges for given object types: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax +- grant_type - enum +- grant_identifier - fully qualified identifier + +### OnDatabase +`terraform import "||OnDatabase|"` + +### OnSchema +`terraform import "||OnSchema|."` + +### OnTable +`terraform import "||OnTable|.."` + +### OnSchema +`terraform import "||OnAllTablesInSchema|."` + +### OnTag +`terraform import "||OnTag|.."` + +### OnView +`terraform import "||OnView|.."` diff --git a/templates/resources/grant_privileges_to_share.md.tmpl b/templates/resources/grant_privileges_to_share.md.tmpl new file mode 100644 index 0000000000..f2639461b1 --- /dev/null +++ b/templates/resources/grant_privileges_to_share.md.tmpl @@ -0,0 +1,53 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +~> **Note** This is a preview resource. It's ready for general use. In case of any errors, please file an issue in our GitHub repository. + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +{{ if .HasExample -}} +## Example Usage + +{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +{{- end }} + +{{ .SchemaMarkdown | trimspace }} + +## Import + +~> **Note** All the ..._name parts should be fully qualified names, e.g. for database object it is `"".""` + +Import is supported using the following syntax: + +`terraform import "|||"` + +where: +- share_name - fully qualified identifier +- privileges - list of privileges, comma separated. See the available privileges for given object types: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax +- grant_type - enum +- grant_identifier - fully qualified identifier + +### OnDatabase +`terraform import "||OnDatabase|"` + +### OnSchema +`terraform import "||OnSchema|."` + +### OnTable +`terraform import "||OnTable|.."` + +### OnSchema +`terraform import "||OnAllTablesInSchema|."` + +### OnTag +`terraform import "||OnTag|.."` + +### OnView +`terraform import "||OnView|.."`