terraform-provider-cloudflare icon indicating copy to clipboard operation
terraform-provider-cloudflare copied to clipboard

Pagerduty Integration Resource

Open jordanfelle opened this issue 2 years ago • 4 comments

Current Terraform and Cloudflare provider version

Terraform v1.4.2 on linux_amd64

  • provider registry.terraform.io/cloudflare/cloudflare v4.2.0
  • provider registry.terraform.io/hashicorp/aws v4.60.0
  • provider registry.terraform.io/hashicorp/random v3.4.3

Description

For the Pagerduty notification integration we would like a terraform resource to create and manage that resource

Use cases

We want to be able to manage all parts of Cloudflare in IAC and this is currently one we have to create manually.

Potential Terraform configuration

Similar to the notification_policy_webhooks resource

resource "cloudflare_notification_policy_integration" "example" {
  account_id = "f037e56e89293a057740de681ac9abbe"
  name       = "Pagerduty destination"
  kind        = "pageduty"
  secret     = "my-secret"
}

References

No response

jordanfelle avatar Apr 04 '23 10:04 jordanfelle

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

github-actions[bot] avatar Apr 04 '23 10:04 github-actions[bot]

is https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/notification_policy what you are looking for?

if you're after a way to create the Pagerduty integration link that is present in your account, that isn't currently exposed via an API and you're best off contacting your account team or Cloudflare Support to have it prioritised with the service team.

jacobbednarz avatar Apr 04 '23 10:04 jacobbednarz

My understanding that lets you utilize a pagerduty integration, but we want to make the integration in TF to then be able to use in that resource

jordanfelle avatar Apr 04 '23 11:04 jordanfelle

could be related, we're seeing a similar issue with the provider and a pagerduty integration

received internal server error response (HTTP 500), please try again later

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 4.0"
    }
  }
}

resource "cloudflare_notification_policy" "my_notification" {
 account_id  = var.account_id
 name        = "Health Alert"
 description = "Notification policy"
 enabled     = true

 alert_type = "load_balancing_health_alert"

 pagerduty_integration {
   id = "integration id from pagerduty service"
 }

}

using Terraform v1.3.2

No other logs output from TF_DEBUG either

Is there something special about the id / setup in cloudlare or pagerduty before using it in notification? Email provider appears to work as expected.

Thanks!

adjavaherian avatar Apr 06 '23 21:04 adjavaherian

This issue has been closed as we are now tracking this internally with service teams directly. If you would like an update or to be notified when/if the product ships with this change, please reach out to Cloudflare Support or your account team who can watch the internal feature request for you.

jacobbednarz avatar Mar 25 '24 00:03 jacobbednarz