Module library

Managed Service for Prometheus

Terraform module to create AWS Managed Service for Prometheus (AMP) resources

Inputs

20
alert_manager_definitionoptionalstring

The alert manager definition that you want to be applied. See more in the [AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-alert-manager.html)

Defaultalertmanager_config: | route: receiver: 'default' receivers: - name: 'default'
cloudwatch_log_group_classoptionalstring

Specified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS`

Defaultnull
cloudwatch_log_group_kms_key_idoptionalstring

If a KMS Key ARN is set, this key will be used to encrypt the corresponding log group. Please be sure that the KMS Key has an appropriate key policy (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html)

Defaultnull
cloudwatch_log_group_nameoptionalstring

Custom name of CloudWatch log group for a service associated with the container definition

Defaultnull
cloudwatch_log_group_retention_in_daysoptionalnumber

Number of days to retain log events. Set to `0` to keep logs indefinitely

Default30
cloudwatch_log_group_use_name_prefixoptionalbool

Determines whether the log group name should be used as a prefix

Defaultfalse
createoptionalbool

Determines whether a resources will be created

Defaulttrue
create_alert_manageroptionalbool

Controls whether an Alert Manager definition is created along with the AMP workspace

Defaulttrue
create_resource_policyoptionalbool

Controls whether a resource policy is created along with the AMP workspace

Defaulttrue
create_workspaceoptionalbool

Determines whether a workspace will be created or to use an existing workspace

Defaulttrue
kms_key_arnoptionalstring

The ARN of the KMS Key to for encryption at rest

Defaultnull
limits_per_label_setoptionallist(object({ label_set = map(string) limits = object({ max_series = number }) }…

Configuration block for setting limits on metrics with specific label sets

Defaultnull
logging_configurationoptionalobject({ create_log_group = optional(bool, true) log_group_arn = optional(string…

The logging configuration of the prometheus workspace.

Defaultnull
regionoptionalstring

Region where the resource(s) will be managed. Defaults to the Region set in the provider configuration

Defaultnull
resource_policy_statementsoptionalmap(object({ sid = optional(string) actions = optional(list(string)) not_actions…

A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage

Defaultnull
retention_period_in_daysoptionalnumber

Number of days to retain metric data in the workspace

Defaultnull
rule_group_namespacesoptionalmap(object({ name = string data = string }))

A map of one or more rule group namespace definitions

Defaultnull
tagsoptionalmap(string)

A map of tags to add to all resources

Default{}
workspace_aliasoptionalstring

The alias of the prometheus workspace. See more in the [AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html)

Defaultnull
workspace_idoptionalstring

The ID of an existing workspace to use when `create_workspace` is `false`

Default""

All 20 are optional — the module deploys with none of them set.

Outputs

3
workspace_arn

Amazon Resource Name (ARN) of the workspace

workspace_id

Identifier of the workspace

workspace_prometheus_endpoint

Prometheus endpoint available for this workspace

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.