diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..e4277e9 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,26 @@ +name: Terraform Validate + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + validate: + name: Validate + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v1 + + - name: Terraform Init + run: terraform init + + - name: Terraform Validate + run: terraform validate \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 212f069..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,21 +0,0 @@ -image: - name: hashicorp/terraform:light - entrypoint: - - '/usr/bin/env' - - 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' - -cache: - paths: - - .terraform - -before_script: - - terraform --version - -stages: - - format - -format: - stage: format - script: - - terraform fmt -check - diff --git a/README.md b/README.md index f7cf8b6..8e39660 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ This Terraform module manages Cloudwatch Alarms for an RDS instance. It does NOT **Requires**: - AWS Provider -- Terraform 0.12 +- Terraform 0.13 or higher + +If you need Terraform 0.12, you should use version `2.x` of this module and contribute changes to the `tf-0.12` branch. ## Alarms Created diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..6b6318d --- /dev/null +++ b/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.13" +}