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

[Bug]: grafana_oncall_outgoing_webhook: new trigger_type = status change is not implemented #1873

Open
xe-leon opened this issue Oct 30, 2024 · 0 comments

Comments

@xe-leon
Copy link

xe-leon commented Oct 30, 2024

Terraform Version

1.9.6

Terraform Grafana Provider Version

3.10.0

Grafana Version

Grafana Cloud (steady)

Affected Resource(s)

  • grafana_oncall_outgoing_webhook

Terraform Configuration Files

resource "grafana_oncall_outgoing_webhook" "changed" {
  name                  = "[tf] changed-test"
  is_webhook_enabled    = true
  trigger_type          = "status change"
  forward_whole_payload = false
  http_method           = "PUT"
  trigger_template      = "1"
  url                   = "https://example.com/"
  data                  = "any data"
}

terraform {
  required_providers {
    grafana = {
      source  = "grafana/grafana"
    }
  }
}

provider "grafana" {
  oncall_url          = "https://oncall-prod-eu-west-0.grafana.net/oncall"
  oncall_access_token = "<oncall-api-token>"
  retry_wait          = 60
  retries             = 15
}

Expected Behavior

outgoing webhook created in grafana, resource saved in terraform state

Actual Behavior

outgoing webhook created in grafana, but resource is NOT saved in terraform state since provider fails with the error:

Error: POST https://oncall-prod-eu-west-0.grafana.net/oncall/api/v1/webhooks/: 400 {non_field_errors: [The fields name, organization must make a unique set.]}
with grafana_oncall_outgoing_webhook.changed,
on main.tf line 3, in resource "grafana_oncall_outgoing_webhook" "changed":
3: resource "grafana_oncall_outgoing_webhook" "changed" {

Steps to Reproduce

  1. terraform init
  2. terraform apply
  3. check grafana cloud UI. Webhook has been created
  4. provider fails, thus not saving resource to terraform state

Important Factoids

No response

References

@xe-leon xe-leon added the bug label Oct 30, 2024
@Duologic Duologic removed the bug label Nov 7, 2024
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

No branches or pull requests

2 participants