Skip to content

Commit

Permalink
Merge pull request #14 from kabisa/feature/add-terraform-fmt-action
Browse files Browse the repository at this point in the history
Github action: terraform fmt
  • Loading branch information
Glaaj authored Aug 3, 2022
2 parents ad4d79a + 6a5cc9a commit f07d57b
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 14 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/terraform_fmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Fix terraform file formatting

on:
- pull_request

jobs:
format:
runs-on: ubuntu-latest
name: Check if terraform files are formatted correctly.
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: terraform fmt
uses: dflook/terraform-fmt@v1

- name: Create commit
uses: EndBug/add-and-commit@v9
with:
message: Terraform fmt
default_author: github_actions
push: true
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ resource "kubectl_manifest" "targetgroupbindings" {
# https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/deploy/installation/
# helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=<cluster-name>
resource "helm_release" "aws-load-balancer-controller" {
depends_on = [kubectl_manifest.ingessclassparams, kubectl_manifest.targetgroupbindings]
name = "aws-load-balancer-controller"
namespace = "kube-system"
repository = "https://aws.github.io/eks-charts"
chart = "aws-load-balancer-controller"
version = "1.4.3"
depends_on = [kubectl_manifest.ingessclassparams, kubectl_manifest.targetgroupbindings]
name = "aws-load-balancer-controller"
namespace = "kube-system"
repository = "https://aws.github.io/eks-charts"
chart = "aws-load-balancer-controller"
version = "1.4.3"
# appVersion: v2.4.1
#This defaults to false, recreation is required when upgrading the module from version 2.1 and lower
force_update = var.force_update
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "aws_iam_policy_arn" {
value = aws_iam_policy.alb-ingress-controller-iam-policy.arn
value = aws_iam_policy.alb-ingress-controller-iam-policy.arn
description = "The IAM policy ARN for the ALB Ingress Controller."
}
14 changes: 7 additions & 7 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
variable "eks_cluster_name" {
type = string
type = string
description = "The name of the EKS cluster."
}

variable "region" {
type = string
type = string
description = "The AWS region."
}

variable "oidc_host_path" {
type = string
type = string
description = "The host path of the OIDC provider."
}

variable "vpc_id" {
type = string
type = string
description = "The VPC ID."
}

variable "account_id" {
type = string
type = string
description = "The AWS account ID."
}

variable "force_update" {
type = bool
default = false
type = bool
default = false
description = "Force Helm resource update through delete/recreate if needed."
}

0 comments on commit f07d57b

Please sign in to comment.