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

Add diff flag to terraform check - #1332

Open
Imran Pochi (ipochi) wants to merge 2 commits into
masterfrom
imran/add-diff-flag-to-terraform-check
Open

Imran Pochi (ipochi) wants to merge 2 commits into
masterfrom
imran/add-diff-flag-to-terraform-check

Conversation

@ipochi

Copy link
Copy Markdown
Member

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

Imran Pochi added 2 commits January 19, 2021 19:26
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 <imran@kinvolk.io>
This commit addresses the files that need to be properly formatted after
running `make check-terraform`

Signed-off-by: Imran Pochi <imran@kinvolk.io>
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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