Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Add diff flag to terraform check #1332

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ipochi
Copy link
Member

@ipochi ipochi commented Jan 19, 2021

This PR adds the adds a -diff flag to terraform fmt, so that the user can see the output what needs to be fixed.

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]>
@ipochi ipochi requested a review from invidian January 19, 2021 14:02
@@ -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),
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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 😄

Copy link
Member Author

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 ?

Copy link
Member

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 🤔

Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants