Skip to content
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

fix support for position in triggers and automation #3

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading