diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..9a21ebf --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,54 @@ +--- +name: "Run Pre Commit Checks" + +on: # yamllint disable-line rule:truthy + push: + branches: + - '**' + - '!main' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + ## run pre-commit + pre-commit: + name: Run pre-commit checks + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + actions: write + pages: write + id-token: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.ARC_JOB_TOKEN }} + + - uses: actions/setup-python@v3 + + - name: Install terraform-docs + run: | + cd /tmp + curl -sSLo ./terraform-docs.tar.gz \ + https://terraform-docs.io/dl/v0.16.0/terraform-docs-v0.16.0-$(uname)-amd64.tar.gz + tar -xzf terraform-docs.tar.gz + rm terraform-docs.tar.gz + chmod +x terraform-docs + mv terraform-docs /usr/local/bin/terraform-docs + - name: Install tflint + run: | + cd /tmp + curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash + - name: Run pre-commit + uses: pre-commit/action@v3.0.0 + continue-on-error: true # we want to push the changes pre-commit makes + + - name: Push pre-commit changes to branch + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Push pre-commit changes diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl index c2ff292..3bd0866 100644 --- a/.terraform.lock.hcl +++ b/.terraform.lock.hcl @@ -3,9 +3,10 @@ provider "registry.terraform.io/hashicorp/aws" { version = "4.67.0" - constraints = ">= 2.0.0, >= 3.0.0, >= 3.72.0, >= 4.0.0, ~> 4.0, >= 4.2.0, ~> 4.30, >= 4.66.1" + constraints = ">= 2.0.0, >= 3.0.0, >= 3.72.0, >= 4.0.0, ~> 4.0, >= 4.2.0, ~> 4.30, >= 4.66.1, < 6.0.0" hashes = [ "h1:P43vwcDPG99x5WBbmqwUPgfJrfXf6/ucAIbGlRb7k1w=", + "h1:dCRc4GqsyfqHEMjgtlM1EympBcgTmcTkWaJmtd91+KA=", "zh:0843017ecc24385f2b45f2c5fce79dc25b258e50d516877b3affee3bef34f060", "zh:19876066cfa60de91834ec569a6448dab8c2518b8a71b5ca870b2444febddac6", "zh:24995686b2ad88c1ffaa242e36eee791fc6070e6144f418048c4ce24d0ba5183", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/local" { version = "2.5.1" constraints = ">= 1.2.0" hashes = [ + "h1:8oTPe2VUL6E2d3OcrvqyjI4Nn/Y/UEQN26WLk5O/B0g=", "h1:tjcGlQAFA0kmQ4vKkIPPUC4it1UYxLbg4YvHOWRAJHA=", "zh:0af29ce2b7b5712319bf6424cb58d13b852bf9a777011a545fac99c7fdcdf561", "zh:126063ea0d79dad1f68fa4e4d556793c0108ce278034f101d1dbbb2463924561", @@ -49,6 +51,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 2.0.0, >= 3.0.0" hashes = [ "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", + "h1:zT1ZbegaAYHwQa+QwIFugArWikRJI9dqohj8xb0GY88=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", @@ -68,6 +71,7 @@ provider "registry.terraform.io/hashicorp/random" { version = "3.6.1" constraints = ">= 3.0.0" hashes = [ + "h1:1OlP753r4lOKlBprL0HdZGWerm5DCabD5Mli8k8lWAg=", "h1:8iqExjtAvirFTJkpm5YyYD+fC+DGV8NTJzKsE2c70VA=", "zh:2a0ec154e39911f19c8214acd6241e469157489fc56b6c739f45fbed5896a176", "zh:57f4e553224a5e849c99131f5e5294be3a7adcabe2d867d8a4fef8d0976e0e52", @@ -88,6 +92,7 @@ provider "registry.terraform.io/hashicorp/time" { version = "0.11.1" constraints = ">= 0.7.0" hashes = [ + "h1:IkDriv5C9G+kQQ+mP+8QGIahwKgbQcw1/mzh9U6q+ZI=", "h1:UyhbtF79Wy4EVNrnvMcOPzmZLVQQyzM2ostfjs2l5PI=", "zh:19a393db736ec4fd024d098d55aefaef07056c37a448ece3b55b3f5f4c2c7e4a", "zh:227fa1e221de2907f37be78d40c06ca6a6f7b243a1ec33ade014dfaf6d92cd9c", diff --git a/example/.terraform.lock.hcl b/example/.terraform.lock.hcl index c2ff292..3bd0866 100644 --- a/example/.terraform.lock.hcl +++ b/example/.terraform.lock.hcl @@ -3,9 +3,10 @@ provider "registry.terraform.io/hashicorp/aws" { version = "4.67.0" - constraints = ">= 2.0.0, >= 3.0.0, >= 3.72.0, >= 4.0.0, ~> 4.0, >= 4.2.0, ~> 4.30, >= 4.66.1" + constraints = ">= 2.0.0, >= 3.0.0, >= 3.72.0, >= 4.0.0, ~> 4.0, >= 4.2.0, ~> 4.30, >= 4.66.1, < 6.0.0" hashes = [ "h1:P43vwcDPG99x5WBbmqwUPgfJrfXf6/ucAIbGlRb7k1w=", + "h1:dCRc4GqsyfqHEMjgtlM1EympBcgTmcTkWaJmtd91+KA=", "zh:0843017ecc24385f2b45f2c5fce79dc25b258e50d516877b3affee3bef34f060", "zh:19876066cfa60de91834ec569a6448dab8c2518b8a71b5ca870b2444febddac6", "zh:24995686b2ad88c1ffaa242e36eee791fc6070e6144f418048c4ce24d0ba5183", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/local" { version = "2.5.1" constraints = ">= 1.2.0" hashes = [ + "h1:8oTPe2VUL6E2d3OcrvqyjI4Nn/Y/UEQN26WLk5O/B0g=", "h1:tjcGlQAFA0kmQ4vKkIPPUC4it1UYxLbg4YvHOWRAJHA=", "zh:0af29ce2b7b5712319bf6424cb58d13b852bf9a777011a545fac99c7fdcdf561", "zh:126063ea0d79dad1f68fa4e4d556793c0108ce278034f101d1dbbb2463924561", @@ -49,6 +51,7 @@ provider "registry.terraform.io/hashicorp/null" { constraints = ">= 2.0.0, >= 3.0.0" hashes = [ "h1:vWAsYRd7MjYr3adj8BVKRohVfHpWQdvkIwUQ2Jf5FVM=", + "h1:zT1ZbegaAYHwQa+QwIFugArWikRJI9dqohj8xb0GY88=", "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", @@ -68,6 +71,7 @@ provider "registry.terraform.io/hashicorp/random" { version = "3.6.1" constraints = ">= 3.0.0" hashes = [ + "h1:1OlP753r4lOKlBprL0HdZGWerm5DCabD5Mli8k8lWAg=", "h1:8iqExjtAvirFTJkpm5YyYD+fC+DGV8NTJzKsE2c70VA=", "zh:2a0ec154e39911f19c8214acd6241e469157489fc56b6c739f45fbed5896a176", "zh:57f4e553224a5e849c99131f5e5294be3a7adcabe2d867d8a4fef8d0976e0e52", @@ -88,6 +92,7 @@ provider "registry.terraform.io/hashicorp/time" { version = "0.11.1" constraints = ">= 0.7.0" hashes = [ + "h1:IkDriv5C9G+kQQ+mP+8QGIahwKgbQcw1/mzh9U6q+ZI=", "h1:UyhbtF79Wy4EVNrnvMcOPzmZLVQQyzM2ostfjs2l5PI=", "zh:19a393db736ec4fd024d098d55aefaef07056c37a448ece3b55b3f5f4c2c7e4a", "zh:227fa1e221de2907f37be78d40c06ca6a6f7b243a1ec33ade014dfaf6d92cd9c",