-
Notifications
You must be signed in to change notification settings - Fork 0
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
WIP Upgrade aws provider to 5.x. Create SNS Topic, SNS Sub, and Cloudwatch alarm for worker instance StatusCheckFailed #12
base: main
Are you sure you want to change the base?
Conversation
tags = { | ||
Name = "${var.project_environment}-${var.project_name}" | ||
} | ||
tags_all = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tricia, what is the difference between these?
@@ -76,7 +76,7 @@ resource "aws_lb_target_group" "production" { | |||
vpc_id = aws_vpc.production-internal.id | |||
health_check { | |||
enabled = true | |||
matcher = "200,301" | |||
matcher = "200" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe change this back or investigate using https for health check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internally we should have a health check endpoint that is better than / and should not redirect. The actual endpoints it is checking are not https, but they will redirect if they think they are being called over http. We might be able to override that by setting X-Forwarded-By and similar
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/x-forwarded-headers.html
resource "aws_sns_topic_subscription" "ec2-alarm_email_target" { | ||
topic_arn = aws_sns_topic.ec2-alarm.arn | ||
protocol = "email" | ||
endpoint = "alerts@tenforwardconsulting.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a variable instead of hard coded
Setting up a cloudwatch alarm for ec2 instance statuscheckfailed, currently just on the worker but we might as well do it on web instances too
TODO: