Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-swinkler committed Nov 17, 2023
1 parent 9e50e9f commit 7549f0a
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 75 deletions.
2 changes: 1 addition & 1 deletion docs/resources/grant_privileges_to_role.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ resource "snowflake_grant_privileges_to_role" "g11" {
on_schema_object {
all {
object_type_plural = "TABLES"
in_database = snowflake_database.d.name
in_database = snowflake_database.d.name
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ resource "snowflake_grant_privileges_to_role" "g11" {
on_schema_object {
all {
object_type_plural = "TABLES"
in_database = snowflake_database.d.name
in_database = snowflake_database.d.name
}
}
}
Expand Down
13 changes: 13 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 // indirect
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/apache/arrow/go/v12 v12.0.1 // indirect
github.com/apache/thrift v0.19.0 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/aws/aws-sdk-go-v2 v1.21.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect
Expand All @@ -62,6 +66,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 // indirect
github.com/aws/smithy-go v1.14.2 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down Expand Up @@ -89,9 +94,12 @@ require (
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
github.com/hashicorp/terraform-plugin-docs v0.16.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.2 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/asmfmt v1.3.2 // indirect
github.com/klauspost/compress v1.17.0 // indirect
Expand All @@ -101,6 +109,7 @@ require (
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect
github.com/mitchellh/cli v1.1.5 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
Expand All @@ -111,7 +120,11 @@ require (
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.0 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
Expand Down
55 changes: 55 additions & 0 deletions go.sum

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions pkg/resources/testdata/TestAcc_DynamicTable_issue2134/1/test.tf
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
resource "snowflake_table" "t" {
database = var.database
schema = var.schema
name = var.table_name
change_tracking = true
column {
name = "id"
type = "NUMBER(38,0)"
}
database = var.database
schema = var.schema
name = var.table_name
change_tracking = true
column {
name = "id"
type = "NUMBER(38,0)"
}
}

resource "snowflake_dynamic_table" "dt" {
depends_on = [snowflake_table.t]
name = var.name
database = var.database
schema = var.schema
target_lag {
maximum_duration = "2 minutes"
}
warehouse = var.warehouse
query = var.query
comment = var.comment
depends_on = [snowflake_table.t]
name = var.name
database = var.database
schema = var.schema
target_lag {
maximum_duration = "2 minutes"
}
warehouse = var.warehouse
query = var.query
comment = var.comment
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
variable "name" {
type = string
type = string
}

variable "database" {
type = string
type = string
}

variable "schema" {
type = string
type = string
}

variable "warehouse" {
type = string
type = string
}

variable "query" {
type = string
type = string
}

variable "comment" {
type = string
type = string
}

variable "table_name" {
type = string
type = string
}
22 changes: 11 additions & 11 deletions pkg/resources/testdata/TestAcc_DynamicTable_issue2173/1/test.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
resource "snowflake_schema" "other_schema" {
database = var.database
name = var.other_schema
comment = "Other schema"
database = var.database
name = var.other_schema
comment = "Other schema"
}

resource "snowflake_table" "t" {
database = var.database
schema = var.schema
name = var.table_name
change_tracking = true
column {
name = "id"
type = "NUMBER(38,0)"
}
database = var.database
schema = var.schema
name = var.table_name
change_tracking = true
column {
name = "id"
type = "NUMBER(38,0)"
}
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
variable "name" {
type = string
type = string
}

variable "database" {
type = string
type = string
}

variable "schema" {
type = string
type = string
}

variable "warehouse" {
type = string
type = string
}

variable "query" {
type = string
type = string
}

variable "comment" {
type = string
type = string
}

variable "table_name" {
type = string
type = string
}

variable "other_schema" {
type = string
type = string
}
42 changes: 21 additions & 21 deletions pkg/resources/testdata/TestAcc_DynamicTable_issue2173/2/test.tf
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
resource "snowflake_schema" "other_schema" {
database = var.database
name = var.other_schema
comment = "Other schema"
database = var.database
name = var.other_schema
comment = "Other schema"
}

resource "snowflake_table" "t" {
database = var.database
schema = var.schema
name = var.table_name
change_tracking = true
column {
name = "id"
type = "NUMBER(38,0)"
}
database = var.database
schema = var.schema
name = var.table_name
change_tracking = true
column {
name = "id"
type = "NUMBER(38,0)"
}
}

resource "snowflake_dynamic_table" "dt" {
depends_on = [snowflake_table.t]
name = var.name
database = var.database
schema = var.schema
target_lag {
maximum_duration = "2 minutes"
}
warehouse = var.warehouse
query = var.query
comment = var.comment
depends_on = [snowflake_table.t]
name = var.name
database = var.database
schema = var.schema
target_lag {
maximum_duration = "2 minutes"
}
warehouse = var.warehouse
query = var.query
comment = var.comment
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
variable "name" {
type = string
type = string
}

variable "database" {
type = string
type = string
}

variable "schema" {
type = string
type = string
}

variable "warehouse" {
type = string
type = string
}

variable "query" {
type = string
type = string
}

variable "comment" {
type = string
type = string
}

variable "table_name" {
type = string
type = string
}

variable "other_schema" {
type = string
type = string
}

0 comments on commit 7549f0a

Please sign in to comment.