Skip to content

Commit 202407c

Browse files
authored
Merge pull request #7 from cruxstack/dev
test: lint tf files
2 parents 5d02521 + 637c74e commit 202407c

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ RUN SYSTEM_ARCH=$(dpkg --print-architecture) \
1919
&& terraform version \
2020
&& rm terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip
2121

22+
# install tflint
23+
RUN curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
24+
2225
# install docker
2326
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
2427

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v3
14+
- name: Terraform Setup
15+
run: |
16+
terraform init
17+
- name: Lint Terraform
18+
uses: reviewdog/action-tflint@master
19+
with:
20+
github_token: ${{ secrets.github_token }}
21+
filter_mode: "nofilter"

main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,6 @@ resource "aws_s3_object" "image_files" {
428428

429429
# =================================================================== lookup ===
430430

431-
data "aws_ssm_parameter" "amzn2_image_id" {
432-
count = module.teleport_cluster_label.enabled ? 1 : 0
433-
name = "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs"
434-
}
435-
436431
data "aws_ami" "official_image" {
437432
count = module.teleport_cluster_label.enabled ? 1 : 0
438433

version.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ terraform {
66
source = "hashicorp/aws"
77
version = ">= 5.0.0, < 6.0.0"
88
}
9+
random = {
10+
source = "hashicorp/random"
11+
version = ">= 3.0.0"
12+
}
913
}
1014
}

0 commit comments

Comments
 (0)