Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 68b9b94

Browse files
authored
Merge pull request #114 from PascalBourdier/fix-fmt
Fix fmt
2 parents 0b728fd + 2c5f1bd commit 68b9b94

File tree

8 files changed

+26
-11
lines changed

8 files changed

+26
-11
lines changed

.circleci/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
---
12
version: 2
23
jobs:
4+
validate_terraform:
5+
docker:
6+
- image: hashicorp/terraform
7+
steps:
8+
- checkout
9+
- run:
10+
name: Validate Terraform Formatting
11+
command: "[ -z \"$(terraform fmt -write=false)\" ] || { terraform fmt -write=false -diff; exit 1; }"
12+
313
build:
414
machine: true
515
# Changing default working dir to the one used for the go path configuration

examples/vault-auto-unseal/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ module "vault_cluster" {
3434
# This setting will create the AWS policy that allows the vault cluster to
3535
# access KMS and use this key for encryption and decryption
3636
enable_auto_unseal = true
37+
3738
auto_unseal_kms_key_arn = "${data.aws_kms_alias.vault-example.target_key_arn}"
3839

3940
# To make testing easier, we allow requests from any IP address here but in a production deployment, we *strongly*
@@ -70,8 +71,8 @@ data "template_file" "user_data_vault_cluster" {
7071
consul_cluster_tag_key = "${var.consul_cluster_tag_key}"
7172
consul_cluster_tag_value = "${var.consul_cluster_name}"
7273

73-
kms_key_id = "${data.aws_kms_alias.vault-example.target_key_id}"
74-
aws_region = "${data.aws_region.current.name}"
74+
kms_key_id = "${data.aws_kms_alias.vault-example.target_key_id}"
75+
aws_region = "${data.aws_region.current.name}"
7576
}
7677
}
7778

examples/vault-cluster-private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ data "template_file" "user_data_vault_cluster" {
7474
module "security_group_rules" {
7575
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-client-security-group-rules?ref=v0.4.0"
7676

77-
security_group_id = "${module.vault_cluster.security_group_id}"
77+
security_group_id = "${module.vault_cluster.security_group_id}"
7878

7979
# To make testing easier, we allow requests from any IP address here but in a production deployment, we *strongly*
8080
# recommend you limit this to the IP address ranges of known, trusted servers inside your VPC.

examples/vault-ec2-auth/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,12 @@ data "template_file" "user_data_vault_cluster" {
126126
consul_cluster_tag_key = "${var.consul_cluster_tag_key}"
127127
consul_cluster_tag_value = "${var.consul_cluster_name}"
128128
example_role_name = "${var.example_role_name}"
129+
129130
# Please note that normally we would never pass a secret this way
130131
# This is just for test purposes so we can verify that our example instance is authenticating correctly
131-
example_secret = "${var.example_secret}"
132-
ami_id = "${var.ami_id}"
132+
example_secret = "${var.example_secret}"
133+
134+
ami_id = "${var.ami_id}"
133135
}
134136
}
135137

examples/vault-s3-backend/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ data "template_file" "user_data_vault_cluster" {
7979
module "security_group_rules" {
8080
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-client-security-group-rules?ref=v0.4.0"
8181

82-
security_group_id = "${module.vault_cluster.security_group_id}"
82+
security_group_id = "${module.vault_cluster.security_group_id}"
8383

8484
# To make testing easier, we allow requests from any IP address here but in a production deployment, we *strongly*
8585
# recommend you limit this to the IP address ranges of known, trusted servers inside your VPC.

examples/vault-s3-backend/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ output "consul_cluster_cluster_tag_value" {
8484

8585
output "s3_bucket_arn" {
8686
value = "${module.vault_cluster.s3_bucket_arn}"
87-
}
87+
}

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ data "template_file" "user_data_vault_cluster" {
117117
module "security_group_rules" {
118118
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-client-security-group-rules?ref=v0.4.0"
119119

120-
security_group_id = "${module.vault_cluster.security_group_id}"
120+
security_group_id = "${module.vault_cluster.security_group_id}"
121121

122122
# To make testing easier, we allow requests from any IP address here but in a production deployment, we *strongly*
123123
# recommend you limit this to the IP address ranges of known, trusted servers inside your VPC.

modules/vault-cluster/main.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,17 @@ data "aws_iam_policy_document" "vault_s3" {
249249
}
250250

251251
data "aws_iam_policy_document" "vault_auto_unseal_kms" {
252-
count = "${var.enable_auto_unseal ? 1 : 0}"
252+
count = "${var.enable_auto_unseal ? 1 : 0}"
253253

254254
statement {
255-
effect = "Allow"
255+
effect = "Allow"
256+
256257
actions = [
257258
"kms:Encrypt",
258259
"kms:Decrypt",
259-
"kms:DescribeKey"
260+
"kms:DescribeKey",
260261
]
262+
261263
resources = ["${var.auto_unseal_kms_key_arn}"]
262264
}
263265
}

0 commit comments

Comments
 (0)