Skip to content

Commit

Permalink
chore: Update user docs (#3416)
Browse files Browse the repository at this point in the history
References: #3404
  • Loading branch information
sfc-gh-asawicki authored Feb 25, 2025
1 parent b8c127d commit 9d5224f
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/resources/legacy_service_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: |-
Resource used to manage legacy service user objects. For more information, check user documentation https://docs.snowflake.com/en/sql-reference/commands-user-role#user-management.
---

!> **Caution** Use `network_policy` attribute instead of the [`snowflake_network_policy_attachment`](./network_policy_attachment) resource. `snowflake_network_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** `snowflake_user_password_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** Attaching user policies will be handled in the following versions of the provider which may still affect this resource.
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/network_policy_attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

!> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the [provider configuration](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs#schema). Please always refer to the [Getting Help](https://github.com/Snowflake-Labs/terraform-provider-snowflake?tab=readme-ov-file#getting-help) section in our Github repo to best determine how to get help for your questions.

!> **Important** Starting from v0.95.0, it is advised to use this resource **only** if users are not managed through terraform. Check more in the [migration guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#breaking-change-snowflake_network_policy_attachment-usage-with-snowflake_user).

# snowflake_network_policy_attachment (Resource)


Expand Down
2 changes: 2 additions & 0 deletions docs/resources/service_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: |-
Resource used to manage service user objects. For more information, check user documentation https://docs.snowflake.com/en/sql-reference/commands-user-role#user-management.
---

!> **Caution** Use `network_policy` attribute instead of the [`snowflake_network_policy_attachment`](./network_policy_attachment) resource. `snowflake_network_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** `snowflake_user_password_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** Attaching user policies will be handled in the following versions of the provider which may still affect this resource.
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: |-
Resource used to manage user objects. For more information, check user documentation https://docs.snowflake.com/en/sql-reference/commands-user-role#user-management.
---

!> **Caution** Use `network_policy` attribute instead of the [`snowflake_network_policy_attachment`](./network_policy_attachment) resource. `snowflake_network_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** `snowflake_user_password_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** Attaching user policies will be handled in the following versions of the provider which may still affect this resource.
Expand Down
2 changes: 2 additions & 0 deletions templates/resources/legacy_service_user.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ description: |-
{{- end }}
---

!> **Caution** Use `network_policy` attribute instead of the [`snowflake_network_policy_attachment`](./network_policy_attachment) resource. `snowflake_network_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** `snowflake_user_password_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** Attaching user policies will be handled in the following versions of the provider which may still affect this resource.
Expand Down
38 changes: 38 additions & 0 deletions templates/resources/network_policy_attachment.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: "Preview"
description: |-
{{ if gt (len (split .Description "<deprecation>")) 1 -}}
{{ index (split .Description "<deprecation>") 1 | plainmarkdown | trimspace | prefixlines " " }}
{{- else -}}
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
{{- end }}
---

!> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the [provider configuration](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs#schema). Please always refer to the [Getting Help](https://github.com/Snowflake-Labs/terraform-provider-snowflake?tab=readme-ov-file#getting-help) section in our Github repo to best determine how to get help for your questions.

!> **Important** Starting from v0.95.0, it is advised to use this resource **only** if users are not managed through terraform. Check more in the [migration guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#breaking-change-snowflake_network_policy_attachment-usage-with-snowflake_user).

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

{{ if .HasExample -}}
## Example Usage

{{ tffile .ExampleFile }}

-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](../guides/identifiers_rework_design_decisions#new-computed-fully-qualified-name-field-in-resources).
<!-- TODO(SNOW-1634854): include an example showing both methods-->

{{- end }}

{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}}
{{- end }}
2 changes: 2 additions & 0 deletions templates/resources/service_user.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ description: |-
{{- end }}
---

!> **Caution** Use `network_policy` attribute instead of the [`snowflake_network_policy_attachment`](./network_policy_attachment) resource. `snowflake_network_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** `snowflake_user_password_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** Attaching user policies will be handled in the following versions of the provider which may still affect this resource.
Expand Down
2 changes: 2 additions & 0 deletions templates/resources/user.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ description: |-
{{- end }}
---

!> **Caution** Use `network_policy` attribute instead of the [`snowflake_network_policy_attachment`](./network_policy_attachment) resource. `snowflake_network_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** `snowflake_user_password_policy_attachment` will be reworked in the following versions of the provider which may still affect this resource.

-> **Note** Attaching user policies will be handled in the following versions of the provider which may still affect this resource.
Expand Down

0 comments on commit 9d5224f

Please sign in to comment.