Skip to content

Commit

Permalink
fixed set schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
wrighbr committed Dec 13, 2021
1 parent c5b5426 commit c876a7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion provider/resource_replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,17 @@ func resourceReplicationRead(d *schema.ResourceData, m interface{}) error {
d.Set("registry_id", destRegistryID)
}

if jsonDataReplication.Trigger.Type != "manual" {
d.Set("schedule", jsonDataReplication.Trigger.TriggerSettings.Cron)
} else {
d.Set("schedule", "manual")
}

d.Set("replication_policy_id", jsonDataReplication.ID)
d.Set("enabled", jsonDataReplication.Enabled)
d.Set("name", jsonDataReplication.Name)
d.Set("deletion", jsonDataReplication.Deletion)
d.Set("override", jsonDataReplication.Override)
d.Set("schedule", jsonDataReplication.Trigger.Type)

return nil
}
Expand Down

0 comments on commit c876a7f

Please sign in to comment.