From 00461eec6b0838ca98c86847bad02cfd5c58eaa9 Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Tue, 20 Aug 2024 17:37:57 +0200 Subject: [PATCH 1/7] Add annotation about fully_qualified_name and fix handling granteeName in grants --- docs/guides/identifiers.md | 23 ++++++++++ .../account_password_policy_attachment.md | 3 ++ docs/resources/grant_ownership.md | 2 + .../grant_privileges_to_account_role.md | 2 + .../grant_privileges_to_database_role.md | 2 + docs/resources/stream.md | 3 ++ ...table_column_masking_policy_application.md | 2 + docs/resources/table_constraint.md | 3 ++ .../tag_masking_policy_association.md | 3 ++ .../user_password_policy_attachment.md | 3 ++ pkg/resources/grant_database_role.go | 2 +- .../grant_database_role_acceptance_test.go | 42 +++++++++++++++++++ pkg/sdk/grants.go | 19 +-------- pkg/sdk/grants_impl.go | 18 ++++++++ pkg/sdk/testint/grants_integration_test.go | 25 +++++++++++ ...account_password_policy_attachment.md.tmpl | 32 ++++++++++++++ templates/resources/grant_ownership.md.tmpl | 2 + .../grant_privileges_to_account_role.md.tmpl | 2 + .../grant_privileges_to_database_role.md.tmpl | 2 + templates/resources/stream.md.tmpl | 32 ++++++++++++++ ..._column_masking_policy_application.md.tmpl | 2 + templates/resources/table_constraint.md.tmpl | 32 ++++++++++++++ .../tag_masking_policy_association.md.tmpl | 32 ++++++++++++++ .../user_password_policy_attachment.md.tmpl | 32 ++++++++++++++ 24 files changed, 301 insertions(+), 19 deletions(-) create mode 100644 docs/guides/identifiers.md create mode 100644 templates/resources/account_password_policy_attachment.md.tmpl create mode 100644 templates/resources/stream.md.tmpl create mode 100644 templates/resources/table_constraint.md.tmpl create mode 100644 templates/resources/tag_masking_policy_association.md.tmpl create mode 100644 templates/resources/user_password_policy_attachment.md.tmpl diff --git a/docs/guides/identifiers.md b/docs/guides/identifiers.md new file mode 100644 index 0000000000..cbbdf8598a --- /dev/null +++ b/docs/guides/identifiers.md @@ -0,0 +1,23 @@ +--- +page_title: "Identifiers rework" +subcategory: "" +description: |- + +--- +# Identifiers rework + +## New computed fully qualified name field in resources + +With the combination of quotes, old parsing methods, and other factors, it was a struggle to specify the fully qualified name of an object needed (e.g. [#2164](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2164), [#2754](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2754)). Now, with v0.95.0, every resource that represents an object in Snowflake (e.g. user, role), and not an association (e.g. grants) will have a new computed field named `fully_qualified_name`. With the new computed field, it will be much easier to use resources requiring fully qualified names, for examples of usage head over to the [documentation for granting privileges to account role](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_account_role). + +For example, instead of writing + +```object_name = “\”${snowflake_table.database}\”.\”${snowflake_table.schema}\”.\”${snowflake_table.name}\””``` + +now we can write + +```object_name = snowflake_table.fully_qualified_name``` + +If you don't manage table in Terraform, you can construct the proper id yourself like before: `"\"database_name\".\"schema_name\".\"table_name\""` + + diff --git a/docs/resources/account_password_policy_attachment.md b/docs/resources/account_password_policy_attachment.md index 9474287ef3..0e3968c376 100644 --- a/docs/resources/account_password_policy_attachment.md +++ b/docs/resources/account_password_policy_attachment.md @@ -9,6 +9,7 @@ description: |- Specifies the password policy to use for the current account. To set the password policy of a different account, use a provider alias. + ## Example Usage ```terraform @@ -23,6 +24,8 @@ resource "snowflake_account_password_policy_attachment" "attachment" { } ``` +-> **Note** If you don't manage password policy in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/grant_ownership.md b/docs/resources/grant_ownership.md index 4dd448bf73..69c2a868e8 100644 --- a/docs/resources/grant_ownership.md +++ b/docs/resources/grant_ownership.md @@ -208,6 +208,8 @@ resource "snowflake_schema" "test" { } ``` +-> **Note** If you don't manage database role in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Granting ownership on pipes To transfer ownership of a pipe, there must be additional conditions met. Otherwise, additional manual work will be needed afterward or in some cases, the ownership won't be transferred (resulting in error). diff --git a/docs/resources/grant_privileges_to_account_role.md b/docs/resources/grant_privileges_to_account_role.md index 97da6b5105..b778faa5b8 100644 --- a/docs/resources/grant_privileges_to_account_role.md +++ b/docs/resources/grant_privileges_to_account_role.md @@ -255,6 +255,8 @@ resource "snowflake_grant_privileges_to_account_role" "example" { ## ID: "\"role_name\"|false|false|SELECT,INSERT|OnSchemaObject|OnFuture|TABLES|InSchema|\"database\".\"my_schema\"" ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/grant_privileges_to_database_role.md b/docs/resources/grant_privileges_to_database_role.md index 271388ecf4..d0efba7ee3 100644 --- a/docs/resources/grant_privileges_to_database_role.md +++ b/docs/resources/grant_privileges_to_database_role.md @@ -173,6 +173,8 @@ resource "snowflake_grant_privileges_to_database_role" "example" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/stream.md b/docs/resources/stream.md index 8dd7800358..23d22ea4f4 100644 --- a/docs/resources/stream.md +++ b/docs/resources/stream.md @@ -9,6 +9,7 @@ description: |- + ## Example Usage ```terraform @@ -38,6 +39,8 @@ resource "snowflake_stream" "stream" { } ``` +-> **Note** If you don't manage table in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/table_column_masking_policy_application.md b/docs/resources/table_column_masking_policy_application.md index dbeb682359..0316ed72c9 100644 --- a/docs/resources/table_column_masking_policy_application.md +++ b/docs/resources/table_column_masking_policy_application.md @@ -65,6 +65,8 @@ resource "snowflake_table_column_masking_policy_application" "application" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/table_constraint.md b/docs/resources/table_constraint.md index d8cad4d90f..302b44908e 100644 --- a/docs/resources/table_constraint.md +++ b/docs/resources/table_constraint.md @@ -9,6 +9,7 @@ description: |- + ## Example Usage ```terraform @@ -97,6 +98,8 @@ resource "snowflake_table_constraint" "unique" { } ``` +-> **Note** If you don't manage table in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/tag_masking_policy_association.md b/docs/resources/tag_masking_policy_association.md index 1cd06d980c..a96d47a07c 100644 --- a/docs/resources/tag_masking_policy_association.md +++ b/docs/resources/tag_masking_policy_association.md @@ -9,6 +9,7 @@ description: |- Attach a masking policy to a tag. Requires a current warehouse to be set. Either with SNOWFLAKE_WAREHOUSE env variable or in current session. If no warehouse is provided, a temporary warehouse will be created. + ## Example Usage ```terraform @@ -58,6 +59,8 @@ resource "snowflake_tag_masking_policy_association" "name" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/user_password_policy_attachment.md b/docs/resources/user_password_policy_attachment.md index 54b38a17cd..f4f8b0a835 100644 --- a/docs/resources/user_password_policy_attachment.md +++ b/docs/resources/user_password_policy_attachment.md @@ -9,6 +9,7 @@ description: |- Specifies the password policy to use for a certain user. + ## Example Usage ```terraform @@ -27,6 +28,8 @@ resource "snowflake_user_password_policy_attachment" "ppa" { } ``` +-> **Note** If you don't manage password policy in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/pkg/resources/grant_database_role.go b/pkg/resources/grant_database_role.go index 69f1c465ad..4416e169b5 100644 --- a/pkg/resources/grant_database_role.go +++ b/pkg/resources/grant_database_role.go @@ -154,7 +154,7 @@ func ReadGrantDatabaseRole(d *schema.ResourceData, meta interface{}) error { var found bool for _, grant := range grants { if grant.GrantedTo == sdk.ObjectType(objectType) { - if grant.GrantedTo == sdk.ObjectTypeRole || grant.GrantedTo == sdk.ObjectTypeShare { + if true { if grant.GranteeName.FullyQualifiedName() == targetIdentifier { found = true break diff --git a/pkg/resources/grant_database_role_acceptance_test.go b/pkg/resources/grant_database_role_acceptance_test.go index d575f49e8c..6432fdfe5a 100644 --- a/pkg/resources/grant_database_role_acceptance_test.go +++ b/pkg/resources/grant_database_role_acceptance_test.go @@ -167,3 +167,45 @@ func TestAcc_GrantDatabaseRole_share(t *testing.T) { }, }) } + +func TestAcc_GrantDatabaseRole_shareWithDots(t *testing.T) { + databaseId := acc.TestClient().Ids.RandomAccountObjectIdentifier() + databaseRoleId := acc.TestClient().Ids.RandomDatabaseObjectIdentifierInDatabase(databaseId) + shareId := acc.TestClient().Ids.RandomAccountObjectIdentifierContaining(".") + + configVariables := func() config.Variables { + return config.Variables{ + "database": config.StringVariable(databaseId.Name()), + "database_role_name": config.StringVariable(databaseRoleId.Name()), + "share_name": config.StringVariable(shareId.Name()), + } + } + resourceName := "snowflake_grant_database_role.test" + resource.Test(t, resource.TestCase{ + ProtoV6ProviderFactories: acc.TestAccProtoV6ProviderFactories, + PreCheck: func() { acc.TestAccPreCheck(t) }, + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.RequireAbove(tfversion.Version1_5_0), + }, + CheckDestroy: acc.CheckGrantDatabaseRoleDestroy(t), + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TestAcc_GrantDatabaseRole/share"), + ConfigVariables: configVariables(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "database_role_name", databaseRoleId.FullyQualifiedName()), + resource.TestCheckResourceAttr(resourceName, "share_name", shareId.Name()), + resource.TestCheckResourceAttr(resourceName, "id", fmt.Sprintf(`%v|%v|%v`, databaseRoleId.FullyQualifiedName(), "SHARE", shareId.FullyQualifiedName())), + ), + }, + // test import + { + ConfigDirectory: config.StaticDirectory("testdata/TestAcc_GrantDatabaseRole/share"), + ConfigVariables: configVariables(), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/pkg/sdk/grants.go b/pkg/sdk/grants.go index 0a6b3cc948..e9199028f2 100644 --- a/pkg/sdk/grants.go +++ b/pkg/sdk/grants.go @@ -229,24 +229,7 @@ func (v *Grant) ID() ObjectIdentifier { func (row grantRow) convert() *Grant { grantedTo := ObjectType(strings.ReplaceAll(row.GrantedTo, "_", " ")) grantTo := ObjectType(strings.ReplaceAll(row.GrantTo, "_", " ")) - var granteeName AccountObjectIdentifier - if grantedTo == ObjectTypeShare { - // TODO(SNOW-1058419): Change this logic during identifiers rework - parts := strings.Split(row.GranteeName, ".") - switch { - case len(parts) == 1: - granteeName = NewAccountObjectIdentifier(parts[0]) - case len(parts) == 2: - granteeName = NewAccountObjectIdentifier(parts[1]) - default: - fallback := row.GranteeName[strings.IndexRune(row.GranteeName, '.')+1:] - log.Printf("unsupported case for share's grantee name: %s Falling back to account object identifier: %s", row.GranteeName, fallback) - granteeName = NewAccountObjectIdentifier(fallback) - } - } else { - granteeName = NewAccountObjectIdentifier(row.GranteeName) - } - + granteeName := NewAccountObjectIdentifier(row.GranteeName) var grantedOn ObjectType // true for current grants if row.GrantedOn != "" { diff --git a/pkg/sdk/grants_impl.go b/pkg/sdk/grants_impl.go index 0a67f82164..c7e54f999f 100644 --- a/pkg/sdk/grants_impl.go +++ b/pkg/sdk/grants_impl.go @@ -6,6 +6,7 @@ import ( "fmt" "log" "slices" + "strings" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk/internal/collections" @@ -261,6 +262,23 @@ func (v *grants) Show(ctx context.Context, opts *ShowGrantOptions) ([]Grant, err } logging.DebugLogger.Printf("[DEBUG] Show grants: converting rows") resultList := convertRows[grantRow, Grant](dbRows) + for i, grant := range resultList { + // SHOW GRANTS of DATABASE ROLE requires a special handling: + // - it returns no account name, so for other SHOW GRANTS types it needs to be skipped + // - it returns fully qualified name for database objects + if !(valueSet(opts.Of) && valueSet(opts.Of.DatabaseRole)) { + if grant.GrantedTo == ObjectTypeShare { + oldId := grant.GranteeName.Name() + skipAccount := oldId[strings.IndexRune(oldId, '.')+1:] + log.Printf("unsupported case for share's grantee name: %s Falling back to account object identifier: %s", grant.GranteeName, skipAccount) + resultList[i].GranteeName = NewAccountObjectIdentifier(skipAccount) + } + } else { + if grant.GrantedTo != ObjectTypeRole && grant.GrantedTo != ObjectTypeShare { + resultList[i].GranteeName = NewDatabaseObjectIdentifierFromFullyQualifiedName(grant.GranteeName.FullyQualifiedName()) + } + } + } logging.DebugLogger.Printf("[DEBUG] Show grants: rows converted") return resultList, nil } diff --git a/pkg/sdk/testint/grants_integration_test.go b/pkg/sdk/testint/grants_integration_test.go index d009e32142..f652405c54 100644 --- a/pkg/sdk/testint/grants_integration_test.go +++ b/pkg/sdk/testint/grants_integration_test.go @@ -931,6 +931,31 @@ func TestInt_GrantPrivilegeToShare(t *testing.T) { }) require.NoError(t, err) + err = client.Grants.GrantPrivilegeToShare(ctx, []sdk.ObjectPrivilege{sdk.ObjectPrivilegeUsage}, &sdk.ShareGrantOn{ + Function: function.ID(), + }, shareTest.ID()) + require.NoError(t, err) + + grants, err = client.Grants.Show(ctx, &sdk.ShowGrantOptions{ + On: &sdk.ShowGrantsOn{ + Object: &sdk.Object{ + ObjectType: sdk.ObjectTypeFunction, + Name: function.ID(), + }, + }, + }) + require.NoError(t, err) + assertGrant(t, grants, function.ID(), sdk.ObjectPrivilegeUsage, sdk.ObjectTypeFunction, shareTest.ID(), shareTest.ID().Name()) + + _, err = client.Grants.Show(ctx, &sdk.ShowGrantOptions{ + To: &sdk.ShowGrantsTo{ + Share: &sdk.ShowGrantsToShare{ + Name: shareTest.ID(), + }, + }, + }) + require.NoError(t, err) + applicationPackage, cleanupAppPackage := testClientHelper().ApplicationPackage.CreateApplicationPackage(t) t.Cleanup(cleanupAppPackage) // TODO [SNOW-1284382]: alter the test when the syntax starts working diff --git a/templates/resources/account_password_policy_attachment.md.tmpl b/templates/resources/account_password_policy_attachment.md.tmpl new file mode 100644 index 0000000000..92a2ff63dd --- /dev/null +++ b/templates/resources/account_password_policy_attachment.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ if gt (len (split .Description "")) 1 -}} +{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} +{{- else -}} +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +{{- end }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + + +## Example Usage + +{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage password policy in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + +{{ .SchemaMarkdown | trimspace }} + +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} +{{- end }} diff --git a/templates/resources/grant_ownership.md.tmpl b/templates/resources/grant_ownership.md.tmpl index 13c31d562a..67d738ef29 100644 --- a/templates/resources/grant_ownership.md.tmpl +++ b/templates/resources/grant_ownership.md.tmpl @@ -22,6 +22,8 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage database role in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) {{- end }} ## Granting ownership on pipes diff --git a/templates/resources/grant_privileges_to_account_role.md.tmpl b/templates/resources/grant_privileges_to_account_role.md.tmpl index ceb22643b2..e3f1248e97 100644 --- a/templates/resources/grant_privileges_to_account_role.md.tmpl +++ b/templates/resources/grant_privileges_to_account_role.md.tmpl @@ -23,6 +23,8 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/grant_privileges_to_database_role.md.tmpl b/templates/resources/grant_privileges_to_database_role.md.tmpl index 1980f5c3ea..8376f6ff42 100644 --- a/templates/resources/grant_privileges_to_database_role.md.tmpl +++ b/templates/resources/grant_privileges_to_database_role.md.tmpl @@ -21,6 +21,8 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/stream.md.tmpl b/templates/resources/stream.md.tmpl new file mode 100644 index 0000000000..aefea3474d --- /dev/null +++ b/templates/resources/stream.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ if gt (len (split .Description "")) 1 -}} +{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} +{{- else -}} +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +{{- end }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + + +## Example Usage + +{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage table in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + +{{ .SchemaMarkdown | trimspace }} + +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} +{{- end }} diff --git a/templates/resources/table_column_masking_policy_application.md.tmpl b/templates/resources/table_column_masking_policy_application.md.tmpl index c4f5f7271f..70f5e274c7 100644 --- a/templates/resources/table_column_masking_policy_application.md.tmpl +++ b/templates/resources/table_column_masking_policy_application.md.tmpl @@ -22,4 +22,6 @@ When using this resource to manage a table column's masking policy make sure to {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/table_constraint.md.tmpl b/templates/resources/table_constraint.md.tmpl new file mode 100644 index 0000000000..aefea3474d --- /dev/null +++ b/templates/resources/table_constraint.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ if gt (len (split .Description "")) 1 -}} +{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} +{{- else -}} +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +{{- end }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + + +## Example Usage + +{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage table in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + +{{ .SchemaMarkdown | trimspace }} + +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} +{{- end }} diff --git a/templates/resources/tag_masking_policy_association.md.tmpl b/templates/resources/tag_masking_policy_association.md.tmpl new file mode 100644 index 0000000000..024f13413b --- /dev/null +++ b/templates/resources/tag_masking_policy_association.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ if gt (len (split .Description "")) 1 -}} +{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} +{{- else -}} +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +{{- end }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + + +## Example Usage + +{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + +{{ .SchemaMarkdown | trimspace }} + +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} +{{- end }} diff --git a/templates/resources/user_password_policy_attachment.md.tmpl b/templates/resources/user_password_policy_attachment.md.tmpl new file mode 100644 index 0000000000..92a2ff63dd --- /dev/null +++ b/templates/resources/user_password_policy_attachment.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ if gt (len (split .Description "")) 1 -}} +{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} +{{- else -}} +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +{{- end }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + + +## Example Usage + +{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage password policy in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + +{{ .SchemaMarkdown | trimspace }} + +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} +{{- end }} From f2df1d8e7f6c0211643af0158438b226b7dabb77 Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Wed, 21 Aug 2024 09:59:29 +0200 Subject: [PATCH 2/7] Cleanup --- pkg/resources/grant_database_role.go | 42 +++------------------- pkg/sdk/grants_impl.go | 1 - pkg/sdk/testint/grants_integration_test.go | 25 ------------- templates/guides/identifiers.md.tmpl | 23 ++++++++++++ 4 files changed, 27 insertions(+), 64 deletions(-) create mode 100644 templates/guides/identifiers.md.tmpl diff --git a/pkg/resources/grant_database_role.go b/pkg/resources/grant_database_role.go index 4416e169b5..1855de87ec 100644 --- a/pkg/resources/grant_database_role.go +++ b/pkg/resources/grant_database_role.go @@ -153,44 +153,10 @@ func ReadGrantDatabaseRole(d *schema.ResourceData, meta interface{}) error { var found bool for _, grant := range grants { - if grant.GrantedTo == sdk.ObjectType(objectType) { - if true { - if grant.GranteeName.FullyQualifiedName() == targetIdentifier { - found = true - break - } - } else { - /* - note that grantee_name is not saved as a valid identifier in the - SHOW GRANTS OF DATABASE ROLE command - for example, "ABC"."test_parent_role" is saved as ABC."test_parent_role" - or "ABC"."test_parent_role" is saved as ABC.test_parent_role - and our internal mapper thereby fails to parse it correctly, returning "ABC."test_parent_role" - so this funny string replacement is needed to make it work - */ - s := grant.GranteeName.FullyQualifiedName() - if !strings.Contains(s, "\"") { - parts := strings.Split(s, ".") - s = sdk.NewDatabaseObjectIdentifier(parts[0], parts[1]).FullyQualifiedName() - } else { - parts := strings.Split(s, "\".\"") - if len(parts) < 2 { - parts = strings.Split(s, "\".") - if len(parts) < 2 { - parts = strings.Split(s, ".\"") - if len(parts) < 2 { - s = strings.Trim(s, "\"") - parts = strings.Split(s, ".") - } - } - } - s = sdk.NewDatabaseObjectIdentifier(parts[0], parts[1]).FullyQualifiedName() - } - if s == targetIdentifier { - found = true - break - } - } + if grant.GrantedTo == sdk.ObjectType(objectType) && + grant.GranteeName.FullyQualifiedName() == targetIdentifier { + found = true + break } } if !found { diff --git a/pkg/sdk/grants_impl.go b/pkg/sdk/grants_impl.go index c7e54f999f..29f3cea60d 100644 --- a/pkg/sdk/grants_impl.go +++ b/pkg/sdk/grants_impl.go @@ -270,7 +270,6 @@ func (v *grants) Show(ctx context.Context, opts *ShowGrantOptions) ([]Grant, err if grant.GrantedTo == ObjectTypeShare { oldId := grant.GranteeName.Name() skipAccount := oldId[strings.IndexRune(oldId, '.')+1:] - log.Printf("unsupported case for share's grantee name: %s Falling back to account object identifier: %s", grant.GranteeName, skipAccount) resultList[i].GranteeName = NewAccountObjectIdentifier(skipAccount) } } else { diff --git a/pkg/sdk/testint/grants_integration_test.go b/pkg/sdk/testint/grants_integration_test.go index f652405c54..d009e32142 100644 --- a/pkg/sdk/testint/grants_integration_test.go +++ b/pkg/sdk/testint/grants_integration_test.go @@ -931,31 +931,6 @@ func TestInt_GrantPrivilegeToShare(t *testing.T) { }) require.NoError(t, err) - err = client.Grants.GrantPrivilegeToShare(ctx, []sdk.ObjectPrivilege{sdk.ObjectPrivilegeUsage}, &sdk.ShareGrantOn{ - Function: function.ID(), - }, shareTest.ID()) - require.NoError(t, err) - - grants, err = client.Grants.Show(ctx, &sdk.ShowGrantOptions{ - On: &sdk.ShowGrantsOn{ - Object: &sdk.Object{ - ObjectType: sdk.ObjectTypeFunction, - Name: function.ID(), - }, - }, - }) - require.NoError(t, err) - assertGrant(t, grants, function.ID(), sdk.ObjectPrivilegeUsage, sdk.ObjectTypeFunction, shareTest.ID(), shareTest.ID().Name()) - - _, err = client.Grants.Show(ctx, &sdk.ShowGrantOptions{ - To: &sdk.ShowGrantsTo{ - Share: &sdk.ShowGrantsToShare{ - Name: shareTest.ID(), - }, - }, - }) - require.NoError(t, err) - applicationPackage, cleanupAppPackage := testClientHelper().ApplicationPackage.CreateApplicationPackage(t) t.Cleanup(cleanupAppPackage) // TODO [SNOW-1284382]: alter the test when the syntax starts working diff --git a/templates/guides/identifiers.md.tmpl b/templates/guides/identifiers.md.tmpl new file mode 100644 index 0000000000..cbbdf8598a --- /dev/null +++ b/templates/guides/identifiers.md.tmpl @@ -0,0 +1,23 @@ +--- +page_title: "Identifiers rework" +subcategory: "" +description: |- + +--- +# Identifiers rework + +## New computed fully qualified name field in resources + +With the combination of quotes, old parsing methods, and other factors, it was a struggle to specify the fully qualified name of an object needed (e.g. [#2164](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2164), [#2754](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2754)). Now, with v0.95.0, every resource that represents an object in Snowflake (e.g. user, role), and not an association (e.g. grants) will have a new computed field named `fully_qualified_name`. With the new computed field, it will be much easier to use resources requiring fully qualified names, for examples of usage head over to the [documentation for granting privileges to account role](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_account_role). + +For example, instead of writing + +```object_name = “\”${snowflake_table.database}\”.\”${snowflake_table.schema}\”.\”${snowflake_table.name}\””``` + +now we can write + +```object_name = snowflake_table.fully_qualified_name``` + +If you don't manage table in Terraform, you can construct the proper id yourself like before: `"\"database_name\".\"schema_name\".\"table_name\""` + + From 6388055636c6d42ba397a7b4e23027ae4841cd59 Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Wed, 21 Aug 2024 14:15:30 +0200 Subject: [PATCH 3/7] Review suggestions --- MIGRATION_GUIDE.md | 2 + docs/guides/identifiers.md | 6 ++- docs/resources/account_parameter.md | 3 ++ .../account_password_policy_attachment.md | 4 +- docs/resources/alert.md | 3 ++ docs/resources/api_integration.md | 3 ++ docs/resources/database_old.md | 3 ++ docs/resources/database_role.md | 3 ++ docs/resources/dynamic_table.md | 3 ++ .../email_notification_integration.md | 3 ++ docs/resources/external_function.md | 3 ++ docs/resources/external_oauth_integration.md | 4 +- docs/resources/external_table.md | 3 ++ docs/resources/failover_group.md | 3 ++ docs/resources/file_format.md | 3 ++ docs/resources/function.md | 3 ++ docs/resources/grant_account_role.md | 3 ++ docs/resources/grant_application_role.md | 3 ++ docs/resources/grant_database_role.md | 3 ++ docs/resources/grant_ownership.md | 2 - .../grant_privileges_to_account_role.md | 2 - .../grant_privileges_to_database_role.md | 2 - docs/resources/managed_account.md | 3 ++ docs/resources/masking_policy.md | 3 ++ docs/resources/materialized_view.md | 3 ++ docs/resources/network_policy_attachment.md | 3 ++ docs/resources/network_rule.md | 3 ++ docs/resources/notification_integration.md | 3 ++ docs/resources/oauth_integration.md | 3 ++ docs/resources/object_parameter.md | 3 ++ docs/resources/procedure.md | 3 ++ docs/resources/resource_monitor.md | 3 ++ docs/resources/role.md | 3 ++ docs/resources/row_access_policy.md | 3 ++ docs/resources/saml_integration.md | 3 ++ docs/resources/sequence.md | 3 ++ docs/resources/session_parameter.md | 3 ++ docs/resources/share.md | 3 ++ docs/resources/stage.md | 3 ++ docs/resources/storage_integration.md | 3 ++ docs/resources/stream.md | 4 +- docs/resources/table.md | 3 ++ ...table_column_masking_policy_application.md | 2 - docs/resources/table_constraint.md | 4 +- docs/resources/tag.md | 3 ++ docs/resources/tag_association.md | 3 ++ .../tag_masking_policy_association.md | 2 +- docs/resources/task.md | 3 ++ .../user_password_policy_attachment.md | 4 +- docs/resources/view.md | 3 ++ .../resource.tf | 4 +- .../grant_database_role_acceptance_test.go | 40 +++++++++++++++++++ pkg/sdk/grants_impl.go | 6 ++- templates/guides/identifiers.md.tmpl | 6 ++- templates/resources.md.tmpl | 4 ++ ...account_password_policy_attachment.md.tmpl | 32 --------------- templates/resources/grant_ownership.md.tmpl | 2 - .../grant_privileges_to_account_role.md.tmpl | 2 - .../grant_privileges_to_database_role.md.tmpl | 2 - templates/resources/stream.md.tmpl | 32 --------------- ..._column_masking_policy_application.md.tmpl | 2 - templates/resources/table_constraint.md.tmpl | 32 --------------- .../tag_masking_policy_association.md.tmpl | 32 --------------- .../user_password_policy_attachment.md.tmpl | 32 --------------- 64 files changed, 186 insertions(+), 194 deletions(-) delete mode 100644 templates/resources/account_password_policy_attachment.md.tmpl delete mode 100644 templates/resources/stream.md.tmpl delete mode 100644 templates/resources/table_constraint.md.tmpl delete mode 100644 templates/resources/tag_masking_policy_association.md.tmpl delete mode 100644 templates/resources/user_password_policy_attachment.md.tmpl diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index bf8805c80a..403b8281e7 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -16,6 +16,8 @@ writing ```object_name = snowflake_table.fully_qualified_name``` +See more details in [identifiers guide](./docs/guides/identifiers.md#new-computed-fully-qualified-name-field-in-resources). + See [example usage](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_account_role). Some of the resources are excluded from this change: diff --git a/docs/guides/identifiers.md b/docs/guides/identifiers.md index cbbdf8598a..94def58363 100644 --- a/docs/guides/identifiers.md +++ b/docs/guides/identifiers.md @@ -8,7 +8,7 @@ description: |- ## New computed fully qualified name field in resources -With the combination of quotes, old parsing methods, and other factors, it was a struggle to specify the fully qualified name of an object needed (e.g. [#2164](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2164), [#2754](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2754)). Now, with v0.95.0, every resource that represents an object in Snowflake (e.g. user, role), and not an association (e.g. grants) will have a new computed field named `fully_qualified_name`. With the new computed field, it will be much easier to use resources requiring fully qualified names, for examples of usage head over to the [documentation for granting privileges to account role](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_account_role). +With the combination of quotes, old parsing methods, and other factors, it was a struggle to specify the fully qualified name of an object needed (e.g. [#2164](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2164), [#2754](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2754)). Starting from version v0.95.0, every resource that represents an object in Snowflake (e.g. user, role), and not an association (e.g. grants) will have a new computed field named `fully_qualified_name`. With the new computed field, it will be much easier to use resources requiring fully qualified names, for examples of usage head over to the [documentation for granting privileges to account role](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_account_role). For example, instead of writing @@ -18,6 +18,8 @@ now we can write ```object_name = snowflake_table.fully_qualified_name``` -If you don't manage table in Terraform, you can construct the proper id yourself like before: `"\"database_name\".\"schema_name\".\"table_name\""` +This is our recommended way of referencing other objects. However, if you don't manage table in Terraform, you can construct the proper id yourself like before: `"\"database_name\".\"schema_name\".\"table_name\""` Note that quotes are necessary for correct parsing of an identifier. + +This change was announced in v0.95.0 [migration guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#new-fully_qualified_name-field-in-the-resources). diff --git a/docs/resources/account_parameter.md b/docs/resources/account_parameter.md index 8994c50d43..db224615e9 100644 --- a/docs/resources/account_parameter.md +++ b/docs/resources/account_parameter.md @@ -23,6 +23,9 @@ resource "snowflake_account_parameter" "p2" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/account_password_policy_attachment.md b/docs/resources/account_password_policy_attachment.md index 0e3968c376..5eec025284 100644 --- a/docs/resources/account_password_policy_attachment.md +++ b/docs/resources/account_password_policy_attachment.md @@ -9,7 +9,6 @@ description: |- Specifies the password policy to use for the current account. To set the password policy of a different account, use a provider alias. - ## Example Usage ```terraform @@ -24,7 +23,8 @@ resource "snowflake_account_password_policy_attachment" "attachment" { } ``` --> **Note** If you don't manage password policy in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/alert.md b/docs/resources/alert.md index c2906f22ca..bcce771616 100644 --- a/docs/resources/alert.md +++ b/docs/resources/alert.md @@ -27,6 +27,9 @@ resource "snowflake_alert" "alert" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/api_integration.md b/docs/resources/api_integration.md index cb07c8cb9f..46c09aa4b3 100644 --- a/docs/resources/api_integration.md +++ b/docs/resources/api_integration.md @@ -38,6 +38,9 @@ resource "snowflake_api_integration" "gcp" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/database_old.md b/docs/resources/database_old.md index e6fdecabe8..73d1f79b27 100644 --- a/docs/resources/database_old.md +++ b/docs/resources/database_old.md @@ -44,6 +44,9 @@ resource "snowflake_database_old" "from_share" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/database_role.md b/docs/resources/database_role.md index a3cd48ca4a..0b8c0008c5 100644 --- a/docs/resources/database_role.md +++ b/docs/resources/database_role.md @@ -19,6 +19,9 @@ resource "snowflake_database_role" "db_role" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/dynamic_table.md b/docs/resources/dynamic_table.md index c1c885fb38..687c90a8f2 100644 --- a/docs/resources/dynamic_table.md +++ b/docs/resources/dynamic_table.md @@ -26,6 +26,9 @@ resource "snowflake_dynamic_table" "dt" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/email_notification_integration.md b/docs/resources/email_notification_integration.md index 3212dbe1e1..4b6e8df40c 100644 --- a/docs/resources/email_notification_integration.md +++ b/docs/resources/email_notification_integration.md @@ -21,6 +21,9 @@ resource "snowflake_email_notification_integration" "email_int" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/external_function.md b/docs/resources/external_function.md index 7d776e324e..544eb2faa4 100644 --- a/docs/resources/external_function.md +++ b/docs/resources/external_function.md @@ -31,6 +31,9 @@ resource "snowflake_external_function" "test_ext_func" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/external_oauth_integration.md b/docs/resources/external_oauth_integration.md index fc253a218e..76205bd000 100644 --- a/docs/resources/external_oauth_integration.md +++ b/docs/resources/external_oauth_integration.md @@ -28,7 +28,7 @@ resource "snowflake_external_oauth_integration" "test" { comment = "comment" enabled = true external_oauth_allowed_roles_list = ["user1"] - external_oauth_any_role_mode = "ENABLED" + external_oauth_any_role_mode = "ENABLE" external_oauth_audience_list = ["https://example.com"] external_oauth_issuer = "issuer" external_oauth_jws_keys_url = ["https://example.com"] @@ -43,7 +43,7 @@ resource "snowflake_external_oauth_integration" "test" { resource "snowflake_external_oauth_integration" "test" { comment = "comment" enabled = true - external_oauth_any_role_mode = "ENABLED" + external_oauth_any_role_mode = "ENABLE" external_oauth_audience_list = ["https://example.com"] external_oauth_blocked_roles_list = ["user1"] external_oauth_issuer = "issuer" diff --git a/docs/resources/external_table.md b/docs/resources/external_table.md index 6568e55fdc..233468c49f 100644 --- a/docs/resources/external_table.md +++ b/docs/resources/external_table.md @@ -31,6 +31,9 @@ resource "snowflake_external_table" "external_table" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/failover_group.md b/docs/resources/failover_group.md index cc3baf344c..eb279163f6 100644 --- a/docs/resources/failover_group.md +++ b/docs/resources/failover_group.md @@ -48,6 +48,9 @@ resource "snowflake_failover_group" "target_failover_group" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/file_format.md b/docs/resources/file_format.md index b9ce90b978..fba47dabc5 100644 --- a/docs/resources/file_format.md +++ b/docs/resources/file_format.md @@ -20,6 +20,9 @@ resource "snowflake_file_format" "example_file_format" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/function.md b/docs/resources/function.md index 131d4c1fcc..56991e3553 100644 --- a/docs/resources/function.md +++ b/docs/resources/function.md @@ -87,6 +87,9 @@ resource "snowflake_function" "sql_test" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/grant_account_role.md b/docs/resources/grant_account_role.md index 57f6d4100c..5f462cec18 100644 --- a/docs/resources/grant_account_role.md +++ b/docs/resources/grant_account_role.md @@ -48,6 +48,9 @@ resource "snowflake_grant_account_role" "g" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/grant_application_role.md b/docs/resources/grant_application_role.md index 73066d2428..a9c529329f 100644 --- a/docs/resources/grant_application_role.md +++ b/docs/resources/grant_application_role.md @@ -40,6 +40,9 @@ resource "snowflake_grant_application_role" "g" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/grant_database_role.md b/docs/resources/grant_database_role.md index fb6d9c63de..c913416782 100644 --- a/docs/resources/grant_database_role.md +++ b/docs/resources/grant_database_role.md @@ -59,6 +59,9 @@ resource "snowflake_grant_database_role" "g" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/grant_ownership.md b/docs/resources/grant_ownership.md index 69c2a868e8..4dd448bf73 100644 --- a/docs/resources/grant_ownership.md +++ b/docs/resources/grant_ownership.md @@ -208,8 +208,6 @@ resource "snowflake_schema" "test" { } ``` --> **Note** If you don't manage database role in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - ## Granting ownership on pipes To transfer ownership of a pipe, there must be additional conditions met. Otherwise, additional manual work will be needed afterward or in some cases, the ownership won't be transferred (resulting in error). diff --git a/docs/resources/grant_privileges_to_account_role.md b/docs/resources/grant_privileges_to_account_role.md index b778faa5b8..97da6b5105 100644 --- a/docs/resources/grant_privileges_to_account_role.md +++ b/docs/resources/grant_privileges_to_account_role.md @@ -255,8 +255,6 @@ resource "snowflake_grant_privileges_to_account_role" "example" { ## ID: "\"role_name\"|false|false|SELECT,INSERT|OnSchemaObject|OnFuture|TABLES|InSchema|\"database\".\"my_schema\"" ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - ## Schema diff --git a/docs/resources/grant_privileges_to_database_role.md b/docs/resources/grant_privileges_to_database_role.md index d0efba7ee3..271388ecf4 100644 --- a/docs/resources/grant_privileges_to_database_role.md +++ b/docs/resources/grant_privileges_to_database_role.md @@ -173,8 +173,6 @@ resource "snowflake_grant_privileges_to_database_role" "example" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - ## Schema diff --git a/docs/resources/managed_account.md b/docs/resources/managed_account.md index cba3fc310e..74abf88c88 100644 --- a/docs/resources/managed_account.md +++ b/docs/resources/managed_account.md @@ -24,6 +24,9 @@ resource "snowflake_managed_account" "account" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/masking_policy.md b/docs/resources/masking_policy.md index 6f091a595b..c9a5c81e8e 100644 --- a/docs/resources/masking_policy.md +++ b/docs/resources/masking_policy.md @@ -37,6 +37,9 @@ resource "snowflake_masking_policy" "test" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/materialized_view.md b/docs/resources/materialized_view.md index 9579181efe..d933e1bcb5 100644 --- a/docs/resources/materialized_view.md +++ b/docs/resources/materialized_view.md @@ -28,6 +28,9 @@ SQL } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/network_policy_attachment.md b/docs/resources/network_policy_attachment.md index 1653d97cef..8799a614fa 100644 --- a/docs/resources/network_policy_attachment.md +++ b/docs/resources/network_policy_attachment.md @@ -19,6 +19,9 @@ resource "snowflake_network_policy_attachment" "attach" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/network_rule.md b/docs/resources/network_rule.md index 37dc348881..7be3a5cab1 100644 --- a/docs/resources/network_rule.md +++ b/docs/resources/network_rule.md @@ -23,6 +23,9 @@ resource "snowflake_network_rule" "rule" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/notification_integration.md b/docs/resources/notification_integration.md index 4c430d7929..8d17c243ea 100644 --- a/docs/resources/notification_integration.md +++ b/docs/resources/notification_integration.md @@ -37,6 +37,9 @@ resource "snowflake_notification_integration" "integration" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/oauth_integration.md b/docs/resources/oauth_integration.md index bda0f33d36..743b4b4409 100644 --- a/docs/resources/oauth_integration.md +++ b/docs/resources/oauth_integration.md @@ -22,6 +22,9 @@ resource "snowflake_oauth_integration" "tableau_desktop" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/object_parameter.md b/docs/resources/object_parameter.md index 4465b97224..4113561350 100644 --- a/docs/resources/object_parameter.md +++ b/docs/resources/object_parameter.md @@ -69,6 +69,9 @@ resource "snowflake_object_parameter" "o4" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/procedure.md b/docs/resources/procedure.md index 5f51b673a7..0dd260393b 100644 --- a/docs/resources/procedure.md +++ b/docs/resources/procedure.md @@ -48,6 +48,9 @@ EOT } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/resource_monitor.md b/docs/resources/resource_monitor.md index 2b55092b25..5a1a0e834e 100644 --- a/docs/resources/resource_monitor.md +++ b/docs/resources/resource_monitor.md @@ -28,6 +28,9 @@ resource "snowflake_resource_monitor" "monitor" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/role.md b/docs/resources/role.md index f30eb5ac9f..26b3b517b5 100644 --- a/docs/resources/role.md +++ b/docs/resources/role.md @@ -26,6 +26,9 @@ resource "snowflake_role" "complete" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/row_access_policy.md b/docs/resources/row_access_policy.md index 990c8102e4..a5b6065456 100644 --- a/docs/resources/row_access_policy.md +++ b/docs/resources/row_access_policy.md @@ -24,6 +24,9 @@ resource "snowflake_row_access_policy" "example_row_access_policy" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/saml_integration.md b/docs/resources/saml_integration.md index ccc5d494f7..761299cfc5 100644 --- a/docs/resources/saml_integration.md +++ b/docs/resources/saml_integration.md @@ -22,6 +22,9 @@ resource "snowflake_saml_integration" "saml_integration" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/sequence.md b/docs/resources/sequence.md index 4a2355686d..54b28bcc9a 100644 --- a/docs/resources/sequence.md +++ b/docs/resources/sequence.md @@ -28,6 +28,9 @@ resource "snowflake_sequence" "test_sequence" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/session_parameter.md b/docs/resources/session_parameter.md index 0c52a78570..a59f44b545 100644 --- a/docs/resources/session_parameter.md +++ b/docs/resources/session_parameter.md @@ -25,6 +25,9 @@ resource "snowflake_session_parameter" "s2" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/share.md b/docs/resources/share.md index 0d2ef8266e..c27958d67f 100644 --- a/docs/resources/share.md +++ b/docs/resources/share.md @@ -25,6 +25,9 @@ resource "snowflake_database" "example" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/stage.md b/docs/resources/stage.md index 314f729cc3..a43ef9638d 100644 --- a/docs/resources/stage.md +++ b/docs/resources/stage.md @@ -21,6 +21,9 @@ resource "snowflake_stage" "example_stage" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/storage_integration.md b/docs/resources/storage_integration.md index 5515599972..89a29b6c8f 100644 --- a/docs/resources/storage_integration.md +++ b/docs/resources/storage_integration.md @@ -32,6 +32,9 @@ resource "snowflake_storage_integration" "integration" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/stream.md b/docs/resources/stream.md index 23d22ea4f4..92066c1bfb 100644 --- a/docs/resources/stream.md +++ b/docs/resources/stream.md @@ -9,7 +9,6 @@ description: |- - ## Example Usage ```terraform @@ -39,7 +38,8 @@ resource "snowflake_stream" "stream" { } ``` --> **Note** If you don't manage table in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/table.md b/docs/resources/table.md index e59d76dcec..0d91c3454f 100644 --- a/docs/resources/table.md +++ b/docs/resources/table.md @@ -79,6 +79,9 @@ resource "snowflake_table" "table" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/table_column_masking_policy_application.md b/docs/resources/table_column_masking_policy_application.md index 0316ed72c9..dbeb682359 100644 --- a/docs/resources/table_column_masking_policy_application.md +++ b/docs/resources/table_column_masking_policy_application.md @@ -65,8 +65,6 @@ resource "snowflake_table_column_masking_policy_application" "application" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - ## Schema diff --git a/docs/resources/table_constraint.md b/docs/resources/table_constraint.md index 302b44908e..98cb24efe0 100644 --- a/docs/resources/table_constraint.md +++ b/docs/resources/table_constraint.md @@ -9,7 +9,6 @@ description: |- - ## Example Usage ```terraform @@ -98,7 +97,8 @@ resource "snowflake_table_constraint" "unique" { } ``` --> **Note** If you don't manage table in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/tag.md b/docs/resources/tag.md index 5d65eda1d3..ec52efe9fb 100644 --- a/docs/resources/tag.md +++ b/docs/resources/tag.md @@ -29,6 +29,9 @@ resource "snowflake_tag" "tag" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/tag_association.md b/docs/resources/tag_association.md index 3abe2e9066..1250959ef4 100644 --- a/docs/resources/tag_association.md +++ b/docs/resources/tag_association.md @@ -75,6 +75,9 @@ resource "snowflake_tag_association" "column_association" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/tag_masking_policy_association.md b/docs/resources/tag_masking_policy_association.md index a96d47a07c..bbb907ac74 100644 --- a/docs/resources/tag_masking_policy_association.md +++ b/docs/resources/tag_masking_policy_association.md @@ -9,7 +9,6 @@ description: |- Attach a masking policy to a tag. Requires a current warehouse to be set. Either with SNOWFLAKE_WAREHOUSE env variable or in current session. If no warehouse is provided, a temporary warehouse will be created. - ## Example Usage ```terraform @@ -60,6 +59,7 @@ resource "snowflake_tag_masking_policy_association" "name" { ``` -> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/task.md b/docs/resources/task.md index 497184d8b5..513460ba92 100644 --- a/docs/resources/task.md +++ b/docs/resources/task.md @@ -68,6 +68,9 @@ resource "snowflake_task" "test_task" { } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/docs/resources/user_password_policy_attachment.md b/docs/resources/user_password_policy_attachment.md index f4f8b0a835..0ba3867cdc 100644 --- a/docs/resources/user_password_policy_attachment.md +++ b/docs/resources/user_password_policy_attachment.md @@ -9,7 +9,6 @@ description: |- Specifies the password policy to use for a certain user. - ## Example Usage ```terraform @@ -28,7 +27,8 @@ resource "snowflake_user_password_policy_attachment" "ppa" { } ``` --> **Note** If you don't manage password policy in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + ## Schema diff --git a/docs/resources/view.md b/docs/resources/view.md index 5c665a0fd8..c72a1e0a9b 100644 --- a/docs/resources/view.md +++ b/docs/resources/view.md @@ -27,6 +27,9 @@ SQL } ``` +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + ## Schema diff --git a/examples/resources/snowflake_external_oauth_integration/resource.tf b/examples/resources/snowflake_external_oauth_integration/resource.tf index 1e99d38bf3..ef29249ace 100644 --- a/examples/resources/snowflake_external_oauth_integration/resource.tf +++ b/examples/resources/snowflake_external_oauth_integration/resource.tf @@ -12,7 +12,7 @@ resource "snowflake_external_oauth_integration" "test" { comment = "comment" enabled = true external_oauth_allowed_roles_list = ["user1"] - external_oauth_any_role_mode = "ENABLED" + external_oauth_any_role_mode = "ENABLE" external_oauth_audience_list = ["https://example.com"] external_oauth_issuer = "issuer" external_oauth_jws_keys_url = ["https://example.com"] @@ -27,7 +27,7 @@ resource "snowflake_external_oauth_integration" "test" { resource "snowflake_external_oauth_integration" "test" { comment = "comment" enabled = true - external_oauth_any_role_mode = "ENABLED" + external_oauth_any_role_mode = "ENABLE" external_oauth_audience_list = ["https://example.com"] external_oauth_blocked_roles_list = ["user1"] external_oauth_issuer = "issuer" diff --git a/pkg/resources/grant_database_role_acceptance_test.go b/pkg/resources/grant_database_role_acceptance_test.go index 6432fdfe5a..03889246b7 100644 --- a/pkg/resources/grant_database_role_acceptance_test.go +++ b/pkg/resources/grant_database_role_acceptance_test.go @@ -51,6 +51,46 @@ func TestAcc_GrantDatabaseRole_databaseRole(t *testing.T) { }) } +func TestAcc_GrantDatabaseRole_databaseRoleMixedQuoting(t *testing.T) { + databaseRoleName := acc.TestClient().Ids.Alpha() + parentDatabaseRoleName := acc.TestClient().Ids.Alpha() + resourceName := "snowflake_grant_database_role.g" + m := func() map[string]config.Variable { + return map[string]config.Variable{ + "database": config.StringVariable(acc.TestDatabaseName), + "database_role_name": config.StringVariable(databaseRoleName), + "parent_database_role_name": config.StringVariable(parentDatabaseRoleName), + } + } + resource.Test(t, resource.TestCase{ + ProtoV6ProviderFactories: acc.TestAccProtoV6ProviderFactories, + PreCheck: func() { acc.TestAccPreCheck(t) }, + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.RequireAbove(tfversion.Version1_5_0), + }, + CheckDestroy: acc.CheckGrantDatabaseRoleDestroy(t), + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TestAcc_GrantDatabaseRole/database_role"), + ConfigVariables: m(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "database_role_name", fmt.Sprintf(`"%v"."%v"`, acc.TestDatabaseName, databaseRoleName)), + resource.TestCheckResourceAttr(resourceName, "parent_database_role_name", fmt.Sprintf(`"%v"."%v"`, acc.TestDatabaseName, parentDatabaseRoleName)), + resource.TestCheckResourceAttr(resourceName, "id", fmt.Sprintf(`"%v"."%v"|DATABASE ROLE|"%v"."%v"`, acc.TestDatabaseName, databaseRoleName, acc.TestDatabaseName, parentDatabaseRoleName)), + ), + }, + // test import + { + ConfigDirectory: config.StaticDirectory("testdata/TestAcc_GrantDatabaseRole/database_role"), + ConfigVariables: m(), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAcc_GrantDatabaseRole_issue2402(t *testing.T) { databaseName := acc.TestClient().Ids.Alpha() databaseRoleName := acc.TestClient().Ids.Alpha() diff --git a/pkg/sdk/grants_impl.go b/pkg/sdk/grants_impl.go index 29f3cea60d..e68f7e5101 100644 --- a/pkg/sdk/grants_impl.go +++ b/pkg/sdk/grants_impl.go @@ -274,7 +274,11 @@ func (v *grants) Show(ctx context.Context, opts *ShowGrantOptions) ([]Grant, err } } else { if grant.GrantedTo != ObjectTypeRole && grant.GrantedTo != ObjectTypeShare { - resultList[i].GranteeName = NewDatabaseObjectIdentifierFromFullyQualifiedName(grant.GranteeName.FullyQualifiedName()) + id, err := ParseDatabaseObjectIdentifier(grant.GranteeName.FullyQualifiedName()) + if err != nil { + return nil, err + } + resultList[i].GranteeName = id } } } diff --git a/templates/guides/identifiers.md.tmpl b/templates/guides/identifiers.md.tmpl index cbbdf8598a..94def58363 100644 --- a/templates/guides/identifiers.md.tmpl +++ b/templates/guides/identifiers.md.tmpl @@ -8,7 +8,7 @@ description: |- ## New computed fully qualified name field in resources -With the combination of quotes, old parsing methods, and other factors, it was a struggle to specify the fully qualified name of an object needed (e.g. [#2164](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2164), [#2754](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2754)). Now, with v0.95.0, every resource that represents an object in Snowflake (e.g. user, role), and not an association (e.g. grants) will have a new computed field named `fully_qualified_name`. With the new computed field, it will be much easier to use resources requiring fully qualified names, for examples of usage head over to the [documentation for granting privileges to account role](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_account_role). +With the combination of quotes, old parsing methods, and other factors, it was a struggle to specify the fully qualified name of an object needed (e.g. [#2164](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2164), [#2754](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2754)). Starting from version v0.95.0, every resource that represents an object in Snowflake (e.g. user, role), and not an association (e.g. grants) will have a new computed field named `fully_qualified_name`. With the new computed field, it will be much easier to use resources requiring fully qualified names, for examples of usage head over to the [documentation for granting privileges to account role](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_account_role). For example, instead of writing @@ -18,6 +18,8 @@ now we can write ```object_name = snowflake_table.fully_qualified_name``` -If you don't manage table in Terraform, you can construct the proper id yourself like before: `"\"database_name\".\"schema_name\".\"table_name\""` +This is our recommended way of referencing other objects. However, if you don't manage table in Terraform, you can construct the proper id yourself like before: `"\"database_name\".\"schema_name\".\"table_name\""` Note that quotes are necessary for correct parsing of an identifier. + +This change was announced in v0.95.0 [migration guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#new-fully_qualified_name-field-in-the-resources). diff --git a/templates/resources.md.tmpl b/templates/resources.md.tmpl index 946a3b7ae3..1cdea47831 100644 --- a/templates/resources.md.tmpl +++ b/templates/resources.md.tmpl @@ -17,6 +17,10 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} + +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/account_password_policy_attachment.md.tmpl b/templates/resources/account_password_policy_attachment.md.tmpl deleted file mode 100644 index 92a2ff63dd..0000000000 --- a/templates/resources/account_password_policy_attachment.md.tmpl +++ /dev/null @@ -1,32 +0,0 @@ ---- -page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" -subcategory: "" -description: |- -{{ if gt (len (split .Description "")) 1 -}} -{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} -{{- else -}} -{{ .Description | plainmarkdown | trimspace | prefixlines " " }} -{{- end }} ---- - -# {{.Name}} ({{.Type}}) - -{{ .Description | trimspace }} - - -## Example Usage - -{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} - --> **Note** If you don't manage password policy in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - -{{ .SchemaMarkdown | trimspace }} - -{{- if .HasImport }} - -## Import - -Import is supported using the following syntax: - -{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} -{{- end }} diff --git a/templates/resources/grant_ownership.md.tmpl b/templates/resources/grant_ownership.md.tmpl index 67d738ef29..13c31d562a 100644 --- a/templates/resources/grant_ownership.md.tmpl +++ b/templates/resources/grant_ownership.md.tmpl @@ -22,8 +22,6 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} - --> **Note** If you don't manage database role in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) {{- end }} ## Granting ownership on pipes diff --git a/templates/resources/grant_privileges_to_account_role.md.tmpl b/templates/resources/grant_privileges_to_account_role.md.tmpl index e3f1248e97..ceb22643b2 100644 --- a/templates/resources/grant_privileges_to_account_role.md.tmpl +++ b/templates/resources/grant_privileges_to_account_role.md.tmpl @@ -23,8 +23,6 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} - --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/grant_privileges_to_database_role.md.tmpl b/templates/resources/grant_privileges_to_database_role.md.tmpl index 8376f6ff42..1980f5c3ea 100644 --- a/templates/resources/grant_privileges_to_database_role.md.tmpl +++ b/templates/resources/grant_privileges_to_database_role.md.tmpl @@ -21,8 +21,6 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} - --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/stream.md.tmpl b/templates/resources/stream.md.tmpl deleted file mode 100644 index aefea3474d..0000000000 --- a/templates/resources/stream.md.tmpl +++ /dev/null @@ -1,32 +0,0 @@ ---- -page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" -subcategory: "" -description: |- -{{ if gt (len (split .Description "")) 1 -}} -{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} -{{- else -}} -{{ .Description | plainmarkdown | trimspace | prefixlines " " }} -{{- end }} ---- - -# {{.Name}} ({{.Type}}) - -{{ .Description | trimspace }} - - -## Example Usage - -{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} - --> **Note** If you don't manage table in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - -{{ .SchemaMarkdown | trimspace }} - -{{- if .HasImport }} - -## Import - -Import is supported using the following syntax: - -{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} -{{- end }} diff --git a/templates/resources/table_column_masking_policy_application.md.tmpl b/templates/resources/table_column_masking_policy_application.md.tmpl index 70f5e274c7..c4f5f7271f 100644 --- a/templates/resources/table_column_masking_policy_application.md.tmpl +++ b/templates/resources/table_column_masking_policy_application.md.tmpl @@ -22,6 +22,4 @@ When using this resource to manage a table column's masking policy make sure to {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/table_constraint.md.tmpl b/templates/resources/table_constraint.md.tmpl deleted file mode 100644 index aefea3474d..0000000000 --- a/templates/resources/table_constraint.md.tmpl +++ /dev/null @@ -1,32 +0,0 @@ ---- -page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" -subcategory: "" -description: |- -{{ if gt (len (split .Description "")) 1 -}} -{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} -{{- else -}} -{{ .Description | plainmarkdown | trimspace | prefixlines " " }} -{{- end }} ---- - -# {{.Name}} ({{.Type}}) - -{{ .Description | trimspace }} - - -## Example Usage - -{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} - --> **Note** If you don't manage table in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - -{{ .SchemaMarkdown | trimspace }} - -{{- if .HasImport }} - -## Import - -Import is supported using the following syntax: - -{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} -{{- end }} diff --git a/templates/resources/tag_masking_policy_association.md.tmpl b/templates/resources/tag_masking_policy_association.md.tmpl deleted file mode 100644 index 024f13413b..0000000000 --- a/templates/resources/tag_masking_policy_association.md.tmpl +++ /dev/null @@ -1,32 +0,0 @@ ---- -page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" -subcategory: "" -description: |- -{{ if gt (len (split .Description "")) 1 -}} -{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} -{{- else -}} -{{ .Description | plainmarkdown | trimspace | prefixlines " " }} -{{- end }} ---- - -# {{.Name}} ({{.Type}}) - -{{ .Description | trimspace }} - - -## Example Usage - -{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} - --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - -{{ .SchemaMarkdown | trimspace }} - -{{- if .HasImport }} - -## Import - -Import is supported using the following syntax: - -{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} -{{- end }} diff --git a/templates/resources/user_password_policy_attachment.md.tmpl b/templates/resources/user_password_policy_attachment.md.tmpl deleted file mode 100644 index 92a2ff63dd..0000000000 --- a/templates/resources/user_password_policy_attachment.md.tmpl +++ /dev/null @@ -1,32 +0,0 @@ ---- -page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" -subcategory: "" -description: |- -{{ if gt (len (split .Description "")) 1 -}} -{{ index (split .Description "") 1 | plainmarkdown | trimspace | prefixlines " " }} -{{- else -}} -{{ .Description | plainmarkdown | trimspace | prefixlines " " }} -{{- end }} ---- - -# {{.Name}} ({{.Type}}) - -{{ .Description | trimspace }} - - -## Example Usage - -{{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} - --> **Note** If you don't manage password policy in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) - -{{ .SchemaMarkdown | trimspace }} - -{{- if .HasImport }} - -## Import - -Import is supported using the following syntax: - -{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}} -{{- end }} From d2df50e66af82ce8f3fc218da3c456a8b58de862 Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Wed, 21 Aug 2024 14:20:17 +0200 Subject: [PATCH 4/7] Revert new test --- .../grant_database_role_acceptance_test.go | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/pkg/resources/grant_database_role_acceptance_test.go b/pkg/resources/grant_database_role_acceptance_test.go index 03889246b7..6432fdfe5a 100644 --- a/pkg/resources/grant_database_role_acceptance_test.go +++ b/pkg/resources/grant_database_role_acceptance_test.go @@ -51,46 +51,6 @@ func TestAcc_GrantDatabaseRole_databaseRole(t *testing.T) { }) } -func TestAcc_GrantDatabaseRole_databaseRoleMixedQuoting(t *testing.T) { - databaseRoleName := acc.TestClient().Ids.Alpha() - parentDatabaseRoleName := acc.TestClient().Ids.Alpha() - resourceName := "snowflake_grant_database_role.g" - m := func() map[string]config.Variable { - return map[string]config.Variable{ - "database": config.StringVariable(acc.TestDatabaseName), - "database_role_name": config.StringVariable(databaseRoleName), - "parent_database_role_name": config.StringVariable(parentDatabaseRoleName), - } - } - resource.Test(t, resource.TestCase{ - ProtoV6ProviderFactories: acc.TestAccProtoV6ProviderFactories, - PreCheck: func() { acc.TestAccPreCheck(t) }, - TerraformVersionChecks: []tfversion.TerraformVersionCheck{ - tfversion.RequireAbove(tfversion.Version1_5_0), - }, - CheckDestroy: acc.CheckGrantDatabaseRoleDestroy(t), - Steps: []resource.TestStep{ - { - ConfigDirectory: config.StaticDirectory("testdata/TestAcc_GrantDatabaseRole/database_role"), - ConfigVariables: m(), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resourceName, "database_role_name", fmt.Sprintf(`"%v"."%v"`, acc.TestDatabaseName, databaseRoleName)), - resource.TestCheckResourceAttr(resourceName, "parent_database_role_name", fmt.Sprintf(`"%v"."%v"`, acc.TestDatabaseName, parentDatabaseRoleName)), - resource.TestCheckResourceAttr(resourceName, "id", fmt.Sprintf(`"%v"."%v"|DATABASE ROLE|"%v"."%v"`, acc.TestDatabaseName, databaseRoleName, acc.TestDatabaseName, parentDatabaseRoleName)), - ), - }, - // test import - { - ConfigDirectory: config.StaticDirectory("testdata/TestAcc_GrantDatabaseRole/database_role"), - ConfigVariables: m(), - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - func TestAcc_GrantDatabaseRole_issue2402(t *testing.T) { databaseName := acc.TestClient().Ids.Alpha() databaseRoleName := acc.TestClient().Ids.Alpha() From 6a679af16cb6db4b1475629784436bfdb46253cf Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Wed, 21 Aug 2024 15:43:02 +0200 Subject: [PATCH 5/7] Fix mixed quotes --- .../grant_database_role_acceptance_test.go | 41 +++++++++++++++++++ pkg/sdk/grants.go | 17 ++++---- pkg/sdk/grants_impl.go | 21 +++++----- 3 files changed, 60 insertions(+), 19 deletions(-) diff --git a/pkg/resources/grant_database_role_acceptance_test.go b/pkg/resources/grant_database_role_acceptance_test.go index 6432fdfe5a..e5a39be6b2 100644 --- a/pkg/resources/grant_database_role_acceptance_test.go +++ b/pkg/resources/grant_database_role_acceptance_test.go @@ -2,6 +2,7 @@ package resources_test import ( "fmt" + "strings" "testing" acc "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance" @@ -51,6 +52,46 @@ func TestAcc_GrantDatabaseRole_databaseRole(t *testing.T) { }) } +func TestAcc_GrantDatabaseRole_databaseRoleMixedQuoting(t *testing.T) { + databaseRoleName := acc.TestClient().Ids.Alpha() + parentDatabaseRoleName := strings.ToUpper(acc.TestClient().Ids.Alpha()) + resourceName := "snowflake_grant_database_role.g" + m := func() map[string]config.Variable { + return map[string]config.Variable{ + "database": config.StringVariable(acc.TestDatabaseName), + "database_role_name": config.StringVariable(databaseRoleName), + "parent_database_role_name": config.StringVariable(parentDatabaseRoleName), + } + } + resource.Test(t, resource.TestCase{ + ProtoV6ProviderFactories: acc.TestAccProtoV6ProviderFactories, + PreCheck: func() { acc.TestAccPreCheck(t) }, + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.RequireAbove(tfversion.Version1_5_0), + }, + CheckDestroy: acc.CheckGrantDatabaseRoleDestroy(t), + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TestAcc_GrantDatabaseRole/database_role"), + ConfigVariables: m(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "database_role_name", fmt.Sprintf(`"%v"."%v"`, acc.TestDatabaseName, databaseRoleName)), + resource.TestCheckResourceAttr(resourceName, "parent_database_role_name", fmt.Sprintf(`"%v"."%v"`, acc.TestDatabaseName, parentDatabaseRoleName)), + resource.TestCheckResourceAttr(resourceName, "id", fmt.Sprintf(`"%v"."%v"|DATABASE ROLE|"%v"."%v"`, acc.TestDatabaseName, databaseRoleName, acc.TestDatabaseName, parentDatabaseRoleName)), + ), + }, + // test import + { + ConfigDirectory: config.StaticDirectory("testdata/TestAcc_GrantDatabaseRole/database_role"), + ConfigVariables: m(), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAcc_GrantDatabaseRole_issue2402(t *testing.T) { databaseName := acc.TestClient().Ids.Alpha() databaseRoleName := acc.TestClient().Ids.Alpha() diff --git a/pkg/sdk/grants.go b/pkg/sdk/grants.go index e9199028f2..5660ecc4ab 100644 --- a/pkg/sdk/grants.go +++ b/pkg/sdk/grants.go @@ -229,7 +229,6 @@ func (v *Grant) ID() ObjectIdentifier { func (row grantRow) convert() *Grant { grantedTo := ObjectType(strings.ReplaceAll(row.GrantedTo, "_", " ")) grantTo := ObjectType(strings.ReplaceAll(row.GrantTo, "_", " ")) - granteeName := NewAccountObjectIdentifier(row.GranteeName) var grantedOn ObjectType // true for current grants if row.GrantedOn != "" { @@ -262,14 +261,14 @@ func (row grantRow) convert() *Grant { } return &Grant{ - CreatedOn: row.CreatedOn, - Privilege: row.Privilege, - GrantedOn: grantedOn, - GrantOn: grantOn, - GrantedTo: grantedTo, - GrantTo: grantTo, - Name: name, - GranteeName: granteeName, + CreatedOn: row.CreatedOn, + Privilege: row.Privilege, + GrantedOn: grantedOn, + GrantOn: grantOn, + GrantedTo: grantedTo, + GrantTo: grantTo, + Name: name, + // GranteeName is computed in Show operation. Its format is depending on the grant request options. GrantOption: row.GrantOption, GrantedBy: NewAccountObjectIdentifier(row.GrantedBy), } diff --git a/pkg/sdk/grants_impl.go b/pkg/sdk/grants_impl.go index e68f7e5101..68addd6e52 100644 --- a/pkg/sdk/grants_impl.go +++ b/pkg/sdk/grants_impl.go @@ -266,20 +266,21 @@ func (v *grants) Show(ctx context.Context, opts *ShowGrantOptions) ([]Grant, err // SHOW GRANTS of DATABASE ROLE requires a special handling: // - it returns no account name, so for other SHOW GRANTS types it needs to be skipped // - it returns fully qualified name for database objects + granteeNameRaw := dbRows[i].GranteeName if !(valueSet(opts.Of) && valueSet(opts.Of.DatabaseRole)) { + granteeName := granteeNameRaw if grant.GrantedTo == ObjectTypeShare { - oldId := grant.GranteeName.Name() - skipAccount := oldId[strings.IndexRune(oldId, '.')+1:] - resultList[i].GranteeName = NewAccountObjectIdentifier(skipAccount) + granteeName = granteeName[strings.IndexRune(granteeName, '.')+1:] } - } else { - if grant.GrantedTo != ObjectTypeRole && grant.GrantedTo != ObjectTypeShare { - id, err := ParseDatabaseObjectIdentifier(grant.GranteeName.FullyQualifiedName()) - if err != nil { - return nil, err - } - resultList[i].GranteeName = id + resultList[i].GranteeName = NewAccountObjectIdentifier(granteeName) + } else if !slices.Contains([]ObjectType{ObjectTypeRole, ObjectTypeShare}, grant.GrantedTo) { + id, err := ParseDatabaseObjectIdentifier(granteeNameRaw) + if err != nil { + return nil, err } + resultList[i].GranteeName = id + } else { + resultList[i].GranteeName = NewAccountObjectIdentifier(granteeNameRaw) } } logging.DebugLogger.Printf("[DEBUG] Show grants: rows converted") From 2a9c3f72f8dfaf90796acad35cfcfc4c9536f89d Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Wed, 21 Aug 2024 15:47:39 +0200 Subject: [PATCH 6/7] Fix docs --- docs/resources/account_parameter.md | 2 +- docs/resources/account_password_policy_attachment.md | 2 +- docs/resources/alert.md | 2 +- docs/resources/api_integration.md | 2 +- docs/resources/database_old.md | 2 +- docs/resources/database_role.md | 2 +- docs/resources/dynamic_table.md | 2 +- docs/resources/email_notification_integration.md | 2 +- docs/resources/external_function.md | 2 +- docs/resources/external_table.md | 2 +- docs/resources/failover_group.md | 2 +- docs/resources/file_format.md | 2 +- docs/resources/function.md | 2 +- docs/resources/grant_account_role.md | 2 +- docs/resources/grant_application_role.md | 2 +- docs/resources/grant_database_role.md | 2 +- docs/resources/managed_account.md | 2 +- docs/resources/masking_policy.md | 2 +- docs/resources/materialized_view.md | 2 +- docs/resources/network_policy_attachment.md | 2 +- docs/resources/network_rule.md | 2 +- docs/resources/notification_integration.md | 2 +- docs/resources/oauth_integration.md | 2 +- docs/resources/object_parameter.md | 2 +- docs/resources/procedure.md | 2 +- docs/resources/resource_monitor.md | 2 +- docs/resources/role.md | 2 +- docs/resources/row_access_policy.md | 2 +- docs/resources/saml_integration.md | 2 +- docs/resources/sequence.md | 2 +- docs/resources/session_parameter.md | 2 +- docs/resources/share.md | 2 +- docs/resources/stage.md | 2 +- docs/resources/storage_integration.md | 2 +- docs/resources/stream.md | 2 +- docs/resources/table.md | 2 +- docs/resources/table_constraint.md | 2 +- docs/resources/tag.md | 2 +- docs/resources/tag_association.md | 2 +- docs/resources/tag_masking_policy_association.md | 2 +- docs/resources/task.md | 2 +- docs/resources/user_password_policy_attachment.md | 2 +- docs/resources/view.md | 2 +- pkg/sdk/grants_impl.go | 2 +- templates/resources.md.tmpl | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/docs/resources/account_parameter.md b/docs/resources/account_parameter.md index db224615e9..07ce29c9f0 100644 --- a/docs/resources/account_parameter.md +++ b/docs/resources/account_parameter.md @@ -23,7 +23,7 @@ resource "snowflake_account_parameter" "p2" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/account_password_policy_attachment.md b/docs/resources/account_password_policy_attachment.md index 5eec025284..98f12ceb49 100644 --- a/docs/resources/account_password_policy_attachment.md +++ b/docs/resources/account_password_policy_attachment.md @@ -23,7 +23,7 @@ resource "snowflake_account_password_policy_attachment" "attachment" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/alert.md b/docs/resources/alert.md index bcce771616..d5e5294660 100644 --- a/docs/resources/alert.md +++ b/docs/resources/alert.md @@ -27,7 +27,7 @@ resource "snowflake_alert" "alert" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/api_integration.md b/docs/resources/api_integration.md index 46c09aa4b3..12f81873db 100644 --- a/docs/resources/api_integration.md +++ b/docs/resources/api_integration.md @@ -38,7 +38,7 @@ resource "snowflake_api_integration" "gcp" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/database_old.md b/docs/resources/database_old.md index 73d1f79b27..9e2f93f8f3 100644 --- a/docs/resources/database_old.md +++ b/docs/resources/database_old.md @@ -44,7 +44,7 @@ resource "snowflake_database_old" "from_share" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/database_role.md b/docs/resources/database_role.md index 0b8c0008c5..caf17ccca1 100644 --- a/docs/resources/database_role.md +++ b/docs/resources/database_role.md @@ -19,7 +19,7 @@ resource "snowflake_database_role" "db_role" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/dynamic_table.md b/docs/resources/dynamic_table.md index 687c90a8f2..d7b0b773f2 100644 --- a/docs/resources/dynamic_table.md +++ b/docs/resources/dynamic_table.md @@ -26,7 +26,7 @@ resource "snowflake_dynamic_table" "dt" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/email_notification_integration.md b/docs/resources/email_notification_integration.md index 4b6e8df40c..d9185e2558 100644 --- a/docs/resources/email_notification_integration.md +++ b/docs/resources/email_notification_integration.md @@ -21,7 +21,7 @@ resource "snowflake_email_notification_integration" "email_int" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/external_function.md b/docs/resources/external_function.md index 544eb2faa4..797a4d1695 100644 --- a/docs/resources/external_function.md +++ b/docs/resources/external_function.md @@ -31,7 +31,7 @@ resource "snowflake_external_function" "test_ext_func" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/external_table.md b/docs/resources/external_table.md index 233468c49f..4734474ba0 100644 --- a/docs/resources/external_table.md +++ b/docs/resources/external_table.md @@ -31,7 +31,7 @@ resource "snowflake_external_table" "external_table" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/failover_group.md b/docs/resources/failover_group.md index eb279163f6..1c577fd1ce 100644 --- a/docs/resources/failover_group.md +++ b/docs/resources/failover_group.md @@ -48,7 +48,7 @@ resource "snowflake_failover_group" "target_failover_group" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/file_format.md b/docs/resources/file_format.md index fba47dabc5..23e7f1f306 100644 --- a/docs/resources/file_format.md +++ b/docs/resources/file_format.md @@ -20,7 +20,7 @@ resource "snowflake_file_format" "example_file_format" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/function.md b/docs/resources/function.md index 56991e3553..1f4836f64f 100644 --- a/docs/resources/function.md +++ b/docs/resources/function.md @@ -87,7 +87,7 @@ resource "snowflake_function" "sql_test" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/grant_account_role.md b/docs/resources/grant_account_role.md index 5f462cec18..a7c843d4e1 100644 --- a/docs/resources/grant_account_role.md +++ b/docs/resources/grant_account_role.md @@ -48,7 +48,7 @@ resource "snowflake_grant_account_role" "g" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/grant_application_role.md b/docs/resources/grant_application_role.md index a9c529329f..ec2f22607f 100644 --- a/docs/resources/grant_application_role.md +++ b/docs/resources/grant_application_role.md @@ -40,7 +40,7 @@ resource "snowflake_grant_application_role" "g" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/grant_database_role.md b/docs/resources/grant_database_role.md index c913416782..5dd84e6f0c 100644 --- a/docs/resources/grant_database_role.md +++ b/docs/resources/grant_database_role.md @@ -59,7 +59,7 @@ resource "snowflake_grant_database_role" "g" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/managed_account.md b/docs/resources/managed_account.md index 74abf88c88..fd5321e41e 100644 --- a/docs/resources/managed_account.md +++ b/docs/resources/managed_account.md @@ -24,7 +24,7 @@ resource "snowflake_managed_account" "account" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/masking_policy.md b/docs/resources/masking_policy.md index c9a5c81e8e..354b0d0981 100644 --- a/docs/resources/masking_policy.md +++ b/docs/resources/masking_policy.md @@ -37,7 +37,7 @@ resource "snowflake_masking_policy" "test" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/materialized_view.md b/docs/resources/materialized_view.md index d933e1bcb5..999e0fb1b7 100644 --- a/docs/resources/materialized_view.md +++ b/docs/resources/materialized_view.md @@ -28,7 +28,7 @@ SQL } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/network_policy_attachment.md b/docs/resources/network_policy_attachment.md index 8799a614fa..dc9488f88d 100644 --- a/docs/resources/network_policy_attachment.md +++ b/docs/resources/network_policy_attachment.md @@ -19,7 +19,7 @@ resource "snowflake_network_policy_attachment" "attach" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/network_rule.md b/docs/resources/network_rule.md index 7be3a5cab1..20a56df9ee 100644 --- a/docs/resources/network_rule.md +++ b/docs/resources/network_rule.md @@ -23,7 +23,7 @@ resource "snowflake_network_rule" "rule" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/notification_integration.md b/docs/resources/notification_integration.md index 8d17c243ea..5297a0b9cb 100644 --- a/docs/resources/notification_integration.md +++ b/docs/resources/notification_integration.md @@ -37,7 +37,7 @@ resource "snowflake_notification_integration" "integration" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/oauth_integration.md b/docs/resources/oauth_integration.md index 743b4b4409..25451af1df 100644 --- a/docs/resources/oauth_integration.md +++ b/docs/resources/oauth_integration.md @@ -22,7 +22,7 @@ resource "snowflake_oauth_integration" "tableau_desktop" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/object_parameter.md b/docs/resources/object_parameter.md index 4113561350..60a4512cac 100644 --- a/docs/resources/object_parameter.md +++ b/docs/resources/object_parameter.md @@ -69,7 +69,7 @@ resource "snowflake_object_parameter" "o4" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/procedure.md b/docs/resources/procedure.md index 0dd260393b..677863e916 100644 --- a/docs/resources/procedure.md +++ b/docs/resources/procedure.md @@ -48,7 +48,7 @@ EOT } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/resource_monitor.md b/docs/resources/resource_monitor.md index 5a1a0e834e..3973ad6cd7 100644 --- a/docs/resources/resource_monitor.md +++ b/docs/resources/resource_monitor.md @@ -28,7 +28,7 @@ resource "snowflake_resource_monitor" "monitor" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/role.md b/docs/resources/role.md index 26b3b517b5..4e3af84776 100644 --- a/docs/resources/role.md +++ b/docs/resources/role.md @@ -26,7 +26,7 @@ resource "snowflake_role" "complete" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/row_access_policy.md b/docs/resources/row_access_policy.md index a5b6065456..df082f9e4f 100644 --- a/docs/resources/row_access_policy.md +++ b/docs/resources/row_access_policy.md @@ -24,7 +24,7 @@ resource "snowflake_row_access_policy" "example_row_access_policy" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/saml_integration.md b/docs/resources/saml_integration.md index 761299cfc5..4bcf964fd8 100644 --- a/docs/resources/saml_integration.md +++ b/docs/resources/saml_integration.md @@ -22,7 +22,7 @@ resource "snowflake_saml_integration" "saml_integration" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/sequence.md b/docs/resources/sequence.md index 54b28bcc9a..7c6efb3543 100644 --- a/docs/resources/sequence.md +++ b/docs/resources/sequence.md @@ -28,7 +28,7 @@ resource "snowflake_sequence" "test_sequence" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/session_parameter.md b/docs/resources/session_parameter.md index a59f44b545..f0a87c20ce 100644 --- a/docs/resources/session_parameter.md +++ b/docs/resources/session_parameter.md @@ -25,7 +25,7 @@ resource "snowflake_session_parameter" "s2" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/share.md b/docs/resources/share.md index c27958d67f..66a51613b7 100644 --- a/docs/resources/share.md +++ b/docs/resources/share.md @@ -25,7 +25,7 @@ resource "snowflake_database" "example" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/stage.md b/docs/resources/stage.md index a43ef9638d..7c4a7d497d 100644 --- a/docs/resources/stage.md +++ b/docs/resources/stage.md @@ -21,7 +21,7 @@ resource "snowflake_stage" "example_stage" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/storage_integration.md b/docs/resources/storage_integration.md index 89a29b6c8f..9a20f0cd17 100644 --- a/docs/resources/storage_integration.md +++ b/docs/resources/storage_integration.md @@ -32,7 +32,7 @@ resource "snowflake_storage_integration" "integration" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/stream.md b/docs/resources/stream.md index 92066c1bfb..fb319934a0 100644 --- a/docs/resources/stream.md +++ b/docs/resources/stream.md @@ -38,7 +38,7 @@ resource "snowflake_stream" "stream" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/table.md b/docs/resources/table.md index 0d91c3454f..ad9498a3aa 100644 --- a/docs/resources/table.md +++ b/docs/resources/table.md @@ -79,7 +79,7 @@ resource "snowflake_table" "table" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/table_constraint.md b/docs/resources/table_constraint.md index 98cb24efe0..f91e3a1766 100644 --- a/docs/resources/table_constraint.md +++ b/docs/resources/table_constraint.md @@ -97,7 +97,7 @@ resource "snowflake_table_constraint" "unique" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/tag.md b/docs/resources/tag.md index ec52efe9fb..13c9a96fdd 100644 --- a/docs/resources/tag.md +++ b/docs/resources/tag.md @@ -29,7 +29,7 @@ resource "snowflake_tag" "tag" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/tag_association.md b/docs/resources/tag_association.md index 1250959ef4..730e0e9a13 100644 --- a/docs/resources/tag_association.md +++ b/docs/resources/tag_association.md @@ -75,7 +75,7 @@ resource "snowflake_tag_association" "column_association" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/tag_masking_policy_association.md b/docs/resources/tag_masking_policy_association.md index bbb907ac74..5bfda38029 100644 --- a/docs/resources/tag_masking_policy_association.md +++ b/docs/resources/tag_masking_policy_association.md @@ -58,7 +58,7 @@ resource "snowflake_tag_masking_policy_association" "name" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/task.md b/docs/resources/task.md index 513460ba92..0b1ab90937 100644 --- a/docs/resources/task.md +++ b/docs/resources/task.md @@ -68,7 +68,7 @@ resource "snowflake_task" "test_task" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/user_password_policy_attachment.md b/docs/resources/user_password_policy_attachment.md index 0ba3867cdc..a1e817d43e 100644 --- a/docs/resources/user_password_policy_attachment.md +++ b/docs/resources/user_password_policy_attachment.md @@ -27,7 +27,7 @@ resource "snowflake_user_password_policy_attachment" "ppa" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/docs/resources/view.md b/docs/resources/view.md index c72a1e0a9b..1e9870067e 100644 --- a/docs/resources/view.md +++ b/docs/resources/view.md @@ -27,7 +27,7 @@ SQL } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) diff --git a/pkg/sdk/grants_impl.go b/pkg/sdk/grants_impl.go index 68addd6e52..39293055c1 100644 --- a/pkg/sdk/grants_impl.go +++ b/pkg/sdk/grants_impl.go @@ -267,7 +267,7 @@ func (v *grants) Show(ctx context.Context, opts *ShowGrantOptions) ([]Grant, err // - it returns no account name, so for other SHOW GRANTS types it needs to be skipped // - it returns fully qualified name for database objects granteeNameRaw := dbRows[i].GranteeName - if !(valueSet(opts.Of) && valueSet(opts.Of.DatabaseRole)) { + if !(valueSet(opts.Of) && valueSet(opts.Of.DatabaseRole)) { //nolint:gocritic granteeName := granteeNameRaw if grant.GrantedTo == ObjectTypeShare { granteeName = granteeName[strings.IndexRune(granteeName, '.')+1:] diff --git a/templates/resources.md.tmpl b/templates/resources.md.tmpl index 1cdea47831..b61fd6161e 100644 --- a/templates/resources.md.tmpl +++ b/templates/resources.md.tmpl @@ -18,7 +18,7 @@ description: |- {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](../guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) {{- end }} From 42c32716b20cc1b53ab2b90bbd0691a5618bcdc6 Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Thu, 22 Aug 2024 14:27:57 +0200 Subject: [PATCH 7/7] Apply the note to all resources --- docs/resources/account.md | 2 ++ docs/resources/account_parameter.md | 2 +- docs/resources/account_password_policy_attachment.md | 2 +- docs/resources/account_role.md | 2 ++ docs/resources/alert.md | 2 +- ...authentication_integration_with_authorization_code_grant.md | 2 ++ .../api_authentication_integration_with_client_credentials.md | 2 ++ .../api_authentication_integration_with_jwt_bearer.md | 2 ++ docs/resources/api_integration.md | 2 +- docs/resources/cortex_search_service.md | 2 ++ docs/resources/database.md | 2 ++ docs/resources/database_old.md | 2 +- docs/resources/database_role.md | 2 +- docs/resources/dynamic_table.md | 2 +- docs/resources/email_notification_integration.md | 2 +- docs/resources/external_function.md | 2 +- docs/resources/external_oauth_integration.md | 2 ++ docs/resources/external_table.md | 2 +- docs/resources/failover_group.md | 2 +- docs/resources/file_format.md | 2 +- docs/resources/function.md | 2 +- docs/resources/grant_account_role.md | 2 +- docs/resources/grant_application_role.md | 2 +- docs/resources/grant_database_role.md | 2 +- docs/resources/grant_ownership.md | 2 ++ docs/resources/grant_privileges_to_account_role.md | 2 ++ docs/resources/grant_privileges_to_database_role.md | 2 ++ docs/resources/grant_privileges_to_share.md | 2 ++ docs/resources/managed_account.md | 2 +- docs/resources/masking_policy.md | 2 +- docs/resources/materialized_view.md | 2 +- docs/resources/network_policy.md | 2 ++ docs/resources/network_policy_attachment.md | 2 +- docs/resources/network_rule.md | 2 +- docs/resources/notification_integration.md | 2 +- docs/resources/oauth_integration.md | 2 +- docs/resources/oauth_integration_for_custom_clients.md | 2 ++ docs/resources/oauth_integration_for_partner_applications.md | 2 ++ docs/resources/object_parameter.md | 2 +- docs/resources/pipe.md | 2 ++ docs/resources/procedure.md | 2 +- docs/resources/resource_monitor.md | 2 +- docs/resources/role.md | 2 +- docs/resources/row_access_policy.md | 2 +- docs/resources/saml2_integration.md | 2 ++ docs/resources/saml_integration.md | 2 +- docs/resources/schema.md | 2 ++ docs/resources/scim_integration.md | 2 ++ docs/resources/secondary_database.md | 2 ++ docs/resources/sequence.md | 2 +- docs/resources/session_parameter.md | 2 +- docs/resources/share.md | 2 +- docs/resources/shared_database.md | 2 ++ docs/resources/stage.md | 2 +- docs/resources/storage_integration.md | 2 +- docs/resources/stream.md | 2 +- docs/resources/streamlit.md | 2 ++ docs/resources/table.md | 2 +- docs/resources/table_column_masking_policy_application.md | 3 +++ docs/resources/table_constraint.md | 2 +- docs/resources/tag.md | 2 +- docs/resources/tag_association.md | 2 +- docs/resources/tag_masking_policy_association.md | 2 +- docs/resources/task.md | 2 +- docs/resources/unsafe_execute.md | 2 ++ docs/resources/user.md | 2 ++ docs/resources/user_password_policy_attachment.md | 2 +- docs/resources/view.md | 2 +- docs/resources/warehouse.md | 2 ++ templates/resources.md.tmpl | 2 +- templates/resources/account.md.tmpl | 2 ++ templates/resources/account_role.md.tmpl | 3 +++ ...ntication_integration_with_authorization_code_grant.md.tmpl | 3 +++ ..._authentication_integration_with_client_credentials.md.tmpl | 3 +++ .../api_authentication_integration_with_jwt_bearer.md.tmpl | 3 +++ templates/resources/cortex_search_service.md.tmpl | 3 +++ templates/resources/database.md.tmpl | 3 +++ templates/resources/external_oauth_integration.md.tmpl | 3 +++ templates/resources/grant_ownership.md.tmpl | 3 +++ templates/resources/grant_privileges_to_account_role.md.tmpl | 3 +++ templates/resources/grant_privileges_to_database_role.md.tmpl | 3 +++ templates/resources/grant_privileges_to_share.md.tmpl | 3 +++ templates/resources/network_policy.md.tmpl | 3 +++ .../resources/oauth_integration_for_custom_clients.md.tmpl | 3 +++ .../oauth_integration_for_partner_applications.md.tmpl | 3 +++ templates/resources/pipe.md.tmpl | 3 +++ templates/resources/saml2_integration.md.tmpl | 3 +++ templates/resources/schema.md.tmpl | 3 +++ templates/resources/scim_integration.md.tmpl | 3 +++ templates/resources/secondary_database.md.tmpl | 3 +++ templates/resources/shared_database.md.tmpl | 3 +++ templates/resources/streamlit.md.tmpl | 3 +++ .../resources/table_column_masking_policy_application.md.tmpl | 3 +++ templates/resources/unsafe_execute.md.tmpl | 3 +++ templates/resources/user.md.tmpl | 3 +++ templates/resources/warehouse.md.tmpl | 3 +++ 96 files changed, 174 insertions(+), 44 deletions(-) diff --git a/docs/resources/account.md b/docs/resources/account.md index add9d60485..4d3a8fea48 100644 --- a/docs/resources/account.md +++ b/docs/resources/account.md @@ -35,6 +35,8 @@ resource "snowflake_account" "ac1" { region = "AWS_US_WEST_2" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/account_parameter.md b/docs/resources/account_parameter.md index 07ce29c9f0..4607f52742 100644 --- a/docs/resources/account_parameter.md +++ b/docs/resources/account_parameter.md @@ -23,7 +23,7 @@ resource "snowflake_account_parameter" "p2" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/account_password_policy_attachment.md b/docs/resources/account_password_policy_attachment.md index 98f12ceb49..f6c7487e90 100644 --- a/docs/resources/account_password_policy_attachment.md +++ b/docs/resources/account_password_policy_attachment.md @@ -23,7 +23,7 @@ resource "snowflake_account_password_policy_attachment" "attachment" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/account_role.md b/docs/resources/account_role.md index 1be71bb81f..fccc6781b3 100644 --- a/docs/resources/account_role.md +++ b/docs/resources/account_role.md @@ -25,6 +25,8 @@ resource "snowflake_account_role" "complete" { comment = "my account role" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/alert.md b/docs/resources/alert.md index d5e5294660..371627ce5c 100644 --- a/docs/resources/alert.md +++ b/docs/resources/alert.md @@ -27,7 +27,7 @@ resource "snowflake_alert" "alert" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/api_authentication_integration_with_authorization_code_grant.md b/docs/resources/api_authentication_integration_with_authorization_code_grant.md index 76613bf024..66b97d42bf 100644 --- a/docs/resources/api_authentication_integration_with_authorization_code_grant.md +++ b/docs/resources/api_authentication_integration_with_authorization_code_grant.md @@ -36,6 +36,8 @@ resource "snowflake_api_authentication_integration_with_authorization_code_grant oauth_token_endpoint = "https://example.com" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/api_authentication_integration_with_client_credentials.md b/docs/resources/api_authentication_integration_with_client_credentials.md index 9adeb93da8..0be7ff9b3c 100644 --- a/docs/resources/api_authentication_integration_with_client_credentials.md +++ b/docs/resources/api_authentication_integration_with_client_credentials.md @@ -34,6 +34,8 @@ resource "snowflake_api_authentication_integration_with_client_credentials" "tes oauth_token_endpoint = "https://example.com" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/api_authentication_integration_with_jwt_bearer.md b/docs/resources/api_authentication_integration_with_jwt_bearer.md index a804a4d54b..194b37d0c8 100644 --- a/docs/resources/api_authentication_integration_with_jwt_bearer.md +++ b/docs/resources/api_authentication_integration_with_jwt_bearer.md @@ -37,6 +37,8 @@ resource "snowflake_api_authentication_integration_with_jwt_bearer" "test" { oauth_assertion_issuer = "issuer" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/api_integration.md b/docs/resources/api_integration.md index 12f81873db..8af2950c86 100644 --- a/docs/resources/api_integration.md +++ b/docs/resources/api_integration.md @@ -38,7 +38,7 @@ resource "snowflake_api_integration" "gcp" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/cortex_search_service.md b/docs/resources/cortex_search_service.md index 8754a72794..0d93abbd52 100644 --- a/docs/resources/cortex_search_service.md +++ b/docs/resources/cortex_search_service.md @@ -53,6 +53,8 @@ resource "snowflake_cortex_search_service" "test" { comment = "some comment" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/database.md b/docs/resources/database.md index fce5a16456..a5b3202b09 100644 --- a/docs/resources/database.md +++ b/docs/resources/database.md @@ -76,6 +76,8 @@ resource "snowflake_database" "primary" { } } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/database_old.md b/docs/resources/database_old.md index 9e2f93f8f3..a0ee5bb8c1 100644 --- a/docs/resources/database_old.md +++ b/docs/resources/database_old.md @@ -44,7 +44,7 @@ resource "snowflake_database_old" "from_share" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/database_role.md b/docs/resources/database_role.md index caf17ccca1..6d6dd85817 100644 --- a/docs/resources/database_role.md +++ b/docs/resources/database_role.md @@ -19,7 +19,7 @@ resource "snowflake_database_role" "db_role" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/dynamic_table.md b/docs/resources/dynamic_table.md index d7b0b773f2..76d7071078 100644 --- a/docs/resources/dynamic_table.md +++ b/docs/resources/dynamic_table.md @@ -26,7 +26,7 @@ resource "snowflake_dynamic_table" "dt" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/email_notification_integration.md b/docs/resources/email_notification_integration.md index d9185e2558..edc8483e44 100644 --- a/docs/resources/email_notification_integration.md +++ b/docs/resources/email_notification_integration.md @@ -21,7 +21,7 @@ resource "snowflake_email_notification_integration" "email_int" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/external_function.md b/docs/resources/external_function.md index 797a4d1695..cbc68ef06c 100644 --- a/docs/resources/external_function.md +++ b/docs/resources/external_function.md @@ -31,7 +31,7 @@ resource "snowflake_external_function" "test_ext_func" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/external_oauth_integration.md b/docs/resources/external_oauth_integration.md index 76205bd000..076dcab088 100644 --- a/docs/resources/external_oauth_integration.md +++ b/docs/resources/external_oauth_integration.md @@ -57,6 +57,8 @@ resource "snowflake_external_oauth_integration" "test" { external_oauth_type = "CUSTOM" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/external_table.md b/docs/resources/external_table.md index 4734474ba0..6a8125635b 100644 --- a/docs/resources/external_table.md +++ b/docs/resources/external_table.md @@ -31,7 +31,7 @@ resource "snowflake_external_table" "external_table" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/failover_group.md b/docs/resources/failover_group.md index 1c577fd1ce..99ec5c08c2 100644 --- a/docs/resources/failover_group.md +++ b/docs/resources/failover_group.md @@ -48,7 +48,7 @@ resource "snowflake_failover_group" "target_failover_group" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/file_format.md b/docs/resources/file_format.md index 23e7f1f306..31b301f477 100644 --- a/docs/resources/file_format.md +++ b/docs/resources/file_format.md @@ -20,7 +20,7 @@ resource "snowflake_file_format" "example_file_format" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/function.md b/docs/resources/function.md index 1f4836f64f..f3a3290542 100644 --- a/docs/resources/function.md +++ b/docs/resources/function.md @@ -87,7 +87,7 @@ resource "snowflake_function" "sql_test" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/grant_account_role.md b/docs/resources/grant_account_role.md index a7c843d4e1..4916faa964 100644 --- a/docs/resources/grant_account_role.md +++ b/docs/resources/grant_account_role.md @@ -48,7 +48,7 @@ resource "snowflake_grant_account_role" "g" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/grant_application_role.md b/docs/resources/grant_application_role.md index ec2f22607f..7787f033f5 100644 --- a/docs/resources/grant_application_role.md +++ b/docs/resources/grant_application_role.md @@ -40,7 +40,7 @@ resource "snowflake_grant_application_role" "g" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/grant_database_role.md b/docs/resources/grant_database_role.md index 5dd84e6f0c..176fcc70e7 100644 --- a/docs/resources/grant_database_role.md +++ b/docs/resources/grant_database_role.md @@ -59,7 +59,7 @@ resource "snowflake_grant_database_role" "g" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/grant_ownership.md b/docs/resources/grant_ownership.md index 4dd448bf73..e9ac0afa06 100644 --- a/docs/resources/grant_ownership.md +++ b/docs/resources/grant_ownership.md @@ -207,6 +207,8 @@ resource "snowflake_schema" "test" { name = "schema" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Granting ownership on pipes To transfer ownership of a pipe, there must be additional conditions met. Otherwise, additional manual work diff --git a/docs/resources/grant_privileges_to_account_role.md b/docs/resources/grant_privileges_to_account_role.md index 97da6b5105..3ed5f058f1 100644 --- a/docs/resources/grant_privileges_to_account_role.md +++ b/docs/resources/grant_privileges_to_account_role.md @@ -254,6 +254,8 @@ resource "snowflake_grant_privileges_to_account_role" "example" { ## ID: "\"role_name\"|false|false|SELECT,INSERT|OnSchemaObject|OnFuture|TABLES|InSchema|\"database\".\"my_schema\"" ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/grant_privileges_to_database_role.md b/docs/resources/grant_privileges_to_database_role.md index 271388ecf4..acf4a0caa9 100644 --- a/docs/resources/grant_privileges_to_database_role.md +++ b/docs/resources/grant_privileges_to_database_role.md @@ -172,6 +172,8 @@ resource "snowflake_grant_privileges_to_database_role" "example" { } } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/grant_privileges_to_share.md b/docs/resources/grant_privileges_to_share.md index 10a66027cb..89c64c7289 100644 --- a/docs/resources/grant_privileges_to_share.md +++ b/docs/resources/grant_privileges_to_share.md @@ -95,6 +95,8 @@ resource "snowflake_grant_privileges_to_share" "example" { ## ID: "\"share_name\"|SELECT|OnView|\"database_name\".\"schema_name\".\"view_name\"" ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/managed_account.md b/docs/resources/managed_account.md index fd5321e41e..48a8cd5010 100644 --- a/docs/resources/managed_account.md +++ b/docs/resources/managed_account.md @@ -24,7 +24,7 @@ resource "snowflake_managed_account" "account" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/masking_policy.md b/docs/resources/masking_policy.md index 354b0d0981..da7b771f76 100644 --- a/docs/resources/masking_policy.md +++ b/docs/resources/masking_policy.md @@ -37,7 +37,7 @@ resource "snowflake_masking_policy" "test" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/materialized_view.md b/docs/resources/materialized_view.md index 999e0fb1b7..4ca0ec89af 100644 --- a/docs/resources/materialized_view.md +++ b/docs/resources/materialized_view.md @@ -28,7 +28,7 @@ SQL } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/network_policy.md b/docs/resources/network_policy.md index db80cda3b9..917eb7e80f 100644 --- a/docs/resources/network_policy.md +++ b/docs/resources/network_policy.md @@ -29,6 +29,8 @@ resource "snowflake_network_policy" "basic" { comment = "my network policy" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/network_policy_attachment.md b/docs/resources/network_policy_attachment.md index dc9488f88d..72e3294276 100644 --- a/docs/resources/network_policy_attachment.md +++ b/docs/resources/network_policy_attachment.md @@ -19,7 +19,7 @@ resource "snowflake_network_policy_attachment" "attach" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/network_rule.md b/docs/resources/network_rule.md index 20a56df9ee..a9a723dd4e 100644 --- a/docs/resources/network_rule.md +++ b/docs/resources/network_rule.md @@ -23,7 +23,7 @@ resource "snowflake_network_rule" "rule" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/notification_integration.md b/docs/resources/notification_integration.md index 5297a0b9cb..101e23faff 100644 --- a/docs/resources/notification_integration.md +++ b/docs/resources/notification_integration.md @@ -37,7 +37,7 @@ resource "snowflake_notification_integration" "integration" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/oauth_integration.md b/docs/resources/oauth_integration.md index 25451af1df..2038424c66 100644 --- a/docs/resources/oauth_integration.md +++ b/docs/resources/oauth_integration.md @@ -22,7 +22,7 @@ resource "snowflake_oauth_integration" "tableau_desktop" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/oauth_integration_for_custom_clients.md b/docs/resources/oauth_integration_for_custom_clients.md index 8c9f1f7c68..1903adffa3 100644 --- a/docs/resources/oauth_integration_for_custom_clients.md +++ b/docs/resources/oauth_integration_for_custom_clients.md @@ -41,6 +41,8 @@ resource "snowflake_oauth_integration_for_custom_clients" "complete" { comment = "my oauth integration" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/oauth_integration_for_partner_applications.md b/docs/resources/oauth_integration_for_partner_applications.md index 2e0c1505b6..e8180af06b 100644 --- a/docs/resources/oauth_integration_for_partner_applications.md +++ b/docs/resources/oauth_integration_for_partner_applications.md @@ -34,6 +34,8 @@ resource "snowflake_oauth_integration_for_partner_applications" "test" { comment = "example oauth integration for partner applications" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/object_parameter.md b/docs/resources/object_parameter.md index 60a4512cac..00d49016bd 100644 --- a/docs/resources/object_parameter.md +++ b/docs/resources/object_parameter.md @@ -69,7 +69,7 @@ resource "snowflake_object_parameter" "o4" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/pipe.md b/docs/resources/pipe.md index 59f92f287a..3f99772140 100644 --- a/docs/resources/pipe.md +++ b/docs/resources/pipe.md @@ -29,6 +29,8 @@ resource "snowflake_pipe" "pipe" { notification_channel = "..." } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/procedure.md b/docs/resources/procedure.md index 677863e916..d8135b31b0 100644 --- a/docs/resources/procedure.md +++ b/docs/resources/procedure.md @@ -48,7 +48,7 @@ EOT } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/resource_monitor.md b/docs/resources/resource_monitor.md index 3973ad6cd7..386af79058 100644 --- a/docs/resources/resource_monitor.md +++ b/docs/resources/resource_monitor.md @@ -28,7 +28,7 @@ resource "snowflake_resource_monitor" "monitor" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/role.md b/docs/resources/role.md index 4e3af84776..df1ef5bf86 100644 --- a/docs/resources/role.md +++ b/docs/resources/role.md @@ -26,7 +26,7 @@ resource "snowflake_role" "complete" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/row_access_policy.md b/docs/resources/row_access_policy.md index df082f9e4f..f7339bd879 100644 --- a/docs/resources/row_access_policy.md +++ b/docs/resources/row_access_policy.md @@ -24,7 +24,7 @@ resource "snowflake_row_access_policy" "example_row_access_policy" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/saml2_integration.md b/docs/resources/saml2_integration.md index 38ebcacab8..2aa188bc9a 100644 --- a/docs/resources/saml2_integration.md +++ b/docs/resources/saml2_integration.md @@ -45,6 +45,8 @@ resource "snowflake_saml2_integration" "test" { saml2_x509_cert = file("cert.pem") } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/saml_integration.md b/docs/resources/saml_integration.md index 4bcf964fd8..9ec4415251 100644 --- a/docs/resources/saml_integration.md +++ b/docs/resources/saml_integration.md @@ -22,7 +22,7 @@ resource "snowflake_saml_integration" "saml_integration" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/schema.md b/docs/resources/schema.md index a200753683..f299bd95dd 100644 --- a/docs/resources/schema.md +++ b/docs/resources/schema.md @@ -48,6 +48,8 @@ resource "snowflake_schema" "schema" { } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/scim_integration.md b/docs/resources/scim_integration.md index ad939a7790..fdeabe3180 100644 --- a/docs/resources/scim_integration.md +++ b/docs/resources/scim_integration.md @@ -32,6 +32,8 @@ resource "snowflake_scim_integration" "test" { comment = "foo" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/secondary_database.md b/docs/resources/secondary_database.md index 64cd5cabbf..b5c2b865cf 100644 --- a/docs/resources/secondary_database.md +++ b/docs/resources/secondary_database.md @@ -84,6 +84,8 @@ resource "snowflake_task" "refresh_secondary_database" { sql_statement = "ALTER DATABASE ${snowflake_secondary_database.test.name} REFRESH" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/sequence.md b/docs/resources/sequence.md index 7c6efb3543..2bd83f402a 100644 --- a/docs/resources/sequence.md +++ b/docs/resources/sequence.md @@ -28,7 +28,7 @@ resource "snowflake_sequence" "test_sequence" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/session_parameter.md b/docs/resources/session_parameter.md index f0a87c20ce..7f41515856 100644 --- a/docs/resources/session_parameter.md +++ b/docs/resources/session_parameter.md @@ -25,7 +25,7 @@ resource "snowflake_session_parameter" "s2" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/share.md b/docs/resources/share.md index 66a51613b7..d02b3d767f 100644 --- a/docs/resources/share.md +++ b/docs/resources/share.md @@ -25,7 +25,7 @@ resource "snowflake_database" "example" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/shared_database.md b/docs/resources/shared_database.md index 591563ac72..3daced23a2 100644 --- a/docs/resources/shared_database.md +++ b/docs/resources/shared_database.md @@ -69,6 +69,8 @@ resource "snowflake_shared_database" "test" { enable_console_output = false } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/stage.md b/docs/resources/stage.md index 7c4a7d497d..152c7a63cf 100644 --- a/docs/resources/stage.md +++ b/docs/resources/stage.md @@ -21,7 +21,7 @@ resource "snowflake_stage" "example_stage" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/storage_integration.md b/docs/resources/storage_integration.md index 9a20f0cd17..2905735bf2 100644 --- a/docs/resources/storage_integration.md +++ b/docs/resources/storage_integration.md @@ -32,7 +32,7 @@ resource "snowflake_storage_integration" "integration" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/stream.md b/docs/resources/stream.md index fb319934a0..b1077bf6ff 100644 --- a/docs/resources/stream.md +++ b/docs/resources/stream.md @@ -38,7 +38,7 @@ resource "snowflake_stream" "stream" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/streamlit.md b/docs/resources/streamlit.md index fdaaee37a7..a1df31e0df 100644 --- a/docs/resources/streamlit.md +++ b/docs/resources/streamlit.md @@ -36,6 +36,8 @@ resource "snowflake_streamlit" "streamlit" { comment = "comment" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/table.md b/docs/resources/table.md index ad9498a3aa..59cd1ddd68 100644 --- a/docs/resources/table.md +++ b/docs/resources/table.md @@ -79,7 +79,7 @@ resource "snowflake_table" "table" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/table_column_masking_policy_application.md b/docs/resources/table_column_masking_policy_application.md index dbeb682359..defa59c2eb 100644 --- a/docs/resources/table_column_masking_policy_application.md +++ b/docs/resources/table_column_masking_policy_application.md @@ -64,6 +64,9 @@ resource "snowflake_table_column_masking_policy_application" "application" { masking_policy = snowflake_masking_policy.policy.fully_qualified_name } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + ## Schema diff --git a/docs/resources/table_constraint.md b/docs/resources/table_constraint.md index f91e3a1766..c6334476f8 100644 --- a/docs/resources/table_constraint.md +++ b/docs/resources/table_constraint.md @@ -97,7 +97,7 @@ resource "snowflake_table_constraint" "unique" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/tag.md b/docs/resources/tag.md index 13c9a96fdd..b2352e260c 100644 --- a/docs/resources/tag.md +++ b/docs/resources/tag.md @@ -29,7 +29,7 @@ resource "snowflake_tag" "tag" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/tag_association.md b/docs/resources/tag_association.md index 730e0e9a13..ea03d48bdd 100644 --- a/docs/resources/tag_association.md +++ b/docs/resources/tag_association.md @@ -75,7 +75,7 @@ resource "snowflake_tag_association" "column_association" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/tag_masking_policy_association.md b/docs/resources/tag_masking_policy_association.md index 5bfda38029..1b183e31f9 100644 --- a/docs/resources/tag_masking_policy_association.md +++ b/docs/resources/tag_masking_policy_association.md @@ -58,7 +58,7 @@ resource "snowflake_tag_masking_policy_association" "name" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/task.md b/docs/resources/task.md index 0b1ab90937..8dd8acb62a 100644 --- a/docs/resources/task.md +++ b/docs/resources/task.md @@ -68,7 +68,7 @@ resource "snowflake_task" "test_task" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/unsafe_execute.md b/docs/resources/unsafe_execute.md index f279627099..358daaa521 100644 --- a/docs/resources/unsafe_execute.md +++ b/docs/resources/unsafe_execute.md @@ -126,6 +126,8 @@ resource "snowflake_unsafe_execute" "test" { query = "SHOW DATABASES LIKE '%ABC%'" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/user.md b/docs/resources/user.md index 3d2082a05f..639f61deed 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -35,6 +35,8 @@ resource "snowflake_user" "user" { must_change_password = false } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/docs/resources/user_password_policy_attachment.md b/docs/resources/user_password_policy_attachment.md index a1e817d43e..a0c59d0386 100644 --- a/docs/resources/user_password_policy_attachment.md +++ b/docs/resources/user_password_policy_attachment.md @@ -27,7 +27,7 @@ resource "snowflake_user_password_policy_attachment" "ppa" { } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/view.md b/docs/resources/view.md index 1e9870067e..7358c37189 100644 --- a/docs/resources/view.md +++ b/docs/resources/view.md @@ -27,7 +27,7 @@ SQL } ``` --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). diff --git a/docs/resources/warehouse.md b/docs/resources/warehouse.md index f4a9b55a8e..385f6a57d3 100644 --- a/docs/resources/warehouse.md +++ b/docs/resources/warehouse.md @@ -20,6 +20,8 @@ resource "snowflake_warehouse" "warehouse" { warehouse_size = "small" } ``` +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + ## Schema diff --git a/templates/resources.md.tmpl b/templates/resources.md.tmpl index b61fd6161e..624644cf17 100644 --- a/templates/resources.md.tmpl +++ b/templates/resources.md.tmpl @@ -18,7 +18,7 @@ description: |- {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} --> **Note** If you don't manage referenced objects in Terraform, you can construct the proper id yourself, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources) +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). {{- end }} diff --git a/templates/resources/account.md.tmpl b/templates/resources/account.md.tmpl index d3dc5b877e..973e844784 100644 --- a/templates/resources/account.md.tmpl +++ b/templates/resources/account.md.tmpl @@ -20,6 +20,8 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/account_role.md.tmpl b/templates/resources/account_role.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/account_role.md.tmpl +++ b/templates/resources/account_role.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/api_authentication_integration_with_authorization_code_grant.md.tmpl b/templates/resources/api_authentication_integration_with_authorization_code_grant.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/api_authentication_integration_with_authorization_code_grant.md.tmpl +++ b/templates/resources/api_authentication_integration_with_authorization_code_grant.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/api_authentication_integration_with_client_credentials.md.tmpl b/templates/resources/api_authentication_integration_with_client_credentials.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/api_authentication_integration_with_client_credentials.md.tmpl +++ b/templates/resources/api_authentication_integration_with_client_credentials.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/api_authentication_integration_with_jwt_bearer.md.tmpl b/templates/resources/api_authentication_integration_with_jwt_bearer.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/api_authentication_integration_with_jwt_bearer.md.tmpl +++ b/templates/resources/api_authentication_integration_with_jwt_bearer.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/cortex_search_service.md.tmpl b/templates/resources/cortex_search_service.md.tmpl index 8b9756b84f..1affd212b3 100644 --- a/templates/resources/cortex_search_service.md.tmpl +++ b/templates/resources/cortex_search_service.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/database.md.tmpl b/templates/resources/database.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/database.md.tmpl +++ b/templates/resources/database.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/external_oauth_integration.md.tmpl b/templates/resources/external_oauth_integration.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/external_oauth_integration.md.tmpl +++ b/templates/resources/external_oauth_integration.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/grant_ownership.md.tmpl b/templates/resources/grant_ownership.md.tmpl index 13c31d562a..9689e950d4 100644 --- a/templates/resources/grant_ownership.md.tmpl +++ b/templates/resources/grant_ownership.md.tmpl @@ -22,6 +22,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} ## Granting ownership on pipes diff --git a/templates/resources/grant_privileges_to_account_role.md.tmpl b/templates/resources/grant_privileges_to_account_role.md.tmpl index ceb22643b2..b84b50553e 100644 --- a/templates/resources/grant_privileges_to_account_role.md.tmpl +++ b/templates/resources/grant_privileges_to_account_role.md.tmpl @@ -23,6 +23,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/grant_privileges_to_database_role.md.tmpl b/templates/resources/grant_privileges_to_database_role.md.tmpl index 1980f5c3ea..e32a92b19f 100644 --- a/templates/resources/grant_privileges_to_database_role.md.tmpl +++ b/templates/resources/grant_privileges_to_database_role.md.tmpl @@ -21,6 +21,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/grant_privileges_to_share.md.tmpl b/templates/resources/grant_privileges_to_share.md.tmpl index d47f0a4ef9..3ac9e57792 100644 --- a/templates/resources/grant_privileges_to_share.md.tmpl +++ b/templates/resources/grant_privileges_to_share.md.tmpl @@ -18,6 +18,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/network_policy.md.tmpl b/templates/resources/network_policy.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/network_policy.md.tmpl +++ b/templates/resources/network_policy.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/oauth_integration_for_custom_clients.md.tmpl b/templates/resources/oauth_integration_for_custom_clients.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/oauth_integration_for_custom_clients.md.tmpl +++ b/templates/resources/oauth_integration_for_custom_clients.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/oauth_integration_for_partner_applications.md.tmpl b/templates/resources/oauth_integration_for_partner_applications.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/oauth_integration_for_partner_applications.md.tmpl +++ b/templates/resources/oauth_integration_for_partner_applications.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/pipe.md.tmpl b/templates/resources/pipe.md.tmpl index a945853e25..5e9497b9e9 100644 --- a/templates/resources/pipe.md.tmpl +++ b/templates/resources/pipe.md.tmpl @@ -20,6 +20,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/saml2_integration.md.tmpl b/templates/resources/saml2_integration.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/saml2_integration.md.tmpl +++ b/templates/resources/saml2_integration.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/schema.md.tmpl b/templates/resources/schema.md.tmpl index 536ca2d3e6..d1045d341c 100644 --- a/templates/resources/schema.md.tmpl +++ b/templates/resources/schema.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/scim_integration.md.tmpl b/templates/resources/scim_integration.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/scim_integration.md.tmpl +++ b/templates/resources/scim_integration.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/secondary_database.md.tmpl b/templates/resources/secondary_database.md.tmpl index cd1c7f9eeb..35c607137b 100644 --- a/templates/resources/secondary_database.md.tmpl +++ b/templates/resources/secondary_database.md.tmpl @@ -22,6 +22,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/shared_database.md.tmpl b/templates/resources/shared_database.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/shared_database.md.tmpl +++ b/templates/resources/shared_database.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/streamlit.md.tmpl b/templates/resources/streamlit.md.tmpl index 536ca2d3e6..d1045d341c 100644 --- a/templates/resources/streamlit.md.tmpl +++ b/templates/resources/streamlit.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/table_column_masking_policy_application.md.tmpl b/templates/resources/table_column_masking_policy_application.md.tmpl index c4f5f7271f..7bcd71b743 100644 --- a/templates/resources/table_column_masking_policy_application.md.tmpl +++ b/templates/resources/table_column_masking_policy_application.md.tmpl @@ -21,5 +21,8 @@ When using this resource to manage a table column's masking policy make sure to ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/unsafe_execute.md.tmpl b/templates/resources/unsafe_execute.md.tmpl index f318628a0d..da7c2970a9 100644 --- a/templates/resources/unsafe_execute.md.tmpl +++ b/templates/resources/unsafe_execute.md.tmpl @@ -26,6 +26,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/user.md.tmpl b/templates/resources/user.md.tmpl index 9d371d4b57..e3e231663e 100644 --- a/templates/resources/user.md.tmpl +++ b/templates/resources/user.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/warehouse.md.tmpl b/templates/resources/warehouse.md.tmpl index e7f66bbf91..28e2af568d 100644 --- a/templates/resources/warehouse.md.tmpl +++ b/templates/resources/warehouse.md.tmpl @@ -19,6 +19,9 @@ description: |- ## Example Usage {{ tffile (printf "examples/resources/%s/resource.tf" .Name)}} +-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources). + + {{- end }} {{ .SchemaMarkdown | trimspace }}