diff --git a/docs/resources/exec.md b/docs/resources/exec.md index e6fd137..00893b0 100644 --- a/docs/resources/exec.md +++ b/docs/resources/exec.md @@ -264,22 +264,22 @@ In addition to all arguments above, the following attributes are exported: ## Import -Import is supported using the following syntax: +Import is partially supported using the following syntax: ```shell terraform import snowsql_exec.name name ``` -However, since the default method only imports the object without controlling the read/refresh logic, it is recommended to use snowflake clauses to interact with existing objects, such as: +However, we recommend using idempotent SnowSQL clauses when interacting with existing objects, such as: ```terraform resource "snowsql_exec" "role" { create { - statements = "CREATE ROLE my_role" + statements = "CREATE ROLE IF NOT EXISTS my_role" } delete { - statements = "DROP ROLE my_role" + statements = "DROP ROLE IF EXISTS my_role" } } ``` \ No newline at end of file diff --git a/examples/resources/exec/basic/.import.tf.docs b/examples/resources/exec/basic/.import.tf.docs index 77dfb85..cc8c519 100644 --- a/examples/resources/exec/basic/.import.tf.docs +++ b/examples/resources/exec/basic/.import.tf.docs @@ -1,9 +1,9 @@ resource "snowsql_exec" "role" { create { - statements = "CREATE ROLE my_role" + statements = "CREATE ROLE IF NOT EXISTS my_role" } delete { - statements = "DROP ROLE my_role" + statements = "DROP ROLE IF EXISTS my_role" } } diff --git a/templates/resources/exec.md.tmpl b/templates/resources/exec.md.tmpl index bc36d1f..8d96581 100644 --- a/templates/resources/exec.md.tmpl +++ b/templates/resources/exec.md.tmpl @@ -107,6 +107,6 @@ Import is supported using the following syntax: terraform import snowsql_exec.name name ``` -However, since the default method only imports the object without controlling the read/refresh logic, it is recommended to use snowflake clauses to interact with existing objects, such as: +However, we recommend using idempotent SnowSQL clauses when interacting with existing objects, such as: {{ tffile "examples/resources/exec/basic/.import.tf.docs" }} \ No newline at end of file