Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOUDGA-22303] Add support for integration type PROMETHEUS #130

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

bhupendray-yb
Copy link
Contributor

Resource Definition

resource "ybm_integration" "prometheus" {
  config_name = "prometheus-example"
  type        = "PROMETHEUS"
  prometheus_spec = {
    endpoint = "http://yourcompany.com/api/v1/otlp"
  }
}

Terraform Plan

> tfp

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # ybm_integration.prometheus will be created
  + resource "ybm_integration" "prometheus" {
      + account_id      = (known after apply)
      + config_id       = (known after apply)
      + config_name     = "prometheus-example"
      + is_valid        = (known after apply)
      + project_id      = (known after apply)
      + prometheus_spec = {
          + endpoint = "http://yourcompany.com/api/v1/otlp"
        }
      + type            = "PROMETHEUS"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Terraform Apply

> tfa -auto-approve

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # ybm_integration.prometheus will be created
  + resource "ybm_integration" "prometheus" {
      + account_id      = (known after apply)
      + config_id       = (known after apply)
      + config_name     = "prometheus-example"
      + is_valid        = (known after apply)
      + project_id      = (known after apply)
      + prometheus_spec = {
          + endpoint = "http://yourcompany.com/api/v1/otlp"
        }
      + type            = "PROMETHEUS"
    }

Plan: 1 to add, 0 to change, 0 to destroy.
ybm_integration.prometheus: Creating...
ybm_integration.prometheus: Creation complete after 3s

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Terraform State

> tf state show ybm_integration.prometheus
# ybm_integration.prometheus:
resource "ybm_integration" "prometheus" {
    account_id      = "3b98d883-1b63-40ce-a4d7-8dc2d6e0ba53"
    config_id       = "4200c8df-2fb6-4098-9239-b9f8b046d6c5"
    config_name     = "prometheus-example"
    is_valid        = true
    project_id      = "bebbcb6b-3927-4ac3-81ce-23bba0c75a2e"
    prometheus_spec = {
        endpoint = "http://yourcompany.com/api/v1/otlp"
    }
    type            = "PROMETHEUS"
}

Terraform Destroy

> tf destroy -auto-approve
ybm_integration.prometheus: Refreshing state...

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # ybm_integration.prometheus will be destroyed
  - resource "ybm_integration" "prometheus" {
      - account_id      = "3b98d883-1b63-40ce-a4d7-8dc2d6e0ba53" -> null
      - config_id       = "0ccc8e03-5742-4fac-92e8-443f4f233017" -> null
      - config_name     = "prometheus-example" -> null
      - is_valid        = true -> null
      - project_id      = "bebbcb6b-3927-4ac3-81ce-23bba0c75a2e" -> null
      - prometheus_spec = {
          - endpoint = "http://yourcompany.com/api/v1/otlp" -> null
        } -> null
      - type            = "PROMETHEUS" -> null
    }

Plan: 0 to add, 0 to change, 1 to destroy.
ybm_integration.prometheus: Destroying...
ybm_integration.prometheus: Destruction complete after 1s

Copy link
Contributor

@Siddarth-Baldwa Siddarth-Baldwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep prometheus integration under FF?

@bansal01yash
Copy link
Contributor

Can we keep prometheus integration under FF?

There's no reason to, it is just creation of integration and we have confirmed with QA it can be tested before next release

Copy link
Contributor

@bansal01yash bansal01yash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, LGTM

docs/resources/integration.md Outdated Show resolved Hide resolved
managed/resource_integration.go Outdated Show resolved Hide resolved
@bhupendray-yb bhupendray-yb merged commit d25af38 into main Nov 22, 2024
2 checks passed
@bhupendray-yb bhupendray-yb deleted the CLOUDGA-22303 branch November 22, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants