Skip to content

Commit

Permalink
Added prettifyer helper command and prettifyed tf-files (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
claesgill committed Sep 21, 2020
1 parent 1dc6ef6 commit 1a2cc80
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

### Added

- Added command that formats/prettify all `.tf`-files in directory #21
- Added check for consul and terraform binary in the `Makefile` #20

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ clean: destroy-box remove-tmp
# helper commands
update-box:
@SSL_CERT_FILE=${SSL_CERT_FILE} CURL_CA_BUNDLE=${CURL_CA_BUNDLE} vagrant box update || (echo '\n\nIf you get an SSL error you might be behind a transparent proxy. \nMore info https://github.com/fredrikhgrelland/vagrant-hashistack/blob/master/README.md#proxy\n\n' && exit 2)

prettify:
@terraform fmt -recursive && echo Trying to prettify all .tf files.
2 changes: 1 addition & 1 deletion example/vagrant_box_example/nomad_acl.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
data "vault_generic_secret" "nomad_secret_id" {
# Set count of this data source to 1 if ACLs are enabled in Nomad, and 0 if not
count = var.nomad_acl ? 1 : 0
path = "nomad/creds/write"
path = "nomad/creds/write"
}

provider "nomad" {
Expand Down
2 changes: 1 addition & 1 deletion template_example/example/standalone/nomad_acl.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
data "vault_generic_secret" "nomad_secret_id" {
# Set count of this data source to 1 if ACLs are enabled in Nomad, and 0 if not
count = var.nomad_acl ? 1 : 0
path = "nomad/creds/write"
path = "nomad/creds/write"
}

provider "nomad" {
Expand Down
2 changes: 1 addition & 1 deletion template_example/example/standalone/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "nomad_acl" {
type = bool
type = bool
description = "Nomad ACLs enabled/disabled"
}
2 changes: 1 addition & 1 deletion template_example/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "nomad_job" "countdash" {
jobspec = file("${path.module}/conf/nomad/countdash.hcl")
detach = false
detach = false
}
2 changes: 1 addition & 1 deletion template_example/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "nomad_job" {
value = nomad_job.countdash
value = nomad_job.countdash
description = "The countdash nomad job object"
}

0 comments on commit 1a2cc80

Please sign in to comment.