diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 564a7ba..365df2b 100755 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -19,6 +19,9 @@ RUN SYSTEM_ARCH=$(dpkg --print-architecture) \ && terraform version \ && rm terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip +# install tflint +RUN curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash + # install docker COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..679d22b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: test + +on: + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + - name: Terraform Setup + run: | + terraform init + - name: Lint Terraform + uses: reviewdog/action-tflint@master + with: + github_token: ${{ secrets.github_token }} + filter_mode: "nofilter" diff --git a/main.tf b/main.tf index 67f6944..6563278 100755 --- a/main.tf +++ b/main.tf @@ -428,11 +428,6 @@ resource "aws_s3_object" "image_files" { # =================================================================== lookup === -data "aws_ssm_parameter" "amzn2_image_id" { - count = module.teleport_cluster_label.enabled ? 1 : 0 - name = "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs" -} - data "aws_ami" "official_image" { count = module.teleport_cluster_label.enabled ? 1 : 0 diff --git a/version.tf b/version.tf index b5df4ee..0058bb3 100755 --- a/version.tf +++ b/version.tf @@ -6,5 +6,9 @@ terraform { source = "hashicorp/aws" version = ">= 5.0.0, < 6.0.0" } + random = { + source = "hashicorp/random" + version = ">= 3.0.0" + } } }