Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] first pass of import docs #328

Merged
merged 2 commits into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/resources/account_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ description: |-
- **roles** (Set of String, Optional) Grants privilege to these roles.
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.

## Import

Import is supported using the following syntax:

```shell
# format is account name | privilege | true/false for with_grant_option
terraform import snowflake_account_grant.example 'accountName|USAGE|true'
```
19 changes: 19 additions & 0 deletions docs/resources/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@ description: |-



## Example Usage

```terraform
resource "snowflake_database" "test" {
name = "testing"
comment = "test comment"
data_retention_time_in_days = 3
}
resource "snowflake_database" "test2" {
name = "testing_2"
comment = "test comment 2"
}
```

## Schema

Expand All @@ -25,4 +38,10 @@ description: |-
- **from_share** (Map of String, Optional) Specify a provider and a share in this map to create a database from a share.
- **id** (String, Optional) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_database.example name
```
7 changes: 7 additions & 0 deletions docs/resources/database_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,11 @@ description: |-
- **shares** (Set of String, Optional) Grants privilege to these shares.
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.

## Import

Import is supported using the following syntax:

```shell
# format is database name | privilege | true/false for with_grant_option
terraform import snowflake_database_grant.example 'databaseName|USAGE|false'
```
7 changes: 7 additions & 0 deletions docs/resources/integration_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@ description: |-
- **roles** (Set of String, Optional) Grants privilege to these roles.
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.

## Import

Import is supported using the following syntax:

```shell
# format is integration name | privilege | true/false for with_grant_option
terraform import snowflake_integration_grant.example 'intName|USAGE|true'
```
6 changes: 6 additions & 0 deletions docs/resources/managed_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ description: |-
- **region** (String, Read-only) Snowflake Region in which the managed account is located.
- **url** (String, Read-only) URL for accessing the managed account, particularly through the web interface.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_managed_account.example name
```
6 changes: 6 additions & 0 deletions docs/resources/network_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ description: |-
- **comment** (String, Optional) Specifies a comment for the network policy.
- **id** (String, Optional) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_network_policy.example policyname
```
6 changes: 6 additions & 0 deletions docs/resources/network_policy_attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ description: |-
- **set_for_account** (Boolean, Optional) Specifies whether the network policy should be applied globally to your Snowflake account<br><br>**Note:** The Snowflake user running `terraform apply` must be on an IP address allowed by the network policy to set that policy globally on the Snowflake account.<br><br>Additionally, a Snowflake account can only have one network policy set globally at any given time. This resource does not enforce one-policy-per-account, it is the user's responsibility to enforce this. If multiple network policy resources have `set_for_account: true`, the final policy set on the account will be non-deterministic.
- **users** (Set of String, Optional) Specifies which users the network policy should be attached to

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_network_policy_attachment.example attachment_policyname
```
7 changes: 7 additions & 0 deletions docs/resources/pipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,11 @@ description: |-
- **notification_channel** (String, Read-only) Amazon Resource Name of the Amazon SQS queue for the stage named in the DEFINITION column.
- **owner** (String, Read-only) Name of the role that owns the pipe.

## Import

Import is supported using the following syntax:

```shell
# format is database name | schema name | pipe name
terraform import snowflake_pipe.example 'dbName|schemaName|pipeName'
```
6 changes: 6 additions & 0 deletions docs/resources/resource_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ description: |-
- **suspend_immediate_triggers** (Set of Number, Optional) A list of percentage thresholds at which to immediately suspend all warehouses.
- **suspend_triggers** (Set of Number, Optional) A list of percentage thresholds at which to suspend all warehouses.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_resource_monitor.example
```
6 changes: 6 additions & 0 deletions docs/resources/resource_monitor_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ description: |-
- **roles** (Set of String, Optional) Grants privilege to these roles.
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_resource_monitor_grant.example name
```
6 changes: 6 additions & 0 deletions docs/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ description: |-
- **comment** (String, Optional)
- **id** (String, Optional) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_role.example roleName
```
42 changes: 42 additions & 0 deletions docs/resources/role_grants.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,43 @@ description: |-



## Example Usage

```terraform
resource "snowflake_role" "role" {
name = "rking_test_role"
comment = "for testing"
}

resource "snowflake_user" "user" {
name = "rking_test_user"
comment = "for testing"
}

resource "snowflake_user" "user2" {
name = "rking_test_user2"
comment = "for testing"
}

resource "snowflake_role" "other_role" {
name = "rking_test_role2"
}

resource "snowflake_role_grants" "grants" {
name = "foo"

role_name = "${snowflake_role.role.name}"

roles = [
"${snowflake_role.other_role.name}",
]

users = [
"${snowflake_user.user.name}",
"${snowflake_user.user2.name}",
]
}
```

## Schema

Expand All @@ -23,4 +59,10 @@ description: |-
- **roles** (Set of String, Optional) Grants role to this specified role.
- **users** (Set of String, Optional) Grants role to this specified user.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_role_grants.example rolename
```
7 changes: 7 additions & 0 deletions docs/resources/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ description: |-
- **is_managed** (Boolean, Optional) Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
- **is_transient** (Boolean, Optional) Specifies a schema as transient. Transient schemas do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.

## Import

Import is supported using the following syntax:

```shell
# format is schema name | privilege | true/false for with_grant_option
terraform import snowflake_schema.example 'schemaName|USAGE|true'
```
7 changes: 7 additions & 0 deletions docs/resources/schema_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ description: |-
- **shares** (Set of String, Optional) Grants privilege to these shares (only valid if on_future is unset).
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.

## Import

Import is supported using the following syntax:

```shell
# format is schema name | privilege | true/false for with_grant_option
terraform import snowflake_schema_grant.example 'schemaName|MONITOR|false'
```
6 changes: 6 additions & 0 deletions docs/resources/share.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ description: |-
- **comment** (String, Optional) Specifies a comment for the managed account.
- **id** (String, Optional) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_share.example name
```
27 changes: 26 additions & 1 deletion docs/resources/stage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,25 @@ description: |-




## Example Usage

```terraform
resource "snowflake_stage" "example_stage" {
name = "EXAMPLE_STAGE"
url = "s3://com.example.bucket/prefix"
database = "EXAMPLE_DB"
schema = "EXAMPLE_SCHEMA"
credentials = "AWS_KEY_ID='${var.example_aws_key_id}' AWS_SECRET_KEY='${var.example_aws_secret_key}'"
}

resource "snowflake_stage_grant" "grant_example_stage" {
database_name = snowflake_stage.example_stage.database
schema_name = snowflake_stage.example_stage.schema
roles = ["LOADER"]
privilege = "OWNERSHIP"
stage_name = snowflake_stage.example_stage.name
}
```

## Schema

Expand All @@ -32,4 +50,11 @@ description: |-
- **storage_integration** (String, Optional) Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- **url** (String, Optional) Specifies the URL for the stage.

## Import

Import is supported using the following syntax:

```shell
# format is database name | schema name | stage name
terraform import snowflake_stage.example 'dbName|schemaName|stageName'
```
7 changes: 7 additions & 0 deletions docs/resources/stage_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ description: |-
- **shares** (Set of String, Optional) Grants privilege to these shares.
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.

## Import

Import is supported using the following syntax:

```shell
# format is stage name | privilege | true/false for with_grant_option
terraform import snowflake_stage_grant.example 'stageName|USAGE|true'
```
6 changes: 6 additions & 0 deletions docs/resources/storage_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ description: |-
- **storage_aws_external_id** (String, Read-only) The external ID that Snowflake will use when assuming the AWS role.
- **storage_aws_iam_user_arn** (String, Read-only) The Snowflake user that will attempt to assume the AWS role.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_storage_integration.example name
```
7 changes: 7 additions & 0 deletions docs/resources/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,11 @@ description: |-

- **owner** (String, Read-only) Name of the role that owns the stream.

## Import

Import is supported using the following syntax:

```shell
# format is database name | schema name | on table name
terraform import snowflake_stream.example 'dbName|schemaName|tableName'
```
7 changes: 7 additions & 0 deletions docs/resources/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ Required:
- **name** (String, Required) Column name
- **type** (String, Required) Column type, e.g. VARIANT

## Import

Import is supported using the following syntax:

```shell
# format is database name | schema name | table name
terraform import snowflake_table.example
```
7 changes: 7 additions & 0 deletions docs/resources/table_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ description: |-
- **table_name** (String, Optional) The name of the table on which to grant privileges immediately (only valid if on_future is unset).
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.

## Import

Import is supported using the following syntax:

```shell
# format is table name | privilege | true/false for with_grant_option
terraform import snowflake_table_grant.example 'tableName|MODIFY|true'
```
7 changes: 7 additions & 0 deletions docs/resources/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,11 @@ description: |-
- **user_task_timeout_ms** (Number, Optional) Specifies the time limit on a single run of the task before it times out (in milliseconds).
- **when** (String, Optional) Specifies a Boolean SQL expression; multiple conditions joined with AND/OR are supported.

## Import

Import is supported using the following syntax:

```shell
# format is database name | schema name | task name
terraform import snowflake_task.example 'dbName|schemaName|taskName'
```
6 changes: 6 additions & 0 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,10 @@ description: |-

- **has_rsa_public_key** (Boolean, Read-only) Will be true if user as an RSA key set.

## Import

Import is supported using the following syntax:

```shell
terraform import snowflake_user.example userName
```
7 changes: 7 additions & 0 deletions docs/resources/view.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ description: |-
- **or_replace** (Boolean, Optional) Overwrites the View if it exists.
- **schema** (String, Optional) The schema in which to create the view. Don't use the | character.

## Import

Import is supported using the following syntax:

```shell
# format is database name | schema name | view name
terraform import snowflake_view.example 'dbName|schemaName|viewName'
```
7 changes: 7 additions & 0 deletions docs/resources/view_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ description: |-
- **view_name** (String, Optional) The name of the view on which to grant privileges immediately (only valid if on_future is unset).
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.

## Import

Import is supported using the following syntax:

```shell
# format is database name | schema name | view name | privilege | true/false for with_grant_option
terraform import snowflake_view_grant.example 'dbName|schemaName|viewName|USAGE|false'
```