Module: managed-prometheus
This module is responsible for provisioning a workspace for Amazon Managed Service for Prometheus, also known as Amazon Managed Prometheus (AMP).
Introduction
Amazon Managed Service for Prometheus provides highly available, secure, and managed monitoring for your containers. It automatically scales as your ingestion and query needs grow, and gives you access to remote write metrics from existing Prometheus servers and to query metrics using PromQL.
Deploy this module alongside a managed collector to read metrics from EKS and visualize them with Grafana. For example, see terraform-aws-managed-grafana.
Usage
For a complete example, see examples/complete.
For automated tests of the complete example using bats and Terratest (which tests and deploys the example on AWS), see test.
locals {
grafana_account_id = "123456789012"
}
# Create a standard label resource. See [null-label](https://github.com/cloudposse/terraform-null-label/#terraform-null-label--)
module "label" {
source = "cloudposse/label/null"
# Cloud Posse recommends pinning every module to a specific version, though usually you want to use the current one
# version = "x.x.x"
namespace = "eg"
name = "example"
}
module "prometheus" {
source = "cloudposse/managed-prometheus/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
allowed_account_id = local.grafana_account_id # The ID of another account allowed to access this Managed Prometheus Workspace
scraper_deployed = true
vpc_id = var.vpc_id # The ID of some VPC allowed to access this Managed Prometheus Workspace
context = module.label.this
}
Examples
Here is an example of using this module:
examples/complete
- complete example of using this module