Skip to content

Commit 5539c5a

Browse files
authoredJan 8, 2025
Merge pull request #41 from getindata/feature/add_uppercase_name_flag
feat: Add `name_scheme.uppercase` flag, bump submodules, bump CI configuration, improve dependencies
2 parents 4598b7b + 17010c0 commit 5539c5a

11 files changed

+108
-84
lines changed
 

‎.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
repos:
22
- repo: https://github.com/gruntwork-io/pre-commit
3-
rev: "v0.1.23" # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
3+
rev: "v0.1.25" # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
44
hooks:
55
- id: terraform-validate # It should be the first step as it runs terraform init required by tflint
66
- id: terraform-fmt
77
- id: tflint
88

99
- repo: https://github.com/terraform-docs/terraform-docs
10-
rev: "v0.18.0" # Get the latest from: https://github.com/terraform-docs/terraform-docs/releases
10+
rev: "v0.19.0" # Get the latest from: https://github.com/terraform-docs/terraform-docs/releases
1111
hooks:
1212
- id: terraform-docs-go
1313
args: ["."]
1414

1515
- repo: https://github.com/bridgecrewio/checkov.git
16-
rev: "3.2.216" # Get the latest from: https://github.com/bridgecrewio/checkov/releases
16+
rev: "3.2.350" # Get the latest from: https://github.com/bridgecrewio/checkov/releases
1717
hooks:
1818
- id: checkov
1919
args: [--skip-check, "CKV_TF_1"] # Terraform module sources do not use a git url with a commit hash revision
2020

2121
- repo: https://github.com/pre-commit/pre-commit-hooks
22-
rev: "v4.6.0" # Get the latest from: https://github.com/pre-commit/pre-commit-hooks/releases
22+
rev: "v5.0.0" # Get the latest from: https://github.com/pre-commit/pre-commit-hooks/releases
2323
hooks:
2424
- id: check-merge-conflict
2525
args: ["--assume-in-merge"]

‎README.md

+17-17
Large diffs are not rendered by default.

‎examples/complete/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ terraform destroy -var-file=fixtures.tfvars
4242
| Name | Source | Version |
4343
|------|--------|---------|
4444
| <a name="module_existing_schema"></a> [existing\_schema](#module\_existing\_schema) | ../../ | n/a |
45-
| <a name="module_new_schema"></a> [new\_schema](#module\_new\_schema) | ../../ | n/a |
45+
| <a name="module_marts_schema"></a> [marts\_schema](#module\_marts\_schema) | ../../ | n/a |
46+
| <a name="module_raw_schema"></a> [raw\_schema](#module\_raw\_schema) | ../../ | n/a |
4647

4748
## Outputs
4849

4950
| Name | Description |
5051
|------|-------------|
51-
| <a name="output_new_schema"></a> [new\_schema](#output\_new\_schema) | Schema module outputs |
52+
| <a name="output_marts_schema"></a> [marts\_schema](#output\_marts\_schema) | Schema module outputs |
53+
| <a name="output_raw_schema"></a> [raw\_schema](#output\_raw\_schema) | Schema module outputs |
5254

5355
## Providers
5456

‎examples/complete/main.tf

+14-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ resource "snowflake_schema" "this" {
2828

2929
resource "snowflake_table" "table_1" {
3030
database = snowflake_database.this.name
31-
schema = module.new_schema.name
31+
schema = module.raw_schema.name
3232
name = "TEST_TABLE_1"
3333

3434
column {
@@ -45,7 +45,7 @@ resource "snowflake_table" "table_1" {
4545

4646
resource "snowflake_table" "table_2" {
4747
database = snowflake_database.this.name
48-
schema = module.new_schema.name
48+
schema = module.raw_schema.name
4949
name = "TEST_TABLE_2"
5050

5151
column {
@@ -72,7 +72,7 @@ module "existing_schema" {
7272

7373
}
7474

75-
module "new_schema" {
75+
module "raw_schema" {
7676
source = "../../"
7777
context_templates = var.context_templates
7878

@@ -153,3 +153,14 @@ module "new_schema" {
153153
}
154154
}
155155
}
156+
157+
module "marts_schema" {
158+
source = "../../"
159+
context_templates = var.context_templates
160+
161+
name = "marts"
162+
name_scheme = {
163+
uppercase = false
164+
}
165+
database = snowflake_database.this.name
166+
}

‎examples/complete/outputs.tf

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
output "new_schema" {
1+
output "raw_schema" {
22
description = "Schema module outputs"
3-
value = module.new_schema
3+
value = module.raw_schema
4+
}
5+
6+
output "marts_schema" {
7+
description = "Schema module outputs"
8+
value = module.marts_schema
49
}

‎examples/simple/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ No inputs.
5050

5151
| Name | Version |
5252
|------|---------|
53-
| <a name="provider_snowflake"></a> [snowflake](#provider\_snowflake) | ~> 0.94 |
53+
| <a name="provider_snowflake"></a> [snowflake](#provider\_snowflake) | >= 0.94 |
5454

5555
## Requirements
5656

5757
| Name | Version |
5858
|------|---------|
5959
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
60-
| <a name="requirement_snowflake"></a> [snowflake](#requirement\_snowflake) | ~> 0.94 |
60+
| <a name="requirement_snowflake"></a> [snowflake](#requirement\_snowflake) | >= 0.94 |
6161

6262
## Resources
6363

‎examples/simple/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
snowflake = {
66
source = "Snowflake-Labs/snowflake"
7-
version = "~> 0.94"
7+
version = ">= 0.94"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)