Skip to content

Commit

Permalink
[schedule_rotation] Allow "none" as rotation participant
Browse files Browse the repository at this point in the history
  • Loading branch information
diraol committed Jul 23, 2024
1 parent 0901010 commit ccb4d4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ schedule_rotations:
participants:
- type: user
username: [email protected]
- type: none
- type: user
username: [email protected]
time_restriction:
Expand Down
2 changes: 1 addition & 1 deletion modules/config/schedule_rotations.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resource "opsgenie_schedule_rotation" "this" {

content {
type = participant.value.type
id = try(opsgenie_user.this[participant.value.username].id, data.opsgenie_user.this[participant.value.username].id)
id = participant.value.type == "none" ? null : try(opsgenie_user.this[participant.value.username].id, data.opsgenie_user.this[participant.value.username].id)
}
}

Expand Down

0 comments on commit ccb4d4d

Please sign in to comment.