Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(orc8r): Added Terraform Lint CI Check #12081

Merged
merged 6 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/terraform-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Terraform Lint

on:
ShubhamTatvamasi marked this conversation as resolved.
Show resolved Hide resolved
push:
branches:
- master
- 'v1.*'
pull_request:
branches:
- master
- 'v1.*'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add some concurrency configs? @quentinDERORY

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number}}
  cancel-in-progress: true

Maybe something like this in alignment with the other linters.

jobs:
terraform-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Terraform Lint
uses: ShubhamTatvamasi/terraform-lint-action@v1
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 8.0"

cluster_name = var.cluster_name
cluster_name = var.cluster_name
cluster_version = "1.17"
vpc_id = module.vpc.vpc_id
subnets = length(module.vpc.private_subnets) > 0 ? module.vpc.private_subnets : module.vpc.public_subnets
vpc_id = module.vpc.vpc_id
subnets = length(module.vpc.private_subnets) > 0 ? module.vpc.private_subnets : module.vpc.public_subnets

cluster_enabled_log_types = [
"api",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 8.0"

cluster_name = var.cluster_name
cluster_name = var.cluster_name
cluster_version = "1.17"
vpc_id = module.vpc.vpc_id
subnets = length(module.vpc.private_subnets) > 0 ? module.vpc.private_subnets : module.vpc.public_subnets
vpc_id = module.vpc.vpc_id
subnets = length(module.vpc.private_subnets) > 0 ? module.vpc.private_subnets : module.vpc.public_subnets

cluster_enabled_log_types = [
"api",
Expand Down