-
Notifications
You must be signed in to change notification settings - Fork 213
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
Create/Destroy ruleset rule error #206
Comments
Yes, seeing same behaviour. Same issue affects Use case for this is nesting rules with a service. When service module is instantiated, it creates rules which are unaware of other rules. To create dependencies would mean also making services depend on each other (at least in code). |
My attempted hack to a solution also presents a problem. I'd hoped to be able to pass around references to other rules in the set. The following successfully creates 3 rules:
However if I then decide that I am no longer interested in
The same error occurs. This really needs to be fixed! |
Retry would be great interim fix. Any idea when this might be merged & available @stmcallister? Also I am currently using |
@matt-canty-dragon Let me know if that PR doesn't fix the issue for you. We'll leave the |
Hi @stmcallister I have transitioned already to
Overall, 202 event rules were expected to be created. However I am currently stuck at his position now. I think the problem is it is continually trying to change the position back to I don't really want to set a position. Also I don't really want to store an arbitrary number anywhere which the service module would then pass down to the ruleset module. I hope this makes sense. |
Hi @stmcallister a little more context and info. In our solution I intend to:
Having experimented with the Terraform I have concluded that logic behind the API adjusts the Applying a rule and then re-applying with no change will always cause a change in the plan due to the computed (PagerDuty) and the declared (Terraform) priority differing. I see the following options:
I hope this helps. It's quite convoluted and largely a result of the API design rather than the Terraform provider I believe. Would appreciate some kind of timelines, I am thinking of interim workarounds however I don't like the sound of any of them! |
@matt-canty-dragon Thanks for this feedback! I'm going to connect with the Engineer team over the |
I am going to implement a work-around in order to prevent further delay. Thanks, look forward to hearing more. |
For now I have worked around the issue, by creating all ruleset rules in a single file like so: module unicorn_service_priority_rules {
source = "./modules/datadog-base-service-rules"
service_id = module.unicorn_service.service_id
service_name = module.unicorn_service.service_name
last_position = 0
last_rule = null
}
module my_service_priority_rules {
source = "./modules/datadog-base-service-rules"
service_id = module.my_service.service_id
service_name = module.my_service.service_name
last_position = module.unicorn_service_priority_rules.last_position
last_rule = module.unicorn_service_priority_rules.last_rule
} This way all rules (each module creates 1 rule per priority) are created sequentially and in order of priority. No updates are required if no changes are made to this file or the module now, which is great. |
Thanks for sharing the feedback @matt-canty-dragon! I shared this thread with the engineering team over In reading through this again, I'm seeing that you're having issues with rules associated with different services conflicting with each other, and that service-level event rules will be ideal. Those types of rules are not available yet, but they are on the roadmap. While not ideal for how you think about the problem, I think your solution makes sense. |
Interesting. I would like to discuss this further with our account manager. Happy to continue with this work-around for now. Official advice is as I said to have one ruleset to minimise the number of integration points for Datadog. So, I look forward to service-level rulesets. |
Cool. Seeing as this issue has evolved a bit, and we have a temporary resolution, I'm going to close this one. Please feel free to open another issue if you have any further questions. |
Hello,
It looks like there could be some kind of bug probably in plugin which implies randomly error occured during creating/destroying more than one rules at once. Create/Destroy only one rule at ones works correctly.
Terraform Version
0.12.24
PagerDuty Provider Version
1.6.1
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/bartoszspiechowicz/9d52adab81ec7138d3e13f8e187a8fba
https://gist.github.com/bartoszspiechowicz/c5bf308f3bfd40290b997e0545e57255
Expected Behavior
All Ruleset rules are created without errors.
Actual Behavior
PagerDuty API randomly return "500 Internal Server Error" during creating/destroying more than one rules at once.
It doesn't occurs during creating/destroying only one rule.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: