-
Notifications
You must be signed in to change notification settings - Fork 624
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
Slack webhooks (cloudflare_notification_policy_webhooks) are replaced on every apply #2767
Comments
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Hi @jtthackery, this is not a bug, this is a feature :) and the last one part - this is secret, you need to adв it to the secret parameter of terraform config:
|
@Nmishin Thanks for the explanation, maybe this is a docs issue then? The behavior is confusing as it seems there are two valid ways to create a slack webhook, and neither are fully documented. Option 1:
Option 2:
I'll note that there's a 3rd, invalid option: forget to split the URL into two parts but define both the
I think this could be "solved" with a docs update that clarifies slack webhooks should be defined with both fields, and the secret should be truncated from the webhook URL. I'm happy to make a PR for that update if you think it's appropriate. Thanks! |
i think we need to ask guru @jacobbednarz for my humble opinion - we need to describe this behaviour in the docs. |
Hi @Nmishin |
Confirmation
Terraform and Cloudflare provider version
Affected resource(s)
Terraform configuration files
Link to debug output
Cannot provide due to company policy
Panic output
No response
Expected output
I expect that running terraform apply or plan when there have been no code changes produces a
No changes. Your infrastructure matches the configuration.
message.Actual output
Instead I see a "must be replaced" message, and an apply does actually replace the resource (I see the test "Hello World!" message in slack every time). Additionally, all
cloudflare_notification_policy
resources that reference this webhook are updated as part each apply. We've had to restructure our terraform project to reduce the alert noise from this issue.Steps to reproduce
cloudflare_notification_policy_webhooks
resource with a slack webhook.terraform apply
terraform plan
and observe that the plan output includes the replacement of this resource.terraform apply
to replace the resource, observe a second test message to confirm the resource has been replaced. (Alternatively, you can check the webhook ID to confirm the replacement.)Additional factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: