Skip to content

Commit

Permalink
fix support for position in triggers and automation
Browse files Browse the repository at this point in the history
  • Loading branch information
clearnote01 committed Oct 30, 2024
1 parent 3e18afb commit b2ae931
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zendesk/resource_zendesk_automation.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ func unmarshalAutomation(d identifiableGetterSetter) (client.Automation, error)
automation.Title = v.(string)
}

if v, ok := d.GetOk("position"); ok {
automation.Position = int64(v.(int))
}

if v, ok := d.GetOk("active"); ok {
automation.Active = v.(bool)
}
Expand Down
5 changes: 5 additions & 0 deletions zendesk/resource_zendesk_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func resourceZendeskTrigger() *schema.Resource {
"position": {
Description: "Position of the trigger, determines the order they will execute in.",
Type: schema.TypeInt,
Optional: true,
Computed: true,
},
// Both the "all" and "any" parameter are optional, but at least one of them must be supplied
Expand Down Expand Up @@ -158,6 +159,10 @@ func unmarshalTrigger(d identifiableGetterSetter) (client.Trigger, error) {
trg.ID = id
}

if v, ok := d.GetOk("position"); ok {
trg.Position = int64(v.(int))
}

if v, ok := d.GetOk("title"); ok {
trg.Title = v.(string)
}
Expand Down

0 comments on commit b2ae931

Please sign in to comment.