From 7927695b44439d03b5ddbaaedc20951a8fc8627e Mon Sep 17 00:00:00 2001 From: badra001 Date: Mon, 11 May 2026 11:46:07 -0400 Subject: [PATCH] update, run precommit --- .pre-commit-config.yaml | 10 ++--- base-label/base.tf | 2 +- common/versions.tf | 2 +- examples/tags/tags.tf | 2 +- examples/tags/variable.application_tags.tf | 2 +- examples/tags/versions.tf | 48 +++++++++++----------- tags/tags.finops.tf | 2 +- tags/tags.legacy.tf | 2 +- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 93cda0b..f70e884 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.48.0 + rev: v1.105.0 hooks: # - id: terraform_validate - id: terraform_fmt @@ -9,11 +9,11 @@ repos: exclude: common/*.tf exclude: version.tf exclude: examples/ - - id: terraform_tflint - args: [ "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"] - exclude: examples/ +# - id: terraform_tflint +# args: [ "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"] +# exclude: examples/ - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v6.0.0 hooks: - id: check-symlinks - id: detect-aws-credentials diff --git a/base-label/base.tf b/base-label/base.tf index 9ec0cda..66e2480 100644 --- a/base-label/base.tf +++ b/base-label/base.tf @@ -9,7 +9,7 @@ locals { } resource "terraform_data" "base_environment" { - count = local.base.environment!=null && length(local.base.environment) > 0 ? 1 : 0 + count = local.base.environment != null && length(local.base.environment) > 0 ? 1 : 0 input = local.base.environment lifecycle { diff --git a/common/versions.tf b/common/versions.tf index 4ba10ce..34eb3b9 100644 --- a/common/versions.tf +++ b/common/versions.tf @@ -5,5 +5,5 @@ terraform { version = ">= 3.66.0" } } -# required_version = ">= 0.13" + # required_version = ">= 0.13" } diff --git a/examples/tags/tags.tf b/examples/tags/tags.tf index f3c9e35..529f1bf 100644 --- a/examples/tags/tags.tf +++ b/examples/tags/tags.tf @@ -1,5 +1,5 @@ module "tags" { -# source = "git@github.e.it.census.gov:terraform-modules/boc-nts//tags" + # source = "git@github.e.it.census.gov:terraform-modules/boc-nts//tags" source = "../../tags" filename = format("%v/%v", path.root, "tags.yml") diff --git a/examples/tags/variable.application_tags.tf b/examples/tags/variable.application_tags.tf index 25316e4..40219ae 100644 --- a/examples/tags/variable.application_tags.tf +++ b/examples/tags/variable.application_tags.tf @@ -1,4 +1,4 @@ variable "application_tags" { description = "Map of application tags" - type = map(string) + type = map(string) } diff --git a/examples/tags/versions.tf b/examples/tags/versions.tf index dea05fd..6a691cf 100644 --- a/examples/tags/versions.tf +++ b/examples/tags/versions.tf @@ -4,30 +4,30 @@ terraform { source = "hashicorp/aws" version = ">= 4.0" } -# ldap = { -# source = "trevex/ldap" -# version = ">= 0.5.4" -# } -# external = { -# source = "hashicorp/external" -# version = ">= 1.0" -# } -# null = { -# source = "hashicorp/null" -# version = ">= 1.0" -# } -# random = { -# source = "hashicorp/random" -# version = ">= 1.0" -# } -# template = { -# source = "hashicorp/template" -# version = ">= 1.0" -# } -# infoblox = { -# source = "infobloxopen/infoblox" -# version = ">= 2.1.0" -# } + # ldap = { + # source = "trevex/ldap" + # version = ">= 0.5.4" + # } + # external = { + # source = "hashicorp/external" + # version = ">= 1.0" + # } + # null = { + # source = "hashicorp/null" + # version = ">= 1.0" + # } + # random = { + # source = "hashicorp/random" + # version = ">= 1.0" + # } + # template = { + # source = "hashicorp/template" + # version = ">= 1.0" + # } + # infoblox = { + # source = "infobloxopen/infoblox" + # version = ">= 2.1.0" + # } } required_version = ">= 1.0.0" } diff --git a/tags/tags.finops.tf b/tags/tags.finops.tf index c14b16b..b61f2a7 100644 --- a/tags/tags.finops.tf +++ b/tags/tags.finops.tf @@ -28,7 +28,7 @@ resource "terraform_data" "finops_roles" { lifecycle { precondition { - condition = !anytrue([for r in tolist(local.finops_roles) : length(regexall("[^0-9a-z_]", r)) > 0]) + condition = ! anytrue([for r in tolist(local.finops_roles) : length(regexall("[^0-9a-z_]", r)) > 0]) error_message = "Error in one of the finops.roles fields. Each value may contain only 0-9, a-z, and underscore." } } diff --git a/tags/tags.legacy.tf b/tags/tags.legacy.tf index 191be7b..450c2cd 100644 --- a/tags/tags.legacy.tf +++ b/tags/tags.legacy.tf @@ -9,7 +9,7 @@ locals { _legacy_finops1 = [for k, v in var.legacy_tags : { legacy_key = k, value = v, key = lookup(local.legacy_finops_tags_map, k, null) }] legacy_finops_converted = merge([for t in local._legacy_finops1 : { (t.key) = lower(t.value) } if t.key != null]...) - legacy_tags_remaining = { for k, v in var.legacy_tags : k => v if !contains(local.legacy_finops_tags_keys, k) } + legacy_tags_remaining = { for k, v in var.legacy_tags : k => v if ! contains(local.legacy_finops_tags_keys, k) } } resource "terraform_data" "legacy_finops_number" {