Skip to content

Resource: awsPrometheusAlertManagerDefinition

Manages an Amazon Managed Service for Prometheus (AMP) Alert Manager Definition

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsPrometheusWorkspaceDemo =
  new aws.prometheusWorkspace.PrometheusWorkspace(this, "demo", {});
const awsPrometheusAlertManagerDefinitionDemo =
  new aws.prometheusAlertManagerDefinition.PrometheusAlertManagerDefinition(
    this,
    "demo_1",
    {
      definition:
        "alertmanager_config: |\n  route:\n    receiver: 'default'\n  receivers:\n    - name: 'default'\n",
      workspaceId: awsPrometheusWorkspaceDemo.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsPrometheusAlertManagerDefinitionDemo.overrideLogicalId("demo");

Argument Reference

The following arguments are supported:

  • workspaceId - (Required) ID of the prometheus workspace the alert manager definition should be linked to
  • definition - (Required) the alert manager definition that you want to be applied. See more in AWS Docs.

Attributes Reference

No additional attributes are exported.

Import

The prometheus alert manager definition can be imported using the workspace identifier, e.g.,

$ terraform import aws_prometheus_alert_manager_definition.demo ws-C6DCB907-F2D7-4D96-957B-66691F865D8B