From 2b950212ec6c59e908d2b6aa54458cf3dbf6104f Mon Sep 17 00:00:00 2001 From: Jakub Michalak Date: Wed, 29 Jan 2025 15:17:41 +0100 Subject: [PATCH] Fix file names --- .../user_authentication_policy_attachment | 46 ---------------- .../user_authentication_policy_attachment.md | 2 + .../resources/user_password_policy_attachment | 55 ------------------- .../user_password_policy_attachment.md | 2 + ..._authentication_policy_attachment.md.tmpl} | 0 ...> user_password_policy_attachment.md.tmpl} | 0 6 files changed, 4 insertions(+), 101 deletions(-) delete mode 100644 docs/resources/user_authentication_policy_attachment delete mode 100644 docs/resources/user_password_policy_attachment rename templates/resources/{user_authentication_policy_attachment.tmpl => user_authentication_policy_attachment.md.tmpl} (100%) rename templates/resources/{user_password_policy_attachment.tmpl => user_password_policy_attachment.md.tmpl} (100%) diff --git a/docs/resources/user_authentication_policy_attachment b/docs/resources/user_authentication_policy_attachment deleted file mode 100644 index 8571a91710..0000000000 --- a/docs/resources/user_authentication_policy_attachment +++ /dev/null @@ -1,46 +0,0 @@ ---- -page_title: "snowflake_user_authentication_policy_attachment Resource - terraform-provider-snowflake" -subcategory: "" -description: |- - Specifies the authentication policy to use for a certain user. ---- - -!> **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. - -~> **Required warehouse** For this resource, the provider now uses [policy references](https://docs.snowflake.com/en/sql-reference/functions/policy_references) to get information about policies attached to users. This function requires a warehouse in the connection. Please, make sure you have either set a `DEFAULT_WAREHOUSE` for the user, or specified a warehouse in the provider configuration. - -# snowflake_user_authentication_policy_attachment (Resource) - -Specifies the authentication policy to use for a certain user. - -## Example Usage - -```terraform -resource "snowflake_user" "user" { - name = "USER_NAME" -} -resource "snowflake_authentication_policy" "ap" { - database = "prod" - schema = "security" - name = "default_policy" -} -resource "snowflake_user_authentication_policy_attachment" "apa" { - authentication_policy_name = snowflake_authentication_policy.ap.fully_qualified_name - user_name = snowflake_user.user.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 - -### Required - -- `authentication_policy_name` (String) Fully qualified name of the authentication policy -- `user_name` (String) User name of the user you want to attach the authentication policy to - -### Optional - -- `id` (String) The ID of this resource. diff --git a/docs/resources/user_authentication_policy_attachment.md b/docs/resources/user_authentication_policy_attachment.md index 9cd4af4a98..e292545969 100644 --- a/docs/resources/user_authentication_policy_attachment.md +++ b/docs/resources/user_authentication_policy_attachment.md @@ -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. +~> **Required warehouse** For this resource, the provider now uses [policy references](https://docs.snowflake.com/en/sql-reference/functions/policy_references) to get information about policies attached to users. This function requires a warehouse in the connection. Please, make sure you have either set a `DEFAULT_WAREHOUSE` for the user, or specified a warehouse in the provider configuration. + # snowflake_user_authentication_policy_attachment (Resource) Specifies the authentication policy to use for a certain user. diff --git a/docs/resources/user_password_policy_attachment b/docs/resources/user_password_policy_attachment deleted file mode 100644 index 7874d681ec..0000000000 --- a/docs/resources/user_password_policy_attachment +++ /dev/null @@ -1,55 +0,0 @@ ---- -page_title: "snowflake_user_password_policy_attachment Resource - terraform-provider-snowflake" -subcategory: "" -description: |- - Specifies the password policy to use for a certain user. ---- - -!> **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. - -~> **Required warehouse** For this resource, the provider now uses [policy references](https://docs.snowflake.com/en/sql-reference/functions/policy_references) to get information about policies attached to users. This function requires a warehouse in the connection. Please, make sure you have either set a `DEFAULT_WAREHOUSE` for the user, or specified a warehouse in the provider configuration. - -# snowflake_user_password_policy_attachment (Resource) - -Specifies the password policy to use for a certain user. - -## Example Usage - -```terraform -resource "snowflake_user" "user" { - name = "USER_NAME" -} -resource "snowflake_password_policy" "pp" { - database = "prod" - schema = "security" - name = "default_policy" -} - -resource "snowflake_user_password_policy_attachment" "ppa" { - password_policy_name = snowflake_password_policy.pp.fully_qualified_name - user_name = snowflake_user.user.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 - -### Required - -- `password_policy_name` (String) Fully qualified name of the password policy -- `user_name` (String) User name of the user you want to attach the password policy to - -### Optional - -- `id` (String) The ID of this resource. - -## Import - -Import is supported using the following syntax: - -```shell -terraform import snowflake_user_password_policy_attachment.example "MY_DATABASE|MY_SCHEMA|PASSWORD_POLICY_NAME|USER_NAME" -``` diff --git a/docs/resources/user_password_policy_attachment.md b/docs/resources/user_password_policy_attachment.md index da7e90f51c..93854bb08d 100644 --- a/docs/resources/user_password_policy_attachment.md +++ b/docs/resources/user_password_policy_attachment.md @@ -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. +~> **Required warehouse** For this resource, the provider now uses [policy references](https://docs.snowflake.com/en/sql-reference/functions/policy_references) to get information about policies attached to users. This function requires a warehouse in the connection. Please, make sure you have either set a `DEFAULT_WAREHOUSE` for the user, or specified a warehouse in the provider configuration. + # snowflake_user_password_policy_attachment (Resource) Specifies the password policy to use for a certain user. diff --git a/templates/resources/user_authentication_policy_attachment.tmpl b/templates/resources/user_authentication_policy_attachment.md.tmpl similarity index 100% rename from templates/resources/user_authentication_policy_attachment.tmpl rename to templates/resources/user_authentication_policy_attachment.md.tmpl diff --git a/templates/resources/user_password_policy_attachment.tmpl b/templates/resources/user_password_policy_attachment.md.tmpl similarity index 100% rename from templates/resources/user_password_policy_attachment.tmpl rename to templates/resources/user_password_policy_attachment.md.tmpl