Skip to content

Commit db16dff

Browse files
authored
feat: Add enable_case_sensitive_identifier parameter (terraform-aws-modules#52)
1 parent 41bffe7 commit db16dff

File tree

5 files changed

+33
-20
lines changed

5 files changed

+33
-20
lines changed

.github/workflows/pre-commit.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,30 @@ on:
77
- master
88

99
jobs:
10-
# Min Terraform version(s)
10+
# Min Terraform version(s)
1111
getDirectories:
12-
name: Get root directories
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
17-
- name: Install Python
18-
uses: actions/setup-python@v2
19-
- name: Build matrix
20-
id: matrix
21-
run: |
22-
DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/versions.tf', '') for x in glob.glob('./**/versions.tf', recursive=True)]))")
23-
echo "::set-output name=directories::$DIRS"
24-
outputs:
25-
directories: ${{ steps.matrix.outputs.directories }}
12+
name: Get root directories
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Install Python
18+
uses: actions/setup-python@v2
19+
- name: Build matrix
20+
id: matrix
21+
run: |
22+
DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/versions.tf', '') for x in glob.glob('./**/versions.tf', recursive=True)]))")
23+
echo "::set-output name=directories::$DIRS"
24+
outputs:
25+
directories: ${{ steps.matrix.outputs.directories }}
2626

2727
preCommitMinVersions:
2828
name: Min TF validate
2929
needs: getDirectories
3030
runs-on: ubuntu-latest
3131
strategy:
32-
matrix:
33-
directory: ${{ fromJson(needs.getDirectories.outputs.directories) }}
32+
matrix:
33+
directory: ${{ fromJson(needs.getDirectories.outputs.directories) }}
3434
steps:
3535
- name: Checkout
3636
uses: actions/checkout@v2
@@ -59,7 +59,7 @@ jobs:
5959
pre-commit run terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)
6060

6161

62-
# Max Terraform version
62+
# Max Terraform version
6363
getBaseVersion:
6464
name: Module max TF version
6565
runs-on: ubuntu-latest
@@ -94,7 +94,7 @@ jobs:
9494
- name: Install pre-commit dependencies
9595
run: |
9696
pip install pre-commit
97-
curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v0.12.0-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
97+
curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v0.12\..+?-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
9898
curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
9999
- name: Execute pre-commit
100100
# Run all pre-commit checks on max version supported

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: git://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.48.0
3+
rev: v1.50.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ No modules.
8686
| <a name="input_cluster_parameter_group"></a> [cluster\_parameter\_group](#input\_cluster\_parameter\_group) | Parameter group, depends on DB engine used | `string` | `"redshift-1.0"` | no |
8787
| <a name="input_cluster_port"></a> [cluster\_port](#input\_cluster\_port) | Cluster port | `number` | `5439` | no |
8888
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | Version of Redshift engine cluster | `string` | `"1.0"` | no |
89+
| <a name="input_enable_case_sensitive_identifier"></a> [enable\_case\_sensitive\_identifier](#input\_enable\_case\_sensitive\_identifier) | (Optional) A configuration value that determines whether name identifiers of databases, tables, and columns are case sensitive. | `bool` | `false` | no |
8990
| <a name="input_enable_logging"></a> [enable\_logging](#input\_enable\_logging) | Enables logging information such as queries and connection attempts, for the specified Amazon Redshift cluster. | `bool` | `false` | no |
9091
| <a name="input_enable_user_activity_logging"></a> [enable\_user\_activity\_logging](#input\_enable\_user\_activity\_logging) | Enable logging of user activity. See https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html | `string` | `"false"` | no |
9192
| <a name="input_encrypted"></a> [encrypted](#input\_encrypted) | (Optional) If true , the data in the cluster is encrypted at rest. | `bool` | `false` | no |

main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ resource "aws_redshift_parameter_group" "this" {
110110
value = var.max_concurrency_scaling_clusters
111111
}
112112

113+
parameter {
114+
# ref: https://docs.aws.amazon.com/redshift/latest/dg/r_enable_case_sensitive_identifier.html
115+
name = "enable_case_sensitive_identifier"
116+
value = var.enable_case_sensitive_identifier
117+
}
118+
113119
tags = var.tags
114120
}
115121

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ variable "allow_version_upgrade" {
210210
default = true
211211
}
212212

213+
variable "enable_case_sensitive_identifier" {
214+
description = "(Optional) A configuration value that determines whether name identifiers of databases, tables, and columns are case sensitive."
215+
type = bool
216+
default = false
217+
}
218+
213219
variable "max_concurrency_scaling_clusters" {
214220
description = "(Optional) Max concurrency scaling clusters parameter (0 to 10)"
215221
type = string

0 commit comments

Comments
 (0)