From aee94158a46cba440c98f95ef591b06c4c690b4d Mon Sep 17 00:00:00 2001 From: Santiago Merlos Date: Wed, 24 Jan 2024 10:52:03 +0100 Subject: [PATCH] ci(checks):check code and lint --- .github/workflows/main.yml | 18 ++++++++++++++++++ main.tf | 20 ++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..66a8d5a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: CI + +on: [push, pull_request] + +jobs: + format-and-check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup Terraform + uses: hashicorp/setup-terraform@v1 + - name: Terraform Format + run: terraform fmt -check + - name: Setup tflint + uses: reviewdog/action-tflint@v1 + - name: Terraform Lint + run: tflint --recursive \ No newline at end of file diff --git a/main.tf b/main.tf index 971191e..660475a 100644 --- a/main.tf +++ b/main.tf @@ -1,15 +1,15 @@ module "ha_proxy" { - source = "./proxmox_vm_module" + source = "./proxmox_vm_module" vm_disk_size = "40G" - base_ip = 20 - vm_counts = 2 - vm_memory = 1024 * 2 - vm_vmid = 1000 - pm_host = var.pm_host - pm_user = var.pm_user - pm_password = var.pm_password - pm_node = var.pm_node - pm_api_url = var.pm_api_url + base_ip = 20 + vm_counts = 2 + vm_memory = 1024 * 2 + vm_vmid = 1000 + pm_host = var.pm_host + pm_user = var.pm_user + pm_password = var.pm_password + pm_node = var.pm_node + pm_api_url = var.pm_api_url } module "k8s_master" {