From 7842a4535acb76ed2cd2a7da7cd10fe5caf1547c Mon Sep 17 00:00:00 2001 From: Scott Lowe Date: Wed, 18 Oct 2017 08:59:59 -0600 Subject: [PATCH] Update formatting Update formatting of all Terraform configurations per `terraform fmt` Signed-off-by: Scott Lowe --- terraform/aws/asg-elb/data.tf | 24 ++++++----- terraform/aws/asg-elb/main.tf | 64 +++++++++++++++--------------- terraform/aws/asg-elb/output.tf | 2 +- terraform/aws/asg-elb/provider.tf | 2 +- terraform/aws/asg-elb/variables.tf | 16 ++++---- 5 files changed, 55 insertions(+), 53 deletions(-) diff --git a/terraform/aws/asg-elb/data.tf b/terraform/aws/asg-elb/data.tf index 57bf5e5..5e17505 100644 --- a/terraform/aws/asg-elb/data.tf +++ b/terraform/aws/asg-elb/data.tf @@ -1,16 +1,18 @@ data "aws_ami" "atomic_ami" { - most_recent = true - owners = ["410186602215"] - filter { - name = "name" - values = ["CentOS Atomic Host 7*"] - } - filter { - name = "virtualization-type" - values = ["hvm"] - } + most_recent = true + owners = ["410186602215"] + + filter { + name = "name" + values = ["CentOS Atomic Host 7*"] + } + + filter { + name = "virtualization-type" + values = ["hvm"] + } } data "aws_vpc" "default_vpc" { - default = true + default = true } diff --git a/terraform/aws/asg-elb/main.tf b/terraform/aws/asg-elb/main.tf index 5b9f721..01f1ef2 100644 --- a/terraform/aws/asg-elb/main.tf +++ b/terraform/aws/asg-elb/main.tf @@ -1,47 +1,47 @@ # Create an ELB resource "aws_elb" "elb" { - name = "elb-test" - subnets = ["subnet-69e39630","subnet-e0702d97","subnet-c4e9d6a1"] - cross_zone_load_balancing = true - connection_draining = true - security_groups = ["${var.secgrp}"] + name = "elb-test" + subnets = ["subnet-69e39630", "subnet-e0702d97", "subnet-c4e9d6a1"] + cross_zone_load_balancing = true + connection_draining = true + security_groups = ["${var.secgrp}"] - listener { - instance_port = "22" - instance_protocol = "tcp" - lb_port = "22" - lb_protocol = "tcp" - } + listener { + instance_port = "22" + instance_protocol = "tcp" + lb_port = "22" + lb_protocol = "tcp" + } - tags { - Name = "elb-test" - } + tags { + Name = "elb-test" + } } # Create a launch configuration resource "aws_launch_configuration" "lc" { - name = "lc-test" - image_id = "${data.aws_ami.atomic_ami.id}" - instance_type = "${var.flavor}" - security_groups = ["${var.secgrp}"] - key_name = "${var.keypair}" + name = "lc-test" + image_id = "${data.aws_ami.atomic_ami.id}" + instance_type = "${var.flavor}" + security_groups = ["${var.secgrp}"] + key_name = "${var.keypair}" - lifecycle { - create_before_destroy = true - } + lifecycle { + create_before_destroy = true + } } # Create an Auto Scaling group resource "aws_autoscaling_group" "asg" { - name = "asg-test" - availability_zones = ["us-west-2a","us-west-2b","us-west-2c"] - min_size = "2" - max_size = "2" - desired_capacity = "2" - launch_configuration = "${aws_launch_configuration.lc.name}" - load_balancers = ["${aws_elb.elb.name}"] + name = "asg-test" + availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"] + min_size = "2" + max_size = "2" + desired_capacity = "2" + launch_configuration = "${aws_launch_configuration.lc.name}" + load_balancers = ["${aws_elb.elb.name}"] - lifecycle { - create_before_destroy = true - } + lifecycle { + create_before_destroy = true + } } diff --git a/terraform/aws/asg-elb/output.tf b/terraform/aws/asg-elb/output.tf index a44639f..0878e59 100644 --- a/terraform/aws/asg-elb/output.tf +++ b/terraform/aws/asg-elb/output.tf @@ -1,3 +1,3 @@ output "elb_dns_name" { - value = ["${aws_elb.elb.dns_name}"] + value = ["${aws_elb.elb.dns_name}"] } diff --git a/terraform/aws/asg-elb/provider.tf b/terraform/aws/asg-elb/provider.tf index d7c130e..28d3bb0 100644 --- a/terraform/aws/asg-elb/provider.tf +++ b/terraform/aws/asg-elb/provider.tf @@ -1,3 +1,3 @@ provider "aws" { - region = "${var.user_region}" + region = "${var.user_region}" } diff --git a/terraform/aws/asg-elb/variables.tf b/terraform/aws/asg-elb/variables.tf index 5108f1c..d5f9fb1 100644 --- a/terraform/aws/asg-elb/variables.tf +++ b/terraform/aws/asg-elb/variables.tf @@ -1,19 +1,19 @@ variable "user_region" { - type = "string" - description = "AWS region in which all resources will be created" + type = "string" + description = "AWS region in which all resources will be created" } variable "keypair" { - type = "string" - description = "AWS SSH keypair to use to connect to instances" + type = "string" + description = "AWS SSH keypair to use to connect to instances" } variable "flavor" { - type = "string" - description = "AWS type to use when creating instances" + type = "string" + description = "AWS type to use when creating instances" } variable "secgrp" { - type = "string" - description = "ID of VPC security group to use" + type = "string" + description = "ID of VPC security group to use" }