Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run lint on all files #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions alb-internal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "aws_lb" "ecs_internal" {
var.tags,
{
"Terraform" = true,
Name = "ecs-${var.name}-internal"
Name = "ecs-${var.name}-internal"
},
)
}
Expand All @@ -47,7 +47,7 @@ resource "aws_lb_listener" "ecs_https_internal" {
target_group_arn = aws_lb_target_group.ecs_default_https_internal[0].arn
}

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand All @@ -69,7 +69,7 @@ resource "aws_lb_listener" "ecs_test_https_internal" {
#target_group_arn = aws_lb_target_group.ecs_replacement_https[0].arn
target_group_arn = aws_lb_target_group.ecs_default_https_internal[0].arn
}
tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand All @@ -92,7 +92,7 @@ resource "aws_lb_target_group" "ecs_default_https_internal" {
port = 80
protocol = "HTTP"
vpc_id = var.vpc_id
tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand Down
1 change: 0 additions & 1 deletion alb-listener-certificates.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ resource "aws_lb_listener_certificate" "alb_internal" {
listener_arn = element(aws_lb_listener.ecs_https_internal.*.arn, 0)
certificate_arn = var.extra_certificate_arns[count.index]
}

14 changes: 7 additions & 7 deletions alb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "aws_lb" "ecs" {
var.tags,
{
"Terraform" = true,
"Name" = "ecs-${var.name}"
"Name" = "ecs-${var.name}"
},
)
}
Expand All @@ -47,7 +47,7 @@ resource "aws_lb_listener" "ecs_https" {
target_group_arn = aws_lb_target_group.ecs_default_https[0].arn
}

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand All @@ -71,7 +71,7 @@ resource "aws_lb_listener" "ecs_http_redirect" {
status_code = "HTTP_301"
}
}
tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand All @@ -93,7 +93,7 @@ resource "aws_lb_listener" "ecs_test_https" {
#target_group_arn = aws_lb_target_group.ecs_replacement_https[0].arn
target_group_arn = aws_lb_target_group.ecs_default_https[0].arn
}
tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand All @@ -117,7 +117,7 @@ resource "aws_lb_listener" "ecs_test_http_redirect" {
status_code = "HTTP_301"
}
}
tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand All @@ -140,7 +140,7 @@ resource "aws_lb_target_group" "ecs_default_http" {
protocol = "HTTP"
vpc_id = var.vpc_id

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand All @@ -160,7 +160,7 @@ resource "aws_lb_target_group" "ecs_default_https" {
protocol = "HTTP"
vpc_id = var.vpc_id

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand Down
2 changes: 1 addition & 1 deletion cloutwatch-alarms-alb.tf → cloudwatch-alarms-alb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ resource "aws_cloudwatch_metric_alarm" "alb_latency" {
}
}

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand Down
2 changes: 1 addition & 1 deletion cloutwatch-alarms-asg.tf → cloudwatch-alarms-asg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aws_cloudwatch_metric_alarm" "asg_high_cpu" {
AutoScalingGroupName = aws_autoscaling_group.ecs[0].name
}

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand Down
4 changes: 2 additions & 2 deletions cloutwatch-alarms-ecs.tf → cloudwatch-alarms-ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aws_cloudwatch_metric_alarm" "ecs_high_memory" {
ClusterName = aws_ecs_cluster.ecs.name
}

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand Down Expand Up @@ -48,7 +48,7 @@ resource "aws_cloudwatch_metric_alarm" "ecs_high_cpu" {
ClusterName = aws_ecs_cluster.ecs.name
}

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand Down
2 changes: 1 addition & 1 deletion cloutwatch-alarms-efs.tf → cloudwatch-alarms-efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aws_cloudwatch_metric_alarm" "efs_credits_low" {
FileSystemId = aws_efs_file_system.ecs[0].id
}

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand Down
8 changes: 4 additions & 4 deletions ec2-launch-template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resource "aws_launch_template" "ecs" {
create_before_destroy = true
}

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
Expand All @@ -45,18 +45,18 @@ resource "tls_private_key" "algorithm" {
count = var.ec2_key_enabled ? 1 : 0
algorithm = "RSA"
rsa_bits = 4096

}

resource "aws_key_pair" "generated_key" {
count = var.ec2_key_enabled ? 1 : 0
key_name = "${var.name}-key"
public_key = tls_private_key.algorithm[0].public_key_openssh

tags = merge(
tags = merge(
var.tags,
{
"Terraform" = true
},
)
}
}
2 changes: 1 addition & 1 deletion ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_ecs_cluster" "ecs" {
)
lifecycle {
ignore_changes = []

}
}

Expand Down
4 changes: 2 additions & 2 deletions efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ resource "aws_security_group" "efs" {
description = "for EFS to talk to ECS cluster"
vpc_id = var.vpc_id

tags = merge(

tags = merge(
var.tags,
{
Name = "ecs-efs-${var.name}"
Expand Down
2 changes: 1 addition & 1 deletion iam-codedeploy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ EOF
resource "aws_iam_role_policy_attachment" "codedeploy_service" {
role = aws_iam_role.codedeploy_service.name
policy_arn = "arn:aws:iam::aws:policy/AWSCodeDeployRoleForECS"
}
}
2 changes: 1 addition & 1 deletion iam-ecs-task.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ resource "aws_iam_role_policy_attachment" "extra_task_policies_arn" {
for_each = toset(try(var.extra_task_policies_arn, []))
role = aws_iam_role.ecs_task.name
policy_arn = each.key
}
}
2 changes: 1 addition & 1 deletion iam-ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "aws_iam_instance_profile" "ecs" {
count = var.fargate_only ? 0 : 1
name = "ecs-${var.name}-${data.aws_region.current.name}"
role = aws_iam_role.ecs[0].name
tags = merge(
tags = merge(
var.tags,
{
"terraform" = "true"
Expand Down
4 changes: 2 additions & 2 deletions sg-alb-internal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ resource "aws_security_group" "alb_internal" {
description = "SG for ECS Internal ALB"
vpc_id = var.vpc_id

tags = merge(
tags = merge(
var.tags,
{
terraform = "true"
Name = "ecs-${var.name}-lb"
Name = "ecs-${var.name}-lb"
},
)
}
Expand Down
4 changes: 2 additions & 2 deletions sg-alb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ resource "aws_security_group" "alb" {
description = "SG for ECS ALB"
vpc_id = var.vpc_id

tags = merge(
tags = merge(
var.tags,
{
terraform = "true"
Name = "ecs-${var.name}-lb"
Name = "ecs-${var.name}-lb"
},
)
}
Expand Down
4 changes: 2 additions & 2 deletions sg-ecs-nodes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ resource "aws_security_group" "ecs_nodes" {
description = "SG for ECS nodes"
vpc_id = var.vpc_id

tags = merge(
tags = merge(
var.tags,
{
terraform = "true"
Name = "ecs-${var.name}-nodes"
Name = "ecs-${var.name}-nodes"
},
)
}
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform {
required_version = ">= 0.13.0"
}
}
6 changes: 3 additions & 3 deletions waf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ resource "aws_wafv2_web_acl" "waf_alb" {
}
}

tags = merge(
tags = merge(
var.tags,
{
terraform = "true"
Name = "waf-${var.name}-web-application"
Name = "waf-${var.name}-web-application"
},
)

Expand All @@ -86,4 +86,4 @@ resource "aws_wafv2_web_acl_association" "waf_alb_association" {
count = var.alb && var.wafv2_enable ? 1 : 0
resource_arn = aws_lb.ecs[0].arn
web_acl_arn = aws_wafv2_web_acl.waf_alb[0].arn
}
}
Loading