Skip to content

Commit

Permalink
Use split function from rclone.
Browse files Browse the repository at this point in the history
  • Loading branch information
tasdomas committed Oct 18, 2022
1 parent de5cadd commit b900f4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iterative/resource_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"strings"
"time"

"github.com/sirupsen/logrus"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/rclone/rclone/lib/bucket"
"github.com/sirupsen/logrus"

"terraform-provider-iterative/iterative/utils"
"terraform-provider-iterative/task"
Expand Down Expand Up @@ -362,7 +362,7 @@ func resourceTaskBuild(ctx context.Context, d *schema.ResourceData, m interface{
// Propagate configuration for pre-allocated storage container.
containerRaw := storage["container"].(string)
if containerRaw != "" {
container, containerPath := parseContainerPath(containerRaw)
container, containerPath := bucket.Split(containerRaw)
remoteStorage = &common.RemoteStorage{
Container: container,
Path: containerPath,
Expand Down
3 changes: 3 additions & 0 deletions task/common/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ type Event struct {
Code string
Description []string
}

// RemoteStorage contains the configuration for the cloud storage container
// used by the task.
type RemoteStorage struct {
// Container stores the id of the container to be used.
Container string
Expand Down

0 comments on commit b900f4b

Please sign in to comment.