Code Monkey home page Code Monkey logo

Comments (7)

eLco avatar eLco commented on May 26, 2024 1

@lra thank you for the workaround :)

The reason I've posted this bug report, is that:

from terraform-provider-cloudflare.

github-actions avatar github-actions commented on May 26, 2024

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.

from terraform-provider-cloudflare.

github-actions avatar github-actions commented on May 26, 2024

Terraform debug log detected ✅

from terraform-provider-cloudflare.

lra avatar lra commented on May 26, 2024

The workaround is to have only 1 type of integration per notification policy.

Instead of:

resource "cloudflare_notification_policy" "pusher" {
  account_id = ""
  name       = "rate-limit"
  enabled    = true
  alert_type = "clickhouse_alert_fw_ent_anomaly"
  filters {
    services = ["ratelimit"]
    actions  = ["log"]
  }

  email_integration {
    id = "[email protected]"
  }

  webhooks_integration {
    id   = "someid"
    name = "Slack cloudflare alerts"
  }
}

Do:

resource "cloudflare_notification_policy" "pusher_email" {
  account_id = ""
  name       = "rate-limit"
  enabled    = true
  alert_type = "clickhouse_alert_fw_ent_anomaly"
  filters {
    services = ["ratelimit"]
    actions  = ["log"]
  }

  email_integration {
    id = "[email protected]"
  }
}

resource "cloudflare_notification_policy" "pusher_webhooks" {
  account_id = ""
  name       = "rate-limit"
  enabled    = true
  alert_type = "clickhouse_alert_fw_ent_anomaly"
  filters {
    services = ["ratelimit"]
    actions  = ["log"]
  }

  webhooks_integration {
    id   = "someid"
    name = "Slack cloudflare alerts"
  }
}

from terraform-provider-cloudflare.

jacobbednarz avatar jacobbednarz commented on May 26, 2024

thanks for the issue here @eLco.

@Cyb3r-Jak3 you added the ExactlyOneOf in #2976. was the change intending to prevent multiple blocks of config? it looks like the endpoints support it.

there is no update of provider documentation regarding this change - https://registry.terraform.io/providers/cloudflare/cloudflare/4.21.0/docs/resources/notification_policy#example-usage

we don't offer kitchen sink style examples so it's very likely not to appear here :) you should use the API and developer documentation to determine more complex examples.

from terraform-provider-cloudflare.

Cyb3r-Jak3 avatar Cyb3r-Jak3 commented on May 26, 2024

@Cyb3r-Jak3 you added the ExactlyOneOf in #2976. was the change intending to prevent multiple blocks of config? it looks like the endpoints support it.

Thought I read somewhere that only one could be referenced. Can't seem to find the docs for it now though.

from terraform-provider-cloudflare.

jacobbednarz avatar jacobbednarz commented on May 26, 2024

all good - if we can't find the reference, let's get that reverted for the next release.

from terraform-provider-cloudflare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.