Terraform module which creates AWS Managed Service for Prometheus (AMP) resources.
See examples
directory for working examples to reference:
module "prometheus" {
source = "clowdhaus/managed-service-prometheus/aws"
workspace_alias = "example"
alert_manager_definition = <<-EOT
alertmanager_config: |
route:
receiver: 'default'
receivers:
- name: 'default'
EOT
rule_group_namespaces = {
first = {
name = "rule-01"
data = <<-EOT
groups:
- name: test
rules:
- record: metric:recording_rule
expr: avg(rate(container_cpu_usage_seconds_total[5m]))
EOT
}
second = {
name = "rule-02"
data = <<-EOT
groups:
- name: test
rules:
- record: metric:recording_rule
expr: avg(rate(container_cpu_usage_seconds_total[5m]))
EOT
}
}
}
Examples codified under the examples
are intended to give users references for how to use the module(s) as well as testing/validating changes to the source code of the module. If contributing to the project, please be sure to make any appropriate updates to the relevant examples to allow maintainers to test your changes and to keep the examples up to date for users. Thank you!
Name | Version |
---|---|
terraform | >= 0.13.1 |
aws | >= 3.64 |
Name | Version |
---|---|
aws | >= 3.64 |
No modules.
Name | Type |
---|---|
aws_prometheus_alert_manager_definition.this | resource |
aws_prometheus_rule_group_namespace.this | resource |
aws_prometheus_workspace.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
alert_manager_definition | The alert manager definition that you want to be applied. See more in the AWS Docs | string |
null |
no |
create | Determines whether a resources will be created | bool |
true |
no |
rule_group_namespaces | A map of one or more rule group namespace definitions | map(any) |
{} |
no |
workspace_alias | The alias of the prometheus workspace. See more in the AWS Docs | string |
null |
no |
Name | Description |
---|---|
workspace_arn | Amazon Resource Name (ARN) of the workspace |
workspace_id | Identifier of the workspace |
workspace_prometheus_endpoint | Prometheus endpoint available for this workspace |
Apache-2.0 Licensed. See LICENSE.