diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index e4b6ae4b..205fc163 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -7,8 +7,6 @@ on: env: TERRAFORM_DOCS_VERSION: v0.16.0 - TFSEC_VERSION: v1.28.1 - TF_PLUGIN_CACHE_DIR: ${{ github.workspace }}/.terraform.d/plugin-cache TFLINT_VERSION: v0.45.0 jobs: @@ -33,9 +31,6 @@ jobs: matrix: directory: ${{ fromJson(needs.collectInputs.outputs.directories) }} steps: - - name: Remove default Terraform - run: rm -rf $(which terraform) - - name: Checkout uses: actions/checkout@v3 @@ -49,18 +44,6 @@ jobs: src: - '${{ matrix.directory }}/*.tf' - - name: Config Terraform plugin cache - if: steps.changes.outputs.src == 'true' - run: mkdir --parents ${{ env.TERRAFORM_DOCS_VERSION }} - - - name: Cache Terraform - uses: actions/cache@v3 - if: steps.changes.outputs.src == 'true' - with: - path: ${{ env.TERRAFORM_DOCS_VERSION }} - key: ${{ runner.os }}-terraform-${{ hashFiles('**/.terraform.lock.hcl') }} - restore-keys: ${{ runner.os }}-terraform- - - name: Terraform min/max versions uses: clowdhaus/terraform-min-max@v1.2.5 if: steps.changes.outputs.src == 'true' @@ -91,9 +74,6 @@ jobs: runs-on: ubuntu-latest needs: collectInputs steps: - - name: Remove default Terraform - run: rm -rf $(which terraform) - - name: Checkout uses: actions/checkout@v3 @@ -104,22 +84,6 @@ jobs: src: - '**/*.tf' - - name: Config Terraform plugin cache - if: steps.changes.outputs.src == 'true' - run: mkdir --parents ${{ env.TERRAFORM_DOCS_VERSION }} - - - name: Cache Terraform - uses: actions/cache@v3 - if: steps.changes.outputs.src == 'true' - with: - path: ${{ env.TF_PLUGIN_CACHE_DIR }} - key: ${{ runner.os }}-terraform-${{ hashFiles('**/.terraform.lock.hcl') }} - restore-keys: ${{ runner.os }}-terraform- - - - name: Install tfsec - if: steps.changes.outputs.src == 'true' - run: curl -sSLo ./tfsec https://github.com/aquasecurity/tfsec/releases/download/${{ env.TFSEC_VERSION }}/tfsec-$(uname)-amd64 && chmod +x tfsec && sudo mv tfsec /usr/bin/ - - name: Terraform min/max versions id: minMax uses: clowdhaus/terraform-min-max@v1.2.5 diff --git a/examples/backend-service/main.tf b/examples/backend-service/main.tf index 25d4c898..e6f053e9 100644 --- a/examples/backend-service/main.tf +++ b/examples/backend-service/main.tf @@ -40,7 +40,7 @@ resource "aws_service_discovery_service" "this" { } module "ecs_service_definition" { - source = "github.com/clowdhaus/terraform-aws-ecs//modules/service" + source = "github.com/clowdhaus/terraform-aws-ecs//modules/service?ref=73acc1d" deployment_controller = "ECS" diff --git a/examples/backstage/main.tf b/examples/backstage/main.tf index 0cd4bcdd..0c770392 100644 --- a/examples/backstage/main.tf +++ b/examples/backstage/main.tf @@ -141,7 +141,7 @@ resource "aws_service_discovery_service" "this" { } module "ecs_service_definition" { - source = "github.com/clowdhaus/terraform-aws-ecs//modules/service" + source = "github.com/clowdhaus/terraform-aws-ecs//modules/service?ref=73acc1d" name = local.name desired_count = 3 diff --git a/examples/core-infra/README.md b/examples/core-infra/README.md index dcccd2d4..587f8094 100644 --- a/examples/core-infra/README.md +++ b/examples/core-infra/README.md @@ -63,7 +63,7 @@ terraform destroy | Name | Source | Version | |------|--------|---------| -| [ecs](#module\_ecs) | github.com/clowdhaus/terraform-aws-ecs | n/a | +| [ecs](#module\_ecs) | github.com/clowdhaus/terraform-aws-ecs | 73acc1d | | [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 | ## Resources diff --git a/examples/core-infra/main.tf b/examples/core-infra/main.tf index fad255ce..02fc8ca6 100644 --- a/examples/core-infra/main.tf +++ b/examples/core-infra/main.tf @@ -23,7 +23,7 @@ locals { ################################################################################ module "ecs" { - source = "github.com/clowdhaus/terraform-aws-ecs" + source = "github.com/clowdhaus/terraform-aws-ecs?ref=73acc1d" # version = "~> 4.0" cluster_name = local.name diff --git a/examples/graviton/main.tf b/examples/graviton/main.tf index a6219095..5f2f1ac8 100644 --- a/examples/graviton/main.tf +++ b/examples/graviton/main.tf @@ -180,7 +180,7 @@ resource "aws_service_discovery_service" "arm64" { } module "ecs_service_definition_amd64" { - source = "github.com/clowdhaus/terraform-aws-ecs//modules/service" + source = "github.com/clowdhaus/terraform-aws-ecs//modules/service?ref=73acc1d" name = local.name desired_count = 3 @@ -238,7 +238,7 @@ module "ecs_service_definition_amd64" { } module "ecs_service_definition_arm64" { - source = "github.com/clowdhaus/terraform-aws-ecs//modules/service" + source = "github.com/clowdhaus/terraform-aws-ecs//modules/service?ref=73acc1d" name = "${local.name}-arm64" desired_count = 3 cluster = data.aws_ecs_cluster.core_infra.cluster_name diff --git a/examples/lb-service/main.tf b/examples/lb-service/main.tf index c01ba3c6..cfe1898a 100644 --- a/examples/lb-service/main.tf +++ b/examples/lb-service/main.tf @@ -93,7 +93,7 @@ resource "aws_service_discovery_service" "this" { } module "ecs_service_definition" { - source = "github.com/clowdhaus/terraform-aws-ecs//modules/service" + source = "github.com/clowdhaus/terraform-aws-ecs//modules/service?ref=73acc1d" name = local.name desired_count = 3 diff --git a/examples/prometheus/main.tf b/examples/prometheus/main.tf index 02374f7d..1d8ba276 100644 --- a/examples/prometheus/main.tf +++ b/examples/prometheus/main.tf @@ -38,7 +38,7 @@ resource "aws_service_discovery_service" "this" { } module "ecs_service_definition" { - source = "github.com/clowdhaus/terraform-aws-ecs//modules/service" + source = "github.com/clowdhaus/terraform-aws-ecs//modules/service?ref=73acc1d" name = local.name desired_count = 1