Skip to content

Commit

Permalink
terraform_fmt, only white space changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoucgitter committed Oct 14, 2024
1 parent cdb8141 commit f5551dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion modules/aws_autoscaling/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ data "aws_iam_policy_document" "worker_autoscaling" {
"autoscaling:SetDesiredCapacity",
"autoscaling:TerminateInstanceInAutoScalingGroup",
"autoscaling:UpdateAutoScalingGroup"

]

resources = ["*"]
Expand Down
12 changes: 6 additions & 6 deletions modules/aws_vm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ resource "aws_instance" "vm" {
delete_on_termination = var.os_disk_delete_on_termination
iops = var.os_disk_iops
encrypted = var.enable_ebs_encryption
tags = merge(
{
Name : "${var.name}-root-vol"
},
var.tags
)
tags = merge(
{
Name : "${var.name}-root-vol"
},
var.tags
)
}

tags = merge(var.tags, tomap({ Name : "${var.name}-vm" }))
Expand Down
8 changes: 4 additions & 4 deletions modules/aws_vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ locals {
vpc_id = var.vpc_id == null ? aws_vpc.vpc[0].id : data.aws_vpc.vpc[0].id
existing_subnets = length(var.existing_subnet_ids) > 0 ? true : false

existing_public_subnets = local.existing_subnets && contains(keys(var.existing_subnet_ids), "public") ? (length(var.existing_subnet_ids["public"]) > 0 ? true : false) : false
existing_private_subnets = local.existing_subnets && contains(keys(var.existing_subnet_ids), "private") ? (length(var.existing_subnet_ids["private"]) > 0 ? true : false) : false
existing_database_subnets = local.existing_subnets && contains(keys(var.existing_subnet_ids), "database") ? (length(var.existing_subnet_ids["database"]) > 0 ? true : false) : false
existing_public_subnets = local.existing_subnets && contains(keys(var.existing_subnet_ids), "public") ? (length(var.existing_subnet_ids["public"]) > 0 ? true : false) : false
existing_private_subnets = local.existing_subnets && contains(keys(var.existing_subnet_ids), "private") ? (length(var.existing_subnet_ids["private"]) > 0 ? true : false) : false
existing_database_subnets = local.existing_subnets && contains(keys(var.existing_subnet_ids), "database") ? (length(var.existing_subnet_ids["database"]) > 0 ? true : false) : false
existing_control_plane_subnets = local.existing_subnets && contains(keys(var.existing_subnet_ids), "control_plane") ? (length(var.existing_subnet_ids["control_plane"]) > 0 ? true : false) : false

# public_subnets = local.existing_public_subnets ? data.aws_subnet.public : aws_subnet.public # not used keeping for ref
private_subnets = local.existing_private_subnets ? data.aws_subnet.private : aws_subnet.private
private_subnets = local.existing_private_subnets ? data.aws_subnet.private : aws_subnet.private
control_plane_subnets = local.existing_control_plane_subnets ? data.aws_subnet.control_plane : aws_subnet.control_plane

# Use private subnets if we are not creating db subnets and there are no existing db subnets
Expand Down

0 comments on commit f5551dc

Please sign in to comment.