commit
bee182e480
|
@ -462,8 +462,8 @@ The following example has been adapted from a shell-local provisioner test:
|
||||||
|
|
||||||
```
|
```
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/acctest/provisioneracc"
|
"github.com/hashicorp/packer-plugin-sdk/acctest/provisioneracc"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/acctest/testutils"
|
"github.com/hashicorp/packer-plugin-sdk/acctest/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
"github.com/hashicorp/packer/builder/alicloud/version"
|
"github.com/hashicorp/packer/builder/alicloud/version"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
"github.com/mitchellh/go-homedir"
|
"github.com/mitchellh/go-homedir"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Artifact struct {
|
type Artifact struct {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestArtifact_Impl(t *testing.T) {
|
func TestArtifact_Impl(t *testing.T) {
|
||||||
|
|
|
@ -9,13 +9,13 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/common"
|
"github.com/hashicorp/packer-plugin-sdk/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep/commonsteps"
|
"github.com/hashicorp/packer-plugin-sdk/multistep/commonsteps"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The unique ID for this builder
|
// The unique ID for this builder
|
||||||
|
|
|
@ -4,7 +4,7 @@ package ecs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/zclconf/go-cty/cty"
|
"github.com/zclconf/go-cty/cty"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest"
|
builderT "github.com/hashicorp/packer-plugin-sdk/acctest"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultTestRegion = "cn-beijing"
|
const defaultTestRegion = "cn-beijing"
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
helperconfig "github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
helperconfig "github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testBuilderConfig() map[string]interface{} {
|
func testBuilderConfig() map[string]interface{} {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The "AlicloudDiskDevice" object us used for the `ECSSystemDiskMapping` and
|
// The "AlicloudDiskDevice" object us used for the `ECSSystemDiskMapping` and
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func cleanUpMessage(state multistep.StateBag, module string) {
|
func cleanUpMessage(state multistep.StateBag, module string) {
|
||||||
|
|
|
@ -8,10 +8,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RunConfig struct {
|
type RunConfig struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testConfig() *RunConfig {
|
func testConfig() *RunConfig {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package ecs
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepAttachKeyPair struct {
|
type stepAttachKeyPair struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepCheckAlicloudSourceImage struct {
|
type stepCheckAlicloudSourceImage struct {
|
||||||
|
|
|
@ -5,12 +5,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepConfigAlicloudEIP struct {
|
type stepConfigAlicloudEIP struct {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepConfigAlicloudKeyPair struct {
|
type stepConfigAlicloudKeyPair struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepConfigAlicloudPublicIP struct {
|
type stepConfigAlicloudPublicIP struct {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepConfigAlicloudSecurityGroup struct {
|
type stepConfigAlicloudSecurityGroup struct {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepConfigAlicloudVPC struct {
|
type stepConfigAlicloudVPC struct {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepConfigAlicloudVSwitch struct {
|
type stepConfigAlicloudVSwitch struct {
|
||||||
|
|
|
@ -5,13 +5,13 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/random"
|
"github.com/hashicorp/packer-plugin-sdk/random"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepCreateAlicloudImage struct {
|
type stepCreateAlicloudImage struct {
|
||||||
|
|
|
@ -7,14 +7,14 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
confighelper "github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
confighelper "github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepCreateAlicloudInstance struct {
|
type stepCreateAlicloudInstance struct {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepCreateAlicloudSnapshot struct {
|
type stepCreateAlicloudSnapshot struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepCreateTags struct {
|
type stepCreateTags struct {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepDeleteAlicloudImageSnapshots struct {
|
type stepDeleteAlicloudImageSnapshots struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepPreValidate struct {
|
type stepPreValidate struct {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
confighelper "github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
confighelper "github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepRegionCopyAlicloudImage struct {
|
type stepRegionCopyAlicloudImage struct {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepRunAlicloudInstance struct {
|
type stepRunAlicloudInstance struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepShareAlicloudImage struct {
|
type stepShareAlicloudImage struct {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
||||||
|
|
||||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepStopAlicloudInstance struct {
|
type stepStopAlicloudInstance struct {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package version
|
package version
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/version"
|
"github.com/hashicorp/packer-plugin-sdk/version"
|
||||||
packerVersion "github.com/hashicorp/packer/version"
|
packerVersion "github.com/hashicorp/packer/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -15,15 +15,15 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/chroot"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/common"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep/commonsteps"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/chroot"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/common"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep/commonsteps"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// The unique ID for this builder
|
// The unique ID for this builder
|
||||||
|
|
|
@ -4,8 +4,8 @@ package chroot
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common"
|
"github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
|
||||||
"github.com/zclconf/go-cty/cty"
|
"github.com/zclconf/go-cty/cty"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package chroot
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testConfig() map[string]interface{} {
|
func testConfig() map[string]interface{} {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/common"
|
"github.com/hashicorp/packer-plugin-sdk/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCopyFile(t *testing.T) {
|
func TestCopyFile(t *testing.T) {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepAttachVolume attaches the previously created volume to an
|
// StepAttachVolume attaches the previously created volume to an
|
||||||
|
|
|
@ -3,7 +3,7 @@ package chroot
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/chroot"
|
"github.com/hashicorp/packer-plugin-sdk/chroot"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAttachVolumeCleanupFunc_ImplementsCleanupFunc(t *testing.T) {
|
func TestAttachVolumeCleanupFunc_ImplementsCleanupFunc(t *testing.T) {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepCheckRootDevice makes sure the root device on the AMI is EBS-backed.
|
// StepCheckRootDevice makes sure the root device on the AMI is EBS-backed.
|
||||||
|
|
|
@ -8,11 +8,11 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepCreateVolume creates a new volume from the snapshot of the root
|
// StepCreateVolume creates a new volume from the snapshot of the root
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
confighelper "github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
confighelper "github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/chroot"
|
"github.com/hashicorp/packer-plugin-sdk/chroot"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepEarlyUnflock unlocks the flock.
|
// StepEarlyUnflock unlocks the flock.
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepFlock provisions the instance within a chroot.
|
// StepFlock provisions the instance within a chroot.
|
||||||
|
|
|
@ -3,7 +3,7 @@ package chroot
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/chroot"
|
"github.com/hashicorp/packer-plugin-sdk/chroot"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFlockCleanupFunc_ImplementsCleanupFunc(t *testing.T) {
|
func TestFlockCleanupFunc_ImplementsCleanupFunc(t *testing.T) {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws/ec2metadata"
|
"github.com/aws/aws-sdk-go/aws/ec2metadata"
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepInstanceInfo verifies that this builder is running on an EC2 instance.
|
// StepInstanceInfo verifies that this builder is running on an EC2 instance.
|
||||||
|
|
|
@ -10,11 +10,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/common"
|
"github.com/hashicorp/packer-plugin-sdk/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mountPathData struct {
|
type mountPathData struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package chroot
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/chroot"
|
"github.com/hashicorp/packer-plugin-sdk/chroot"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMountDeviceCleanupFunc_ImplementsCleanupFunc(t *testing.T) {
|
func TestMountDeviceCleanupFunc_ImplementsCleanupFunc(t *testing.T) {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepPrepareDevice finds an available device and sets it.
|
// StepPrepareDevice finds an available device and sets it.
|
||||||
|
|
|
@ -6,11 +6,11 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/random"
|
||||||
|
confighelper "github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/random"
|
|
||||||
confighelper "github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepRegisterAMI creates the AMI.
|
// StepRegisterAMI creates the AMI.
|
||||||
|
|
|
@ -3,8 +3,8 @@ package chroot
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/common"
|
||||||
amazon "github.com/hashicorp/packer/builder/amazon/common"
|
amazon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/common"
|
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepSnapshot creates a snapshot of the created volume.
|
// StepSnapshot creates a snapshot of the created volume.
|
||||||
|
|
|
@ -17,8 +17,8 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
awsbase "github.com/hashicorp/aws-sdk-go-base"
|
awsbase "github.com/hashicorp/aws-sdk-go-base"
|
||||||
cleanhttp "github.com/hashicorp/go-cleanhttp"
|
cleanhttp "github.com/hashicorp/go-cleanhttp"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
vaultapi "github.com/hashicorp/vault/api"
|
vaultapi "github.com/hashicorp/vault/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AMIConfig is for common configuration related to creating AMIs.
|
// AMIConfig is for common configuration related to creating AMIs.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testAMIConfig() *AMIConfig {
|
func testAMIConfig() *AMIConfig {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Artifact is an artifact implementation that contains built AMIs.
|
// Artifact is an artifact implementation that contains built AMIs.
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestArtifact_Impl(t *testing.T) {
|
func TestArtifact_Impl(t *testing.T) {
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBlockDevice(t *testing.T) {
|
func TestBlockDevice(t *testing.T) {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// DestroyAMIs deregisters the AWS machine images in imageids from an active AWS account
|
// DestroyAMIs deregisters the AWS machine images in imageids from an active AWS account
|
||||||
|
|
|
@ -3,8 +3,8 @@ package common
|
||||||
import (
|
import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BuildInfoTemplate struct {
|
type BuildInfoTemplate struct {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testImage() *ec2.Image {
|
func testImage() *ec2.Image {
|
||||||
|
|
|
@ -11,10 +11,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
var reShutdownBehavior = regexp.MustCompile("^(stop|terminate)$")
|
var reShutdownBehavior = regexp.MustCompile("^(stop|terminate)$")
|
||||||
|
|
|
@ -4,7 +4,7 @@ package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/zclconf/go-cty/cty"
|
"github.com/zclconf/go-cty/cty"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ec2Describer interface {
|
type ec2Describer interface {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -12,10 +12,10 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ssm"
|
"github.com/aws/aws-sdk-go/service/ssm"
|
||||||
"github.com/aws/aws-sdk-go/service/ssm/ssmiface"
|
"github.com/aws/aws-sdk-go/service/ssm/ssmiface"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/shell-local/localexec"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/shell-local/localexec"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Session struct {
|
type Session struct {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws/request"
|
"github.com/aws/aws-sdk-go/aws/request"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StateRefreshFunc is a function type used for StateChangeConf that is
|
// StateRefreshFunc is a function type used for StateChangeConf that is
|
||||||
|
|
|
@ -8,9 +8,9 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepAMIRegionCopy struct {
|
type StepAMIRegionCopy struct {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws/request"
|
"github.com/aws/aws-sdk-go/aws/request"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Define a mock struct to be used in unit tests for common aws steps.
|
// Define a mock struct to be used in unit tests for common aws steps.
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// stepCleanupVolumes cleans up any orphaned volumes that were not designated to
|
// stepCleanupVolumes cleans up any orphaned volumes that were not designated to
|
||||||
|
|
|
@ -9,10 +9,10 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ssm"
|
"github.com/aws/aws-sdk-go/service/ssm"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/net"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
pssm "github.com/hashicorp/packer/builder/amazon/common/ssm"
|
pssm "github.com/hashicorp/packer/builder/amazon/common/ssm"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/net"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepCreateSSMTunnel struct {
|
type StepCreateSSMTunnel struct {
|
||||||
|
|
|
@ -8,11 +8,11 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepCreateTags struct {
|
type StepCreateTags struct {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepDeregisterAMI struct {
|
type StepDeregisterAMI struct {
|
||||||
|
|
|
@ -12,10 +12,10 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepGetPassword reads the password from a Windows server and sets it
|
// StepGetPassword reads the password from a Windows server and sets it
|
||||||
|
|
|
@ -8,9 +8,9 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/iam"
|
"github.com/aws/aws-sdk-go/service/iam"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepIamInstanceProfile struct {
|
type StepIamInstanceProfile struct {
|
||||||
|
|
|
@ -8,10 +8,10 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepKeyPair struct {
|
type StepKeyPair struct {
|
||||||
|
|
|
@ -7,10 +7,10 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepModifyAMIAttributes struct {
|
type StepModifyAMIAttributes struct {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
confighelper "github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
confighelper "github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepModifyEBSBackedInstance struct {
|
type StepModifyEBSBackedInstance struct {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepNetworkInfo queries AWS for information about
|
// StepNetworkInfo queries AWS for information about
|
||||||
|
|
|
@ -9,10 +9,10 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepPreValidate provides an opportunity to pre-validate any configuration for
|
// StepPreValidate provides an opportunity to pre-validate any configuration for
|
||||||
|
|
|
@ -11,12 +11,12 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepRunSourceInstance struct {
|
type StepRunSourceInstance struct {
|
||||||
|
|
|
@ -12,13 +12,13 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/random"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/random"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type EC2BlockDeviceMappingsBuilder interface {
|
type EC2BlockDeviceMappingsBuilder interface {
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Create statebag for running test
|
// Create statebag for running test
|
||||||
|
|
|
@ -10,10 +10,10 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/request"
|
"github.com/aws/aws-sdk-go/aws/request"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/uuid"
|
"github.com/hashicorp/packer-plugin-sdk/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepSecurityGroup struct {
|
type StepSecurityGroup struct {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
)
|
)
|
||||||
|
|
||||||
// &awscommon.StepSetGeneratedData{
|
// &awscommon.StepSetGeneratedData{
|
||||||
|
|
|
@ -8,9 +8,9 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
confighelper "github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
confighelper "github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepSourceAMIInfo extracts critical information from the source AMI
|
// StepSourceAMIInfo extracts critical information from the source AMI
|
||||||
|
|
|
@ -6,10 +6,10 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepStopEBSBackedInstance struct {
|
type StepStopEBSBackedInstance struct {
|
||||||
|
|
|
@ -5,10 +5,10 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TagMap map[string]string
|
type TagMap map[string]string
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs"
|
amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs"
|
||||||
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AmazonEBSAccTest struct{}
|
type AmazonEBSAccTest struct{}
|
||||||
|
|
|
@ -15,15 +15,15 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/iam"
|
"github.com/aws/aws-sdk-go/service/iam"
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/common"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep/commonsteps"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/common"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep/commonsteps"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// The unique ID for this builder
|
// The unique ID for this builder
|
||||||
|
|
|
@ -4,8 +4,8 @@ package ebs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common"
|
"github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
|
||||||
"github.com/zclconf/go-cty/cty"
|
"github.com/zclconf/go-cty/cty"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
builderT "github.com/hashicorp/packer-plugin-sdk/acctest"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common"
|
"github.com/hashicorp/packer/builder/amazon/common"
|
||||||
builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBuilderAcc_basic(t *testing.T) {
|
func TestBuilderAcc_basic(t *testing.T) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package ebs
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testConfig() map[string]interface{} {
|
func testConfig() map[string]interface{} {
|
||||||
|
|
|
@ -8,12 +8,12 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/random"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/retry"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
"github.com/hashicorp/packer/builder/amazon/common/awserrors"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/random"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/retry"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepCreateAMI struct {
|
type stepCreateAMI struct {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
builderT "github.com/hashicorp/packer-plugin-sdk/acctest"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common"
|
"github.com/hashicorp/packer/builder/amazon/common"
|
||||||
builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type TFBuilder struct {
|
type TFBuilder struct {
|
||||||
|
|
|
@ -4,8 +4,8 @@ package ebssurrogate
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type BlockDevice struct {
|
type BlockDevice struct {
|
||||||
|
|
|
@ -13,15 +13,15 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/iam"
|
"github.com/aws/aws-sdk-go/service/iam"
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/common"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/communicator"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/multistep/commonsteps"
|
||||||
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/interpolate"
|
||||||
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
awscommon "github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/common"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/communicator"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep/commonsteps"
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const BuilderId = "mitchellh.amazon.ebssurrogate"
|
const BuilderId = "mitchellh.amazon.ebssurrogate"
|
||||||
|
|
|
@ -4,8 +4,8 @@ package ebssurrogate
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/hcl/v2/hcldec"
|
"github.com/hashicorp/hcl/v2/hcldec"
|
||||||
|
"github.com/hashicorp/packer-plugin-sdk/template/config"
|
||||||
"github.com/hashicorp/packer/builder/amazon/common"
|
"github.com/hashicorp/packer/builder/amazon/common"
|
||||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/config"
|
|
||||||
"github.com/zclconf/go-cty/cty"
|
"github.com/zclconf/go-cty/cty"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/hashicorp/packer/builder/amazon/common"
|
"github.com/hashicorp/packer/builder/amazon/common"
|
||||||
|
|
||||||
packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer"
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testConfig() map[string]interface{} {
|
func testConfig() map[string]interface{} {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue