From 1e9deba81a96cba667780a3bc1d3880b2b722775 Mon Sep 17 00:00:00 2001 From: mima Date: Thu, 17 Feb 2022 19:58:56 +0100 Subject: [PATCH] new workflow --- .github/workflows/terraform-lint.yml | 15 --------------- .github/workflows/terraform.yml | 23 +++++++++++++++++++++++ examples/main.tf | 2 +- 3 files changed, 24 insertions(+), 16 deletions(-) delete mode 100644 .github/workflows/terraform-lint.yml create mode 100644 .github/workflows/terraform.yml diff --git a/.github/workflows/terraform-lint.yml b/.github/workflows/terraform-lint.yml deleted file mode 100644 index 7e3f5c4..0000000 --- a/.github/workflows/terraform-lint.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Terraform Lint - -on: [push, pull_request] - -jobs: - terraform-lint: - runs-on: ubuntu-latest - - steps: - # Important: This sets up your GITHUB_WORKSPACE environment variable - - uses: actions/checkout@v2 - - name: Lint Terraform - # replace "master" with any valid ref - uses: actionshub/terraform-lint@main diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml new file mode 100644 index 0000000..5eaf170 --- /dev/null +++ b/.github/workflows/terraform.yml @@ -0,0 +1,23 @@ +--- +name: Terraform + +on: [push, pull_request] + +jobs: + terraform-lint: + runs-on: ubuntu-latest + + steps: + # Important: This sets up your GITHUB_WORKSPACE environment variable + - uses: actions/checkout@v2 + - uses: hashicorp/setup-terraform@v1 + + - name: fmt + run: terraform fmt -recursive -check + continue-on-error: true + + - name: init + run: terraform init + + - name: validate + run: terraform validate -no-color diff --git a/examples/main.tf b/examples/main.tf index 39194e0..98fc75c 100644 --- a/examples/main.tf +++ b/examples/main.tf @@ -1,5 +1,5 @@ module "network" { - source = "../modules/azure/terraform-network" + source = "registry.terraform.io/T-Systems-MMS/network/azurerm" virtual_network = { env = { name = "service-env-vn"