You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to define notification policy with a weekday-and-time-of-day restriction and Pulumi reports problems with NotificationPolicy.TimeRestrictions[0].Restriction[0].EndDay and NotificationPolicy.TimeRestrictions[0].Restriction[0].StartDay.
Steps to reproduce
~/github/pulumi-test
❯ cat package.json
{
"name": "notification-policy-bug",
"version": "0.0.1",
"devDependencies": {
"@types/node": "16.0.0",
"typescript": "^4.3.5"
},
"dependencies": {
"@pulumi/opsgenie": "v1.1.5",
"@pulumi/pulumi": "^3.30.0"
}
}
~/github/pulumi-test
❯ cat *.ts
import * as opsgenie from "@pulumi/opsgenie";
new opsgenie.NotificationPolicy("notification-policy-bug", {
filters: [{
conditions: [
{
expectedValue: "P4",
field: "priority",
operation: "equals",
order: 0,
},
],
type: "match-all-conditions",
}],
teamId: "team",
delayActions: [{
delayOption: "next-time",
untilHour: 9,
untilMinute: 30
}],
policyDescription: "example desc",
timeRestrictions: [{
restrictions: [{
endDay: "wednesday",
endHour: 10,
endMin: 10,
startDay: "monday",
startHour: 9,
startMin: 9,
}],
type: "weekday-and-time-of-day",
}],
})
❯ pulumi preview
Previewing update (opsgenie-notification-policy-bug)
Type Name Plan Info
+ pulumi:pulumi:Stack notification-policy-bug-opsgenie-notification-policy-bug create 1 message
└─ opsgenie:index:NotificationPolicy notification-policy-bug 2 errors
Diagnostics:
pulumi:pulumi:Stack (notification-policy-bug-opsgenie-notification-policy-bug):
INFO[2022-05-23T13:33:25.857384+02:00] Client is configured with ApiUrl: api.opsgenie.com, LogLevel: info, RetryMaxCount: 10
opsgenie:index:NotificationPolicy (notification-policy-bug):
error: opsgenie:index/notificationPolicy:NotificationPolicy resource 'notification-policy-bug' has a problem: Invalid or unknown key. Examine values at 'NotificationPolicy.TimeRestrictions[0].Restriction[0].EndDay'.
error: opsgenie:index/notificationPolicy:NotificationPolicy resource 'notification-policy-bug' has a problem: Invalid or unknown key. Examine values at 'NotificationPolicy.TimeRestrictions[0].Restriction[0].StartDay'.
Expected Behavior
Notification policy created with a time restriction set.
Actual Behavior
error: opsgenie:index/notificationPolicy:NotificationPolicy resource 'notification-policy-bug' has a problem: Invalid or unknown key. Examine values at 'NotificationPolicy.TimeRestrictions[0].Restriction[0].EndDay'.
error: opsgenie:index/notificationPolicy:NotificationPolicy resource 'notification-policy-bug' has a problem: Invalid or unknown key. Examine values at 'NotificationPolicy.TimeRestrictions[0].Restriction[0].StartDay'.
```
### Versions used
CLI
Version 3.33.1
Go Version go1.17.10
Go Compiler gc
Plugins
NAME VERSION
nodejs unknown
opsgenie 1.1.5
Host
OS darwin
Version 12.4
Arch arm64
This project is written in nodejs (/opt/homebrew/bin/node v18.0.0)
Current Stack: opsgenie-notification-policy-bug
Found no resources associated with opsgenie-notification-policy-bug
Found no pending operations associated with opsgenie-notification-policy-bug
NAME VERSION
@pulumi/opsgenie 1.1.5
@pulumi/pulumi 3.33.1
@types/node 16.0.0
typescript 4.6.4
### Additional context
Seems similar to:
- https://github.com/pulumi/pulumi-opsgenie/issues/17
- https://github.com/pulumi/pulumi-opsgenie/issues/51
### Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
What happened?
I'm trying to define notification policy with a weekday-and-time-of-day restriction and Pulumi reports problems with
NotificationPolicy.TimeRestrictions[0].Restriction[0].EndDay
andNotificationPolicy.TimeRestrictions[0].Restriction[0].StartDay
.Steps to reproduce
Expected Behavior
Notification policy created with a time restriction set.
Actual Behavior
CLI
Version 3.33.1
Go Version go1.17.10
Go Compiler gc
Plugins
NAME VERSION
nodejs unknown
opsgenie 1.1.5
Host
OS darwin
Version 12.4
Arch arm64
This project is written in nodejs (/opt/homebrew/bin/node v18.0.0)
Current Stack: opsgenie-notification-policy-bug
Found no resources associated with opsgenie-notification-policy-bug
Found no pending operations associated with opsgenie-notification-policy-bug
NAME VERSION
@pulumi/opsgenie 1.1.5
@pulumi/pulumi 3.33.1
@types/node 16.0.0
typescript 4.6.4
The text was updated successfully, but these errors were encountered: