Skip to content

Commit 491d8fc

Browse files
authored
feat(plugin): UpCloud image importer (#29)
1 parent cd41035 commit 491d8fc

33 files changed

+1287
-40
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ dist
44
packer-plugin-upcloud
55
vendor
66
docs.zip
7+
crash.log
8+
*hcl.txt

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)
55

66
## [Unreleased]
77

8+
### Added
9+
- new `upcloud-import` post-processor
10+
11+
### Changed
12+
- new upcloud-go-api version v4.5.2
13+
814
## [1.3.1] - 2022-02-24
915

1016
### Changed

builder/upcloud/artifact.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"strings"
66

77
"github.com/UpCloudLtd/packer-plugin-upcloud/internal/driver"
8-
"github.com/UpCloudLtd/upcloud-go-api/upcloud"
8+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud"
99
)
1010

1111
// packersdk.Artifact implementation

builder/upcloud/artifact_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/UpCloudLtd/upcloud-go-api/upcloud"
7+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud"
88
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
99
)
1010

builder/upcloud/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66

77
"github.com/UpCloudLtd/packer-plugin-upcloud/internal/driver"
8-
"github.com/UpCloudLtd/upcloud-go-api/upcloud"
8+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud"
99
"github.com/hashicorp/hcl/v2/hcldec"
1010
"github.com/hashicorp/packer-plugin-sdk/communicator"
1111
"github.com/hashicorp/packer-plugin-sdk/multistep"

builder/upcloud/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"os"
88
"time"
99

10-
"github.com/UpCloudLtd/upcloud-go-api/upcloud"
11-
"github.com/UpCloudLtd/upcloud-go-api/upcloud/request"
10+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud"
11+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud/request"
1212
"github.com/hashicorp/packer-plugin-sdk/common"
1313
"github.com/hashicorp/packer-plugin-sdk/communicator"
1414
"github.com/hashicorp/packer-plugin-sdk/packer"

builder/upcloud/step_create_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66

77
"github.com/UpCloudLtd/packer-plugin-upcloud/internal/driver"
8-
"github.com/UpCloudLtd/upcloud-go-api/upcloud"
8+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud"
99
"github.com/hashicorp/packer-plugin-sdk/multistep"
1010
"github.com/hashicorp/packer-plugin-sdk/packer"
1111
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"

builder/upcloud/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"fmt"
66
"time"
77

8-
"github.com/UpCloudLtd/upcloud-go-api/upcloud"
9-
"github.com/UpCloudLtd/upcloud-go-api/upcloud/request"
8+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud"
9+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud/request"
1010
"github.com/hashicorp/packer-plugin-sdk/multistep"
1111
"github.com/hashicorp/packer-plugin-sdk/packer"
1212
)

builder/upcloud/utils_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"reflect"
55
"testing"
66

7-
"github.com/UpCloudLtd/upcloud-go-api/upcloud"
8-
"github.com/UpCloudLtd/upcloud-go-api/upcloud/request"
7+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud"
8+
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud/request"
99
"github.com/hashicorp/packer-plugin-sdk/multistep"
1010
)
1111

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- Code generated from the comments of the Config struct in post-processor/upcloud-import/config.go; DO NOT EDIT MANUALLY -->
2+
3+
- `replace_existing` (bool) - Replace existing template if one exists with the same name. Defaults to `false`.
4+
5+
- `state_timeout_duration` (duration string | ex: "1h5m2s") - The amount of time to wait for resource state changes. Defaults to `60m`.
6+
7+
<!-- End of code generated from the comments of the Config struct in post-processor/upcloud-import/config.go; -->

0 commit comments

Comments
 (0)