module "earthquake_pager" {
source = "https://github.com/vincenttjia/terraform-aws-bmkg-earthquake-pager?ref=v0.0.2"
name = "bmkg-gempa-notifier"
# You can pick any point of interest you would like, use google maps to get the coordinates.
# I just use the coordinates under the text of West Jakarta in Google maps.
anchor_latitude = "-6.167435"
anchor_longitude = "106.763709"
notify_radius_in_km = 200
minimum_sr = 0
escalation_plan_arn = "arn:aws:ssm-contacts:ap-southeast-1:123456789012:contact/gempa"
}
- Go to this console https://ap-southeast-1.console.aws.amazon.com/systems-manager/incidents/prepare/home?region=ap-southeast-1#/ and setup AWS Incident Manager (unfortunately it's not supported in terraform yet)
- Setup Contact details and Escalation plans Until it shows something similar as below
to get the arn go to https://ap-southeast-1.console.aws.amazon.com/systems-manager/incidents/engagement/home?region=ap-southeast-1#/escalationplans, select your escalation plan and copy the arn as shown below
- Use the example and change the escalation plan arn, feel free to change any other variables you like
terraform init
terraform apply
No requirements.
Name | Version |
---|---|
aws | n/a |
Name | Source | Version |
---|---|---|
lambda | terraform-aws-modules/lambda/aws | 4.7.1 |
Name | Type |
---|---|
aws_iam_role.eventbridge | resource |
aws_iam_role_policy.eventbridge | resource |
aws_scheduler_schedule.example | resource |
aws_iam_policy_document.eventbridge | data source |
aws_iam_policy_document.eventbridge_trustpolicy | data source |
aws_iam_policy_document.lambda_role | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
anchor_latitude | The latitude of the anchor point. | string |
n/a | yes |
anchor_longitude | The longitude of the anchor point. | string |
n/a | yes |
bmkg_endpoint | The endpoint for BMKG Gempa API. | string |
"https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json" |
no |
cloudwatch_logs_retention_in_days | The number of days to retain logs. | number |
14 |
no |
escalation_plan_arn | The ARN of the escalation plan. | string |
n/a | yes |
lambda_arhictecture | The architecture of the Lambda function. Valid values are x86_64 and arm64. | list(string) |
[ |
no |
minimum_sr | The minimum SR to notify. | number |
n/a | yes |
name | The name for the Lambda function. | string |
"bmkg-gempa-notifier" |
no |
notify_radius_in_km | The radius in kilometer to notify. | number |
n/a | yes |
No outputs.