Hello,
i created next module:
variable "alias" {
type = string
}
variable "phone_number" {
type = string
}
resource "aws_ssmcontacts_contact" "contact" {
alias = var.alias
display_name = upper(replace(var.alias, "-", " "))
type = "PERSONAL"
}
resource "aws_ssmcontacts_plan" "plan" {
contact_id = aws_ssmcontacts_contact.contact.arn
stage {
duration_in_minutes = 1
}
}
resource "aws_ssmcontacts_contact_channel" "channel" {
contact_id = aws_ssmcontacts_contact.contact.arn
delivery_address {
simple_address = var.phone_number
}
name = "External call number for ${upper(replace(var.alias, "-", " "))}"
type = "VOICE"
}
resource "aws_ssmcontacts_contact" "escalation_plan" {
alias = "${var.alias}-escalation"
type = "ESCALATION"
}
resource "aws_ssmcontacts_plan" "escalation_plan" {
contact_id = aws_ssmcontacts_contact.escalation_plan.arn
stage {
duration_in_minutes = 0
target {
contact_target_info {
is_essential = true
contact_id = aws_ssmcontacts_contact.contact.arn
}
}
}
}
resource "aws_ssmincidents_response_plan" "plan" {
name = "${var.alias}-plan"
incident_template {
title = "call_to_${var.alias}"
impact = "1"
# dedupe_string = "dedupe"
}
display_name = "Call to ${upper(replace(var.alias, "-", " "))}"
engagements = [aws_ssmcontacts_contact.escalation_plan.arn]
}
and i’ve activated phone number and thru AWS test passes, i’m receving call.
But in Engagement Plan there are no records at all…
How it is possible to create engagement plan with AWS provider?