Skip to content

Commit

Permalink
[docs] examples for all resources (#331)
Browse files Browse the repository at this point in the history

## Test Plan
<!-- detail ways in which this PR has been tested or needs to be tested -->
* [x] acceptance tests
<!-- add more below if you think they are relevant -->
* [ ] …

## References
<!-- issues documentation links, etc  -->

*
  • Loading branch information
ryanking committed Dec 8, 2020
1 parent ddd1beb commit 8c57055
Show file tree
Hide file tree
Showing 50 changed files with 604 additions and 16 deletions.
10 changes: 9 additions & 1 deletion docs/resources/account_grant.md
Expand Up @@ -9,7 +9,15 @@ description: |-




## Example Usage

```terraform
resource snowflake_account_grant grant {
roles = ["role1", "role2"]
privilege = "CREATE ROLE"
with_grant_option = false
}
```

## Schema

Expand Down
12 changes: 12 additions & 0 deletions docs/resources/database_grant.md
Expand Up @@ -9,7 +9,19 @@ description: |-



## Example Usage

```terraform
resource snowflake_database_grant grant {
database_name = "db"
privilege = "USAGE"
roles = ["role1", "role2"]
shares = ["share1", "share2"]
with_grant_option = false
}
```

## Schema

Expand Down
11 changes: 11 additions & 0 deletions docs/resources/integration_grant.md
Expand Up @@ -9,7 +9,18 @@ description: |-



## Example Usage

```terraform
resource snowflake_integratin_grant grant {
integration_name = "integration"
privilege = "USAGE"
roles = ["role1", "role2"]
with_grant_option = false
}
```

## Schema

Expand Down
15 changes: 14 additions & 1 deletion docs/resources/managed_account.md
Expand Up @@ -9,7 +9,20 @@ description: |-




## Example Usage

```terraform
resource snowflake_managed_account account {
name = "managed account"
admin_name = "admin"
admin_password = "secret"
type = "READER"
comment = "A managed account."
cloud = "aws"
region = "us-west-2"
locator = "managed-account"
}
```

## Schema

Expand Down
10 changes: 10 additions & 0 deletions docs/resources/network_policy.md
Expand Up @@ -9,7 +9,17 @@ description: |-



## Example Usage

```terraform
resource snowflake_network_poilcy policy {
name = "policy"
comment = "A policy."
allowed_ip_list = ["192.168.0.100/24"]
blocked_ip_list = ["192.168.0.101"]
}
```

## Schema

Expand Down
10 changes: 9 additions & 1 deletion docs/resources/network_policy_attachment.md
Expand Up @@ -9,7 +9,15 @@ description: |-




## Example Usage

```terraform
resource snowflake_network_policy_attachment attach {
network_policy_name = "policy"
set_for_account = false
users = ["user1", "user2"]
}
```

## Schema

Expand Down
17 changes: 17 additions & 0 deletions docs/resources/pipe.md
Expand Up @@ -9,7 +9,24 @@ description: |-



## Example Usage

```terraform
resource snowflake_pipe pipe {
database = "db"
schema = "schema"
name = "pipe"
comment = "A pipe."
copy_statement = "copy into mytable from @mystage"
auto_ingest = false
aws_sns_topic_arn = "..."
notification_channel = "..."
owner = "role1"
}
```

## Schema

Expand Down
15 changes: 15 additions & 0 deletions docs/resources/resource_monitor.md
Expand Up @@ -9,7 +9,22 @@ description: |-



## Example Usage

```terraform
resource snowflake_resource_monitor monitor {
name = "monitor"
credit_quota = 100
frequency = "DAILY"
start_timestamp = "2020-12-07 00:00"
end_timestamp = "2021-12-07 00:00"
notify_triggers = [40]
suspend_triggers = [50]
suspend_immediate_triggers = [90]
}
```

## Schema

Expand Down
11 changes: 10 additions & 1 deletion docs/resources/resource_monitor_grant.md
Expand Up @@ -9,7 +9,16 @@ description: |-




## Example Usage

```terraform
resource snowflake_monitor_grant grant {
monitor_name = "monitor"
privilege = "MODIFY"
roles = ["role1"]
with_grant_option = false
}
```

## Schema

Expand Down
7 changes: 7 additions & 0 deletions docs/resources/role.md
Expand Up @@ -9,7 +9,14 @@ description: |-



## Example Usage

```terraform
resource snowflake_role role {
name = "role1"
comment = "A role."
}
```

## Schema

Expand Down
14 changes: 13 additions & 1 deletion docs/resources/schema.md
Expand Up @@ -9,7 +9,19 @@ description: |-




## Example Usage

```terraform
resource snowflake_schema schema {
database = "db"
name = "schema"
comment = "A schema."
is_transient = false
is_managed = false
data_retention_days = 1
}
```

## Schema

Expand Down
14 changes: 14 additions & 0 deletions docs/resources/schema_grant.md
Expand Up @@ -9,7 +9,21 @@ description: |-



## Example Usage

```terraform
resource snowflake_schema_grant grant {
database_name = "db"
schema_name = "schema"
privilege = "USAGE"
roles = ["role1", "role2"]
shares = ["share1", "share2"]
on_future = false
with_grant_option = false
}
```

## Schema

Expand Down
14 changes: 14 additions & 0 deletions docs/resources/share.md
Expand Up @@ -9,7 +9,21 @@ description: |-



## Example Usage

```terraform
resource snowflake_share share {
database_name = "db"
schema_name = "schema"
stage_name = "stage"
privilege = "USAGE"
roles = ["role1", "role2"]
shares = ["share1", "share2"]
with_grant_option = false
}
```

## Schema

Expand Down
15 changes: 15 additions & 0 deletions docs/resources/stage_grant.md
Expand Up @@ -9,7 +9,22 @@ description: |-



## Example Usage

```terraform
resource snowflake_stage_grant grant {
database_name = "db"
schema_name = "schema"
stage_name = "stage"
privilege = "USAGE"
roles = ["role1", "role2"]
shares = ["share1", "share2"]
with_grant_option = false
}
```

## Schema

Expand Down
20 changes: 20 additions & 0 deletions docs/resources/storage_integration.md
Expand Up @@ -9,7 +9,27 @@ description: |-



## Example Usage

```terraform
resource snowflake_storage_integration integration {
name = "storage"
comment = "A storage integration."
type = "EXTERNAL_STAGE"
enabled = true
# storage_allowed_locations = [""]
# storage_blocked_locations = [""]
storage_provider = "S3"
storage_aws_external_id = "..."
storage_aws_iam_user_arn = "..."
storage_aws_role_arn = "..."
# azure_tenant_id
}
```

## Schema

Expand Down
15 changes: 15 additions & 0 deletions docs/resources/stream.md
Expand Up @@ -9,7 +9,22 @@ description: |-



## Example Usage

```terraform
resource snowflake_stream stream {
comment = "A stream."
database = "db"
schema = "schema"
name = "stream"
on_table = "table"
append_only = false
owner = "role1"
}
```

## Schema

Expand Down
22 changes: 21 additions & 1 deletion docs/resources/table.md
Expand Up @@ -9,7 +9,27 @@ description: |-




## Example Usage

```terraform
resource snowflake_table table {
database = "database"
schema = "schmea"
name = "table"
comment = "A table."
owner = "me"
column {
name = "id"
type = "int"
}
column {
name = "data"
type = "text"
}
}
```

## Schema

Expand Down
15 changes: 15 additions & 0 deletions docs/resources/table_grant.md
Expand Up @@ -9,7 +9,22 @@ description: |-



## Example Usage

```terraform
resource snowflake_table_grant grant {
database_name = "database"
schema_name = "schema"
table_name = "table"
privilege = "SELECT"
roles = ["role1"]
shares = ["share1"]
on_future = false
with_grant_option = false
}
```

## Schema

Expand Down

0 comments on commit 8c57055

Please sign in to comment.