diff --git a/scripts/snowflake_generate_grant_all/main.go b/scripts/snowflake_generate_grant_all/main.go index a47d7215..50808075 100644 --- a/scripts/snowflake_generate_grant_all/main.go +++ b/scripts/snowflake_generate_grant_all/main.go @@ -45,6 +45,9 @@ type ModuleTemplate struct { // required_providers: provider_name: version Terraform map[string]map[string]map[string]string `json:"terraform,omitempty"` + + // output name: arguments : values + Outputs map[string]map[string]interface{} `json:"output,omitempty"` } func main() { @@ -116,6 +119,12 @@ func generateModule(name string, grant *resources.TerraformGrantResource) ([]byt Locals: map[string]interface{}{ "privileges": privileges, }, + Outputs: map[string]map[string]interface{}{ + "privileges": { + "value": "${local.privileges}", + "description": "Privileges that make up the ALL set.", + }, + }, Terraform: map[string]map[string]map[string]string{ "required_providers": { "snowflake": map[string]string{ diff --git a/snowflake-account-grant-all/README.md b/snowflake-account-grant-all/README.md index 9e2915e6..d396248b 100644 --- a/snowflake-account-grant-all/README.md +++ b/snowflake-account-grant-all/README.md @@ -21,6 +21,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-account-grant-all/main.tf.json b/snowflake-account-grant-all/main.tf.json index acfeb7a4..5fc990b7 100644 --- a/snowflake-account-grant-all/main.tf.json +++ b/snowflake-account-grant-all/main.tf.json @@ -47,5 +47,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-database-grant-all/README.md b/snowflake-database-grant-all/README.md index 6cca6333..22aace3f 100644 --- a/snowflake-database-grant-all/README.md +++ b/snowflake-database-grant-all/README.md @@ -23,6 +23,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-database-grant-all/main.tf.json b/snowflake-database-grant-all/main.tf.json index aae8df7c..1634d896 100644 --- a/snowflake-database-grant-all/main.tf.json +++ b/snowflake-database-grant-all/main.tf.json @@ -57,5 +57,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-external-table-grant-all/main.tf.json b/snowflake-external-table-grant-all/main.tf.json index d861706a..fae07946 100644 --- a/snowflake-external-table-grant-all/main.tf.json +++ b/snowflake-external-table-grant-all/main.tf.json @@ -70,5 +70,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-file-format-grant-all/main.tf.json b/snowflake-file-format-grant-all/main.tf.json index f22f4484..86f9ea59 100644 --- a/snowflake-file-format-grant-all/main.tf.json +++ b/snowflake-file-format-grant-all/main.tf.json @@ -64,5 +64,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-function-grant-all/main.tf.json b/snowflake-function-grant-all/main.tf.json index 6e5a2472..0d8bef43 100644 --- a/snowflake-function-grant-all/main.tf.json +++ b/snowflake-function-grant-all/main.tf.json @@ -82,5 +82,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-integration-grant-all/README.md b/snowflake-integration-grant-all/README.md index f1d7ee49..bcb95f66 100644 --- a/snowflake-integration-grant-all/README.md +++ b/snowflake-integration-grant-all/README.md @@ -22,6 +22,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-integration-grant-all/main.tf.json b/snowflake-integration-grant-all/main.tf.json index d81c65a1..6168b01c 100644 --- a/snowflake-integration-grant-all/main.tf.json +++ b/snowflake-integration-grant-all/main.tf.json @@ -46,5 +46,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-materialized-view-grant-all/main.tf.json b/snowflake-materialized-view-grant-all/main.tf.json index a8c6261a..da5acf8a 100644 --- a/snowflake-materialized-view-grant-all/main.tf.json +++ b/snowflake-materialized-view-grant-all/main.tf.json @@ -70,5 +70,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-procedure-grant-all/main.tf.json b/snowflake-procedure-grant-all/main.tf.json index 8668351a..62d077ec 100644 --- a/snowflake-procedure-grant-all/main.tf.json +++ b/snowflake-procedure-grant-all/main.tf.json @@ -82,5 +82,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-resource-monitor-grant-all/README.md b/snowflake-resource-monitor-grant-all/README.md index c20cb5cd..b6c3b63d 100644 --- a/snowflake-resource-monitor-grant-all/README.md +++ b/snowflake-resource-monitor-grant-all/README.md @@ -22,6 +22,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-resource-monitor-grant-all/main.tf.json b/snowflake-resource-monitor-grant-all/main.tf.json index 0dc7d667..74489778 100644 --- a/snowflake-resource-monitor-grant-all/main.tf.json +++ b/snowflake-resource-monitor-grant-all/main.tf.json @@ -46,5 +46,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-schema-grant-all/README.md b/snowflake-schema-grant-all/README.md index 676f7367..0b8492b4 100644 --- a/snowflake-schema-grant-all/README.md +++ b/snowflake-schema-grant-all/README.md @@ -25,6 +25,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-schema-grant-all/main.tf.json b/snowflake-schema-grant-all/main.tf.json index 3681dc11..e61d3bc8 100644 --- a/snowflake-schema-grant-all/main.tf.json +++ b/snowflake-schema-grant-all/main.tf.json @@ -81,5 +81,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-sequence-grant-all/main.tf.json b/snowflake-sequence-grant-all/main.tf.json index 4ac69f12..e9f3fc38 100644 --- a/snowflake-sequence-grant-all/main.tf.json +++ b/snowflake-sequence-grant-all/main.tf.json @@ -64,5 +64,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-stage-grant-all/README.md b/snowflake-stage-grant-all/README.md index 0ef51632..8fa5f441 100644 --- a/snowflake-stage-grant-all/README.md +++ b/snowflake-stage-grant-all/README.md @@ -26,6 +26,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-stage-grant-all/main.tf.json b/snowflake-stage-grant-all/main.tf.json index aa5c775f..3d91875d 100644 --- a/snowflake-stage-grant-all/main.tf.json +++ b/snowflake-stage-grant-all/main.tf.json @@ -72,5 +72,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-stream-grant-all/main.tf.json b/snowflake-stream-grant-all/main.tf.json index 6c8ed1a8..4b4c7411 100644 --- a/snowflake-stream-grant-all/main.tf.json +++ b/snowflake-stream-grant-all/main.tf.json @@ -64,5 +64,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-table-grant-all/README.md b/snowflake-table-grant-all/README.md index db9e2b6e..6efb7a0d 100644 --- a/snowflake-table-grant-all/README.md +++ b/snowflake-table-grant-all/README.md @@ -26,6 +26,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-table-grant-all/main.tf.json b/snowflake-table-grant-all/main.tf.json index e25e0558..3157a6f6 100644 --- a/snowflake-table-grant-all/main.tf.json +++ b/snowflake-table-grant-all/main.tf.json @@ -75,5 +75,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-view-grant-all/README.md b/snowflake-view-grant-all/README.md index e145338f..262e850f 100644 --- a/snowflake-view-grant-all/README.md +++ b/snowflake-view-grant-all/README.md @@ -26,6 +26,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-view-grant-all/main.tf.json b/snowflake-view-grant-all/main.tf.json index 108b0af6..4dc8c888 100644 --- a/snowflake-view-grant-all/main.tf.json +++ b/snowflake-view-grant-all/main.tf.json @@ -70,5 +70,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file diff --git a/snowflake-warehouse-grant-all/README.md b/snowflake-warehouse-grant-all/README.md index bfad08b1..558746db 100644 --- a/snowflake-warehouse-grant-all/README.md +++ b/snowflake-warehouse-grant-all/README.md @@ -22,6 +22,8 @@ ## Outputs -No output. +| Name | Description | +|------|-------------| +| privileges | Privileges that make up the ALL set. | diff --git a/snowflake-warehouse-grant-all/main.tf.json b/snowflake-warehouse-grant-all/main.tf.json index 11fb57d5..a4110cb8 100644 --- a/snowflake-warehouse-grant-all/main.tf.json +++ b/snowflake-warehouse-grant-all/main.tf.json @@ -49,5 +49,11 @@ "version": "\u003e= 0.20.0" } } + }, + "output": { + "privileges": { + "description": "Privileges that make up the ALL set.", + "value": "${local.privileges}" + } } } \ No newline at end of file