Skip to content

Commit 696acbb

Browse files
authored
fix: Ensure that passing values for option group with PostgreSQL does not cause errors (#467)
Resolves undefined
1 parent baf54be commit 696acbb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
TERRAFORM_DOCS_VERSION: v0.16.0
11+
TFLINT_VERSION: v0.44.1
1112

1213
jobs:
1314
collectInputs:
@@ -46,6 +47,7 @@ jobs:
4647
uses: clowdhaus/terraform-composite-actions/[email protected]
4748
with:
4849
terraform-version: ${{ steps.minMax.outputs.minVersion }}
50+
tflint-version: ${{ env.TFLINT_VERSION }}
4951
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'
5052

5153
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
@@ -54,6 +56,7 @@ jobs:
5456
uses: clowdhaus/terraform-composite-actions/[email protected]
5557
with:
5658
terraform-version: ${{ steps.minMax.outputs.minVersion }}
59+
tflint-version: ${{ env.TFLINT_VERSION }}
5760
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)'
5861

5962
preCommitMaxVersion:
@@ -75,5 +78,6 @@ jobs:
7578
uses: clowdhaus/terraform-composite-actions/[email protected]
7679
with:
7780
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
81+
tflint-version: ${{ env.TFLINT_VERSION }}
7882
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
7983
install-hcledit: true

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module "db_instance" {
9393
vpc_security_group_ids = var.vpc_security_group_ids
9494
db_subnet_group_name = local.db_subnet_group_name
9595
parameter_group_name = local.parameter_group_name_id
96-
option_group_name = local.option_group
96+
option_group_name = var.engine != "postgres" ? local.option_group : null
9797
network_type = var.network_type
9898

9999
availability_zone = var.availability_zone

0 commit comments

Comments
 (0)