Skip to content

Commit

Permalink
tidy code
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhanmer committed Oct 29, 2024
1 parent d15c7e2 commit 9422527
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion steps/init/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "aws_cloudwatch_log_group" "log_group" {
name = "/aws/fis/${var.panda_name}-fis-logs"
name = "/aws/fis/${var.panda_name}-fis-logs"
retention_in_days = 1
}
4 changes: 2 additions & 2 deletions steps/init/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "aws_iam_policy_attachment" "ec2_fis_policy_attachment" {
resource "aws_iam_policy" "cloudwatch_logs_policy" {
name = "${var.panda_name}_cloudwatch_logs_policy"
description = "Policy to allow CloudWatch log group and log stream access"
policy = jsonencode({
policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Expand All @@ -36,7 +36,7 @@ resource "aws_iam_policy" "cloudwatch_logs_policy" {
"logs:CreateLogDelivery",
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
"logs:PutLogEvents"
],
Resource = [
"*"
Expand Down
6 changes: 3 additions & 3 deletions steps/step02/asg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ resource "aws_launch_template" "this" {
resource_type = "instance"
tags = {
Name = "${var.panda_name}-${local.experiment}"
Project = "${local.resource_suffix}"
Panda = var.panda_name
Project = "${local.resource_suffix}"
Panda = var.panda_name
Experiment = local.experiment
}
}
Expand All @@ -47,7 +47,7 @@ resource "aws_autoscaling_group" "this" {

load_balancers = [aws_elb.this.id]

health_check_type = "ELB"
health_check_type = "ELB"
}

locals {
Expand Down
4 changes: 2 additions & 2 deletions steps/step02/elb.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "aws_elb" "this" {
name = replace("${local.experiment}-${var.panda_name}-elb", "_", "-")
subnets = data.terraform_remote_state.base_config.outputs.public_subnet_ids
name = replace("${local.experiment}-${var.panda_name}-elb", "_", "-")
subnets = data.terraform_remote_state.base_config.outputs.public_subnet_ids

security_groups = [data.terraform_remote_state.base_config.outputs.vpc_security_group_id]

Expand Down
2 changes: 1 addition & 1 deletion steps/step03/alarm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resource "aws_cloudwatch_metric_alarm" "lb_alarm" {
threshold = "10"
alarm_description = "This metric monitors the number of healthy hosts."
datapoints_to_alarm = "2"
treat_missing_data = "notBreaching"
treat_missing_data = "notBreaching"

dimensions = {
LoadBalancerName = "${aws_elb.this.name}"
Expand Down

0 comments on commit 9422527

Please sign in to comment.