-
Notifications
You must be signed in to change notification settings - Fork 47
Add diff flag to terraform check #1332
base: master
Are you sure you want to change the base?
Conversation
This commit adds a `-diff` flag to `terraform fmt`, so that the user can see the output what needs to be fixed. Signed-off-by: Imran Pochi <[email protected]>
This commit addresses the files that need to be properly formatted after running `make check-terraform` Signed-off-by: Imran Pochi <[email protected]>
@@ -59,7 +59,7 @@ data "ct_config" "ignitions" { | |||
cluster_domain_suffix = var.cluster_domain_suffix | |||
node_labels = merge({ | |||
"node.kubernetes.io/node" = "", | |||
"lokomotive.alpha.kinvolk.io/bgp-enabled" = format("%t", !var.disable_bgp), | |||
"lokomotive.alpha.kinvolk.io/bgp-enabled" = format("%t", ! var.disable_bgp), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What version of Terraform you use? For me, 0.14.x allows !var.x
formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
terraform version
Terraform v0.13.4
We support 0.13 , so thats what the linter should also use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems GitHub Action agrees with me 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the terraform fmt
should be based on 0.13. Github Actions needs to change.
What do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to proceed here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not even sure why GitHub Action has Terraform already installed actually 😄 But yeah, we can change GitHub action to have 0.13.x then.
This PR adds the adds a
-diff
flag toterraform fmt
, so that the user can see the output what needs to be fixed.