Menu

1 / 6

Day 100: An Alarm With No Subscriber and App Gateway Built in Seconds

DEV Community: terraform·Nnamdi Felix Ibe·about 8 hours ago
#Vb2wfgh0
#devtoterraform#devto#dev#gateway#alarm
Long article (1763 words) — no AI summary yet.
Reading 0:00
15s threshold

Day 100 of DevOps, Day 50 of Azure. The last ones, and the two halves, say opposite things about the hundred.

The Terraform half is the third task running, whose final link is missing. The Azure half is the same Application Gateway I built on Day 43, done in a fraction of the time, because the things that cost me then were written down.

One Terraform task, one Azure task. A CloudWatch alarm, then a gateway distributing traffic across two VMs. The tasks come from the KodeKloud Engineer platform.

Task 1: A CloudWatch alarm on EC2 CPU

An instance and an alarm at 90 per cent CPU, notifying an SNS topic that already exists.

Step 1: The configuration

resource "aws_cloudwatch_metric_alarm" "devops_alarm" { alarm_name = "devops-alarm" comparison_operator = "GreaterThanOrEqualToThreshold" evaluation_periods = 1 metric_name = "CPUUtilization" namespace = "AWS/EC2" period = 300 statistic = "Average" threshold = 90

dimensions = { InstanceId = aws_instance . devops_ec2 . id } alarm_actions = [ aws_sns_topic .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.