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

chore: Add missing documentation #2781

Merged
merged 4 commits into from
May 7, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/data-sources/system_get_aws_sns_iam_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ description: |-



For more details, visit the official Snowflake documentation: https://docs.snowflake.com/en/sql-reference/functions/system_get_aws_sns_iam_policy.
Read this guide to understand how to use the snowflake_system_get_aws_sns_iam_policy to integrate with AWS: https://docs.snowflake.com/en/user-guide/data-load-snowpipe-auto-s3#step-1-subscribe-the-snowflake-sqs-queue-to-the-sns-topic.
It's SQL-based, but after knowing what has to be done use corresponding resources and data-sources from the Snowflake and AWS Terraform provider.

## Example Usage

```terraform
data "snowflake_system_get_aws_sns_iam_policy" "snowflake_policy" {
aws_sns_topic_arn = "<aws_sns_topic_arn>"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/stage.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ resource "snowflake_stage" "example_stage" {

### Optional

- `aws_external_id` (String)
- `aws_external_id` (String) A unique ID assigned to the specific stage. The ID has the following format: &lt;snowflakeAccount&gt;_SFCRole=&lt;snowflakeRoleId&gt;_&lt;randomId&gt;
- `comment` (String) Specifies a comment for the stage.
- `copy_options` (String) Specifies the copy options for the stage.
- `credentials` (String, Sensitive) Specifies the credentials for the stage.
- `directory` (String) Specifies the directory settings for the stage.
- `encryption` (String) Specifies the encryption settings for the stage.
- `file_format` (String) Specifies the file format for the stage.
- `snowflake_iam_user` (String)
- `snowflake_iam_user` (String) An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- `storage_integration` (String) 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.
- `tag` (Block List, Deprecated) Definitions of a tag to associate with the resource. (see [below for nested schema](#nestedblock--tag))
- `url` (String) Specifies the URL for the stage.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "snowflake_system_get_aws_sns_iam_policy" "snowflake_policy" {
aws_sns_topic_arn = "<aws_sns_topic_arn>"
}
1 change: 0 additions & 1 deletion pkg/datasources/system_get_aws_sns_iam_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ var systemGetAWSSNSIAMPolicySchema = map[string]*schema.Schema{
Required: true,
Description: "Amazon Resource Name (ARN) of the SNS topic for your S3 bucket",
},

"aws_sns_topic_policy_json": {
Type: schema.TypeString,
Computed: true,
Expand Down
4 changes: 4 additions & 0 deletions pkg/resources/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,15 @@ var stageSchema = map[string]*schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
// Description based on https://docs.snowflake.com/en/user-guide/data-load-s3-config-aws-iam-role#step-3-create-an-external-stage
Description: "A unique ID assigned to the specific stage. The ID has the following format: &lt;snowflakeAccount&gt;_SFCRole=&lt;snowflakeRoleId&gt;_&lt;randomId&gt;",
},
"snowflake_iam_user": {
Type: schema.TypeString,
Optional: true,
Computed: true,
// Description based on https://docs.snowflake.com/en/user-guide/data-load-s3-config-aws-iam-role#step-3-create-an-external-stage
Description: "An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.",
},
"tag": tagReferenceSchema,
}
Expand Down
24 changes: 24 additions & 0 deletions templates/data-sources/system_get_aws_sns_iam_policy.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ if gt (len (split .Description "<deprecation>")) 1 -}}
{{ index (split .Description "<deprecation>") 1 | plainmarkdown | trimspace | prefixlines " " }}
{{- else -}}
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
{{- end }}
---

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

{{ .Description | trimspace }}

For more details, visit the official Snowflake documentation: https://docs.snowflake.com/en/sql-reference/functions/system_get_aws_sns_iam_policy.
Read this guide to understand how to use the snowflake_system_get_aws_sns_iam_policy to integrate with AWS: https://docs.snowflake.com/en/user-guide/data-load-snowpipe-auto-s3#step-1-subscribe-the-snowflake-sqs-queue-to-the-sns-topic.
It's SQL-based, but after knowing what has to be done use corresponding resources and data-sources from the Snowflake and AWS Terraform provider.

## Example Usage

{{ tffile (printf "examples/data-sources/%s/data-source.tf" .Name) }}

{{ .SchemaMarkdown | trimspace }}
Loading