Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/terraform-aws-modules/terraform-aws-managed-service-prometheus

Terraform module to create AWS Managed Service for Prometheus (AMP) resources πŸ‡ΊπŸ‡¦
https://github.com/terraform-aws-modules/terraform-aws-managed-service-prometheus

aws observability prometheus terraform terraform-module

Last synced: 25 days ago
JSON representation

Terraform module to create AWS Managed Service for Prometheus (AMP) resources πŸ‡ΊπŸ‡¦

Awesome Lists containing this project

README

        

# AWS Managed Service for Prometheus (AMP) Terraform module

Terraform module which creates AWS Managed Service for Prometheus (AMP) resources.

## Usage

See [`examples`](https://github.com/terraform-aws-modules/terraform-aws-managed-service-prometheus/tree/master/examples) directory for working examples to reference:

```hcl
module "prometheus" {
source = "terraform-aws-modules/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

Examples codified under the [`examples`](https://github.com/terraform-aws-modules/terraform-aws-managed-service-prometheus/tree/master/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!

- [Complete](https://github.com/terraform-aws-modules/terraform-aws-managed-service-prometheus/tree/master/examples/complete)

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3 |
| [aws](#requirement\_aws) | >= 5.32 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 5.32 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_prometheus_alert_manager_definition.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/prometheus_alert_manager_definition) | resource |
| [aws_prometheus_rule_group_namespace.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/prometheus_rule_group_namespace) | resource |
| [aws_prometheus_workspace.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/prometheus_workspace) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [alert\_manager\_definition](#input\_alert\_manager\_definition) | 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) | `string` | `"alertmanager_config: |\n route:\n receiver: 'default'\n receivers:\n - name: 'default'\n"` | no |
| [create](#input\_create) | Determines whether a resources will be created | `bool` | `true` | no |
| [create\_workspace](#input\_create\_workspace) | Determines whether a workspace will be created or to use an existing workspace | `bool` | `true` | no |
| [kms\_key\_arn](#input\_kms\_key\_arn) | The ARN of the KMS Key to for encryption at rest | `string` | `null` | no |
| [logging\_configuration](#input\_logging\_configuration) | The logging configuration of the prometheus workspace. | `map(string)` | `{}` | no |
| [rule\_group\_namespaces](#input\_rule\_group\_namespaces) | A map of one or more rule group namespace definitions | `map(any)` | `{}` | no |
| [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
| [workspace\_alias](#input\_workspace\_alias) | 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) | `string` | `null` | no |
| [workspace\_id](#input\_workspace\_id) | The ID of an existing workspace to use when `create_workspace` is `false` | `string` | `""` | no |

## Outputs

| Name | Description |
|------|-------------|
| [workspace\_arn](#output\_workspace\_arn) | Amazon Resource Name (ARN) of the workspace |
| [workspace\_id](#output\_workspace\_id) | Identifier of the workspace |
| [workspace\_prometheus\_endpoint](#output\_workspace\_prometheus\_endpoint) | Prometheus endpoint available for this workspace |

## License

Apache-2.0 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-managed-service-prometheus/blob/master/LICENSE).