Skip to content

Commit

Permalink
[CC-26984] metric-export: add resource for prometheus integration
Browse files Browse the repository at this point in the history
This change introduces resource MetricExportPrometheusConfig which manages
prometheus metric export integration in gcp and aws cloud providers.
  • Loading branch information
aa-joshi committed Apr 12, 2024
1 parent 9c26a15 commit c73dc29
Show file tree
Hide file tree
Showing 9 changed files with 667 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.5.0] - 2024-04-12

## Added

- New `cockroach_metric_export_prometheus_config` resource allows user to configure prometheus metric
export integration in AWS and GCP cloud providers.

## [1.4.1] - 2024-04-04

## Added
Expand Down
35 changes: 35 additions & 0 deletions docs/resources/metric_export_prometheus_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cockroach_metric_export_prometheus_config Resource - terraform-provider-cockroach"
subcategory: ""
description: |-
Prometheus metric export configuration for a cluster.
---

# cockroach_metric_export_prometheus_config (Resource)

Prometheus metric export configuration for a cluster.

## Example Usage

```terraform
variable "cluster_id" {
type = string
}
resource "cockroach_metric_export_prometheus_config" "example" {
id = var.cluster_id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Cluster ID.

### Read-Only

- `status` (String) Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
- `user_message` (String) Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
variable "cluster_id" {
type = string
}

resource "cockroach_metric_export_prometheus_config" "example" {
id = var.cluster_id
}
4 changes: 4 additions & 0 deletions examples/workflows/cockroach_metric_export/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,8 @@ resource "cockroach_metric_export_datadog_config" "example" {
id = cockroach_cluster.example.id
site = var.datadog_site
api_key = var.datadog_api_key
}

resource "cockroach_metric_export_prometheus_config" "example" {
id = cockroach_cluster.example.id
}
4 changes: 4 additions & 0 deletions examples/workflows/cockroach_metric_export/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ resource "cockroach_metric_export_datadog_config" "example" {
site = var.datadog_site
api_key = var.datadog_api_key
}

resource "cockroach_metric_export_prometheus_config" "example" {
id = cockroach_cluster.example.id
}
Loading

0 comments on commit c73dc29

Please sign in to comment.