Manages an Amazon Managed Service for Prometheus (AMP) Alert Manager Definition
resource "aws_prometheus_workspace" "demo" {
}
resource "aws_prometheus_alert_manager_definition" "demo" {
workspace_id = aws_prometheus_workspace.demo.id
definition = <<EOF
alertmanager_config: |
route:
receiver: 'default'
receivers:
- name: 'default'
EOF
}
This resource supports the following arguments:
workspace_id
- (Required) ID of the prometheus workspace the alert manager definition should be linked todefinition
- (Required) the alert manager definition that you want to be applied. See more in AWS Docs.This resource exports no additional attributes.
In Terraform v1.5.0 and later, use an import
block to import the prometheus alert manager definition using the workspace identifier. For example:
import {
to = aws_prometheus_alert_manager_definition.demo
id = "ws-C6DCB907-F2D7-4D96-957B-66691F865D8B"
}
Using terraform import
, import the prometheus alert manager definition using the workspace identifier. For example:
% terraform import aws_prometheus_alert_manager_definition.demo ws-C6DCB907-F2D7-4D96-957B-66691F865D8B