From 35c579a9f689e00134e305f61d2d23e6069b3625 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 30 May 2023 14:15:24 -0400 Subject: [PATCH 001/156] CHANGELOG: update for 1.9.0 release --- CHANGELOG.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83f1f035501..4c56a2d840e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -## 1.9.0 (Unreleased) +## 1.9.0 (May 31, 2023) ### NOTES: + * **Breaking Change**: Iteration fingerprints used to be computed from the Git SHA of the repository where the template is located when running packer build. This changes with this release, and now fingerprints are automatically generated @@ -12,13 +13,40 @@ these builds will work exactly as they did before. [GH-12172](https://github.com/hashicorp/packer/pull/12172) +* **Breaking Change**: Community-maintained plugins bundled with the Packer binary have been removed. + These external plugin components are released independently of Packer core and can be installed + directly by the user. Users relying on the external plugin components listed below should refer + to the `packer plugins` sub-command and, if using HCL2, a `required_plugins` block to define a + list of plugins for building a template. + ### PLUGINS + * Remove provisioner plugins for Chef, Converge, Puppet, Salt, and Inspec as vendored plugins. These plugins have been previously archived and not updated in release since being archived. These plugins can be installed using `packer init` or with the Packer plugins sub-command `packer plugins install github.com/hashicorp/chef`. [GH-12374](https://github.com/hashicorp/packer/pull/12374) +* The following community plugins won't be bundled with Packer anymore: + + * [Alicloud](https://github.com/hashicorp/packer-plugin-alicloud) + * [CloudStack](https://github.com/hashicorp/packer-plugin-cloudstack) + * [HCloud](https://github.com/hashicorp/packer-plugin-hcloud) + * [HyperOne](https://github.com/hashicorp/packer-plugin-hyperone) + * [Hyper-V](https://github.com/hashicorp/packer-plugin-hyperv) + * [JDCloud](https://github.com/hashicorp/packer-plugin-jdcloud) + * [LXC](https://github.com/hashicorp/packer-plugin-lxc) + * [LXD](https://github.com/hashicorp/packer-plugin-lxd) + * [NCloud](https://github.com/hashicorp/packer-plugin-ncloud) + * [OpenStack](https://github.com/hashicorp/packer-plugin-openstack) + * [Proxmox](https://github.com/hashicorp/packer-plugin-proxmox) + * [TencentCloud](https://github.com/hashicorp/packer-plugin-tencentcloud) + * [Triton](https://github.com/hashicorp/packer-plugin-triton) + * [Yandex](https://github.com/hashicorp/packer-plugin-yandex) + +Users relying on these external plugin components should refer to the `packer plugins` sub-command and, +if using HCL2, a `required_plugins` block to define a list of plugins to use for building a template. + ### IMPROVEMENTS: * core/hcp: Now, fingerprints used by HCP Packer are randomly generated ULIDs @@ -26,6 +54,14 @@ already specified in the environment. [GH-12172](https://github.com/hashicorp/packer/pull/12172) +### BUG FIXES: + +* Fix LDFLAGS for release pipelines: Between Packer 1.8.5 and Packer 1.8.7, changes + to the LDFLAGS in use for building the binaries for Packer had mistakenly + removed some compilation flags, leading to the final binaries not being stripped. + This change raised the size of the built binaries by as much as 45%. + In this release, we fixed the LDFLAGS during compilation, yielding leaner binaries. + ## 1.8.7 (May 4, 2023) ### NOTES: From f730bd640fe650327168e4e5d3574e0d4e57bde8 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 31 May 2023 11:45:50 -0400 Subject: [PATCH 002/156] changelog: update for release 1.9.0 --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c56a2d840e..b03563e5c40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,8 @@ * [Triton](https://github.com/hashicorp/packer-plugin-triton) * [Yandex](https://github.com/hashicorp/packer-plugin-yandex) + [GH-12436](https://github.com/hashicorp/packer/pull/12436) + Users relying on these external plugin components should refer to the `packer plugins` sub-command and, if using HCL2, a `required_plugins` block to define a list of plugins to use for building a template. @@ -51,7 +53,7 @@ if using HCL2, a `required_plugins` block to define a list of plugins to use for * core/hcp: Now, fingerprints used by HCP Packer are randomly generated ULIDs instead of a Git SHA, and a new one is always generated, unless one is - already specified in the environment. + specified in the environment. [GH-12172](https://github.com/hashicorp/packer/pull/12172) ### BUG FIXES: @@ -62,6 +64,9 @@ if using HCL2, a `required_plugins` block to define a list of plugins to use for This change raised the size of the built binaries by as much as 45%. In this release, we fixed the LDFLAGS during compilation, yielding leaner binaries. +* Bumped gopsutil to v3. This fixes a macOS intermittent crash reported by the community + [GH-12430](https://github.com/hashicorp/packer/issues/12430) + ## 1.8.7 (May 4, 2023) ### NOTES: From ac29a1366b16096abd738baf26937f5cd489ce46 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 31 May 2023 11:50:56 -0400 Subject: [PATCH 003/156] version: prepare for 1.10.0 releases --- version/VERSION | 2 +- version/version.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/version/VERSION b/version/VERSION index f8e233b2733..81c871de46b 100644 --- a/version/VERSION +++ b/version/VERSION @@ -1 +1 @@ -1.9.0 +1.10.0 diff --git a/version/version.go b/version/version.go index e389cebd2e7..c474c80d650 100644 --- a/version/version.go +++ b/version/version.go @@ -22,7 +22,7 @@ var ( // A pre-release marker for the version can also be specified (e.g -dev). If this is omitted // The main version number that is being run at the moment. - Version = "1.9.0" + Version = "1.10.0" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release From 3f4e49e8477f14668046bf2c95db8b7051fcd2f3 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 31 May 2023 16:50:03 -0400 Subject: [PATCH 004/156] CHANGELOG: add advisory on multiproject support On HCP, multiproject support was GA'd recently, but Packer does not support the feature yet. To avoid clients being surprised if they encounter an error with this feature enabled, we add an advisory related to this feature not being supported for now, but planned for later. --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b03563e5c40..80cfffdc52c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,15 @@ if using HCL2, a `required_plugins` block to define a list of plugins to use for * Bumped gopsutil to v3. This fixes a macOS intermittent crash reported by the community [GH-12430](https://github.com/hashicorp/packer/issues/12430) +### HCP Packer -- Multi project support advisory + +If using HCP Packer to store metadata on your builds, please be aware that Packer +does not support this feature yet, and as such, having multiple projects in your +organization will make it impossible to use HCP Packer in this release. + +We are actively working on supporting this feature, which will be available in a +subsequent release. + ## 1.8.7 (May 4, 2023) ### NOTES: From 925cb5e5411d670af9f9e729b8a61daeb4f8b62d Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 1 Jun 2023 11:55:05 -0400 Subject: [PATCH 005/156] hcp: support HCP_PROJECT_ID environment variable With HCP supporting multi-projects now, Packer needs to take it into account when picking a project from an organisation. This commit adds two cases: 1. multiple projects are defined, none is supplied through HCP_PROJECT_ID: in this case we will default to the oldest project defined for the organisation. 2. we supply HCP_PROJECT_ID: in this case, we pick the project with the corresponding ID, and use it for publishing metadata. --- internal/hcp/api/client.go | 55 +++++++++- internal/hcp/api/client_test.go | 163 +++++++++++++++++++++++++++++ internal/hcp/env/env.go | 4 + internal/hcp/env/variables.go | 1 + website/content/docs/hcp/index.mdx | 2 + 5 files changed, 222 insertions(+), 3 deletions(-) create mode 100644 internal/hcp/api/client_test.go diff --git a/internal/hcp/api/client.go b/internal/hcp/api/client.go index a379af61b6f..21a07156cc2 100644 --- a/internal/hcp/api/client.go +++ b/internal/hcp/api/client.go @@ -6,10 +6,14 @@ package api import ( "fmt" + "log" + "os" + "time" packerSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" organizationSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/client/organization_service" projectSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/client/project_service" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" rmmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" "github.com/hashicorp/hcp-sdk-go/httpclient" "github.com/hashicorp/packer/internal/hcp/env" @@ -97,9 +101,54 @@ func (c *Client) loadProjectID() error { if err != nil { return fmt.Errorf("unable to fetch project id: %v", err) } - if len(listProjResp.Payload.Projects) > 1 { - return fmt.Errorf("this version of Packer does not support multiple projects") + + if env.HasProjectID() { + proj, err := findProjectByID(os.Getenv(env.HCPProjectID), listProjResp.Payload.Projects) + if err != nil { + return err + } + + c.ProjectID = proj.ID + } else { + if len(listProjResp.Payload.Projects) > 1 { + log.Printf("[WARNING] Multiple HCP projects found, will pick the oldest one by default\n" + + "To specify which project to use, set the HCP_PROJECT_ID environment variable to the one you want to use.") + } + + proj, err := findOldestProject(listProjResp.Payload.Projects) + if err != nil { + return err + } + + c.ProjectID = proj.ID } - c.ProjectID = listProjResp.Payload.Projects[0].ID + return nil } + +func findOldestProject(projs []*models.HashicorpCloudResourcemanagerProject) (*models.HashicorpCloudResourcemanagerProject, error) { + if len(projs) == 0 { + return nil, fmt.Errorf("no project found") + } + + proj := projs[0] + for i := 1; i < len(projs); i++ { + nxtProj := projs[i] + + if time.Time(nxtProj.CreatedAt).Before(time.Time(proj.CreatedAt)) { + proj = nxtProj + } + } + + return proj, nil +} + +func findProjectByID(projID string, projs []*models.HashicorpCloudResourcemanagerProject) (*models.HashicorpCloudResourcemanagerProject, error) { + for _, proj := range projs { + if proj.ID == projID { + return proj, nil + } + } + + return nil, fmt.Errorf("No project %q found", projID) +} diff --git a/internal/hcp/api/client_test.go b/internal/hcp/api/client_test.go new file mode 100644 index 00000000000..47ff2b5fd98 --- /dev/null +++ b/internal/hcp/api/client_test.go @@ -0,0 +1,163 @@ +package api + +import ( + "testing" + "time" + + "github.com/go-openapi/strfmt" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" +) + +func TestFindProjectID(t *testing.T) { + testcases := []struct { + Name string + ProjectID string + ProjectList []*models.HashicorpCloudResourcemanagerProject + ExpectProjectID string + ExpectErr bool + }{ + { + "Only one project, project exists, success", + "test-project-exists", + []*models.HashicorpCloudResourcemanagerProject{ + { + ID: "test-project-exists", + }, + }, + "test-project-exists", + false, + }, + { + "Multiple projects, project exists, success", + "test-project-exists", + []*models.HashicorpCloudResourcemanagerProject{ + { + ID: "other-project-exists", + }, + { + ID: "test-project-exists", + }, + }, + "test-project-exists", + false, + }, + { + "One project, no id match, fail", + "test-project-exists", + []*models.HashicorpCloudResourcemanagerProject{ + { + ID: "other-project-exists", + }, + }, + "", + true, + }, + { + "Multiple projects, no id match, fail", + "test-project-exists", + []*models.HashicorpCloudResourcemanagerProject{ + { + ID: "other-project-exists", + }, + { + ID: "yet-another-project-exists", + }, + }, + "", + true, + }, + { + "No projects, no id match, fail", + "test-project-exists", + []*models.HashicorpCloudResourcemanagerProject{}, + "", + true, + }, + } + + for _, tt := range testcases { + t.Run(tt.Name, func(t *testing.T) { + proj, err := findProjectByID(tt.ProjectID, tt.ProjectList) + if (err != nil) != tt.ExpectErr { + t.Errorf("test findProjectByID, expected %t, got %t", + tt.ExpectErr, + err != nil) + } + + if proj != nil && proj.ID != tt.ExpectProjectID { + t.Errorf("expected to select project %q, got %q", tt.ExpectProjectID, proj.ID) + } + }) + } +} + +func TestFindOldestProject(t *testing.T) { + testcases := []struct { + Name string + ProjectList []*models.HashicorpCloudResourcemanagerProject + ExpectProjectID string + ExpectErr bool + }{ + { + "Only one project, project exists, success", + []*models.HashicorpCloudResourcemanagerProject{ + { + ID: "test-project-exists", + }, + }, + "test-project-exists", + false, + }, + { + "Multiple projects, pick the oldest", + []*models.HashicorpCloudResourcemanagerProject{ + { + ID: "test-project-exists", + CreatedAt: strfmt.DateTime(time.Date(2023, 1, 1, 1, 0, 0, 0, time.UTC)), + }, + { + ID: "test-oldest-project", + CreatedAt: strfmt.DateTime(time.Date(2022, 1, 1, 1, 0, 0, 0, time.UTC)), + }, + }, + "test-oldest-project", + false, + }, + { + "Multiple projects, different order, pick the oldest", + []*models.HashicorpCloudResourcemanagerProject{ + { + ID: "test-oldest-project", + CreatedAt: strfmt.DateTime(time.Date(2022, 1, 1, 1, 0, 0, 0, time.UTC)), + }, + { + ID: "test-project-exists", + CreatedAt: strfmt.DateTime(time.Date(2023, 1, 1, 1, 0, 0, 0, time.UTC)), + }, + }, + "test-oldest-project", + false, + }, + { + "No projects, should error", + []*models.HashicorpCloudResourcemanagerProject{}, + "", + true, + }, + } + + for _, tt := range testcases { + t.Run(tt.Name, func(t *testing.T) { + proj, err := findOldestProject(tt.ProjectList) + if (err != nil) != tt.ExpectErr { + t.Errorf("test findProjectByID, expected %t, got %t", + tt.ExpectErr, + err != nil) + } + + if proj != nil && proj.ID != tt.ExpectProjectID { + t.Errorf("expected to select project %q, got %q", tt.ExpectProjectID, proj.ID) + } + }) + } +} diff --git a/internal/hcp/env/env.go b/internal/hcp/env/env.go index c07d9cac478..0cf459015e8 100644 --- a/internal/hcp/env/env.go +++ b/internal/hcp/env/env.go @@ -9,6 +9,10 @@ import ( "strings" ) +func HasProjectID() bool { + return hasEnvVar(HCPProjectID) +} + func HasClientID() bool { return hasEnvVar(HCPClientID) } diff --git a/internal/hcp/env/variables.go b/internal/hcp/env/variables.go index 0fc654494b6..71258c13be3 100644 --- a/internal/hcp/env/variables.go +++ b/internal/hcp/env/variables.go @@ -6,6 +6,7 @@ package env const ( HCPClientID = "HCP_CLIENT_ID" HCPClientSecret = "HCP_CLIENT_SECRET" + HCPProjectID = "HCP_PROJECT_ID" HCPPackerRegistry = "HCP_PACKER_REGISTRY" HCPPackerBucket = "HCP_PACKER_BUCKET_NAME" HCPPackerBuildFingerprint = "HCP_PACKER_BUILD_FINGERPRINT" diff --git a/website/content/docs/hcp/index.mdx b/website/content/docs/hcp/index.mdx index de58397e8bf..35f7c2fd425 100644 --- a/website/content/docs/hcp/index.mdx +++ b/website/content/docs/hcp/index.mdx @@ -4,6 +4,8 @@ description: | page_title: HCP Packer --- +-> **Note:** On May 16th 2023, HCP introduced multi-project support to the platform. In order to use multiple projects in your organization, you will need to update Packer to version 1.9.1 or above. Starting with 1.9.1, you may specify a project ID to push builds to with the `HCP_PROJECT_ID` environment variable. If no project ID is specified, Packer will pick the project with the oldest creation date. Older versions of Packer are incompatible with multi-project support on HCP, and builds will fail for HCP organizations with multiple projects on versions before 1.9.1. + # HCP Packer The HCP Packer registry bridges the gap between image factories and image deployments, allowing development and security teams to work together to create, manage, and consume images in a centralized way. From 571adf9f1bd1bf251c9f0e704104734ffa6df04c Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 1 Jun 2023 14:48:07 -0400 Subject: [PATCH 006/156] CHANGELOG: add changelog for v1.9.1 --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80cfffdc52c..ab8a2b2abef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## 1.9.0 (June 1, 2023) + +### BUG FIXES: + +* On May 16th 2023, HCP introduced multi-project support to the platform. + In order to use multiple projects in your organization, you will need to update Packer + to version 1.9.1 or above. Starting with 1.9.1, you may specify a project ID to push + builds to with the `HCP_PROJECT_ID` environment variable. If no project ID is specified, + Packer will pick the project with the oldest creation date. Older versions of Packer are + incompatible with multi-project support on HCP, and builds will fail for HCP + organizations with multiple projects on versions before 1.9.1. + [GH-12453](https://github.com/hashicorp/packer/pull/12453) + ## 1.9.0 (May 31, 2023) ### NOTES: From 2d5d78a306a2ddbc78d27b525a38f33aa632b33c Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 1 Jun 2023 15:36:20 -0400 Subject: [PATCH 007/156] CHANGELOG: fix latest release version --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab8a2b2abef..6107fd2ca1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.9.0 (June 1, 2023) +## 1.9.1 (June 1, 2023) ### BUG FIXES: From 5f038ce8ace0d7c06958cd00644532637bb1b316 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 1 Jun 2023 16:53:37 -0400 Subject: [PATCH 008/156] CHANGELOG: prepare for upcoming v1.9.2 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6107fd2ca1c..d04040aa1a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.9.2 (Upcoming) + ## 1.9.1 (June 1, 2023) ### BUG FIXES: From d563a3c6234eef7edca4a28a9fe55458bd7834f6 Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Mon, 5 Jun 2023 16:05:31 +0000 Subject: [PATCH 009/156] [COMPLIANCE] Add Copyright and License Headers --- internal/hcp/api/client_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/hcp/api/client_test.go b/internal/hcp/api/client_test.go index 47ff2b5fd98..b1cdbff61c2 100644 --- a/internal/hcp/api/client_test.go +++ b/internal/hcp/api/client_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package api import ( From aeffaa790fc054833532d17514dd251403a98f77 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com> Date: Thu, 15 Jun 2023 15:09:00 -0400 Subject: [PATCH 010/156] docs: add a paragraph on fingerprint generation (#12464) * docs: add a paragraph on fingerprint generation Since version 1.9.0+ changed the way Packer generates fingerprints for HCP Packer, we add a small paragraph to explain how it used to be generated before, and how it changed in this version. * Apply suggestions from code review --------- Co-authored-by: Wilken Rivera --- website/content/docs/hcp/index.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/content/docs/hcp/index.mdx b/website/content/docs/hcp/index.mdx index 35f7c2fd425..b7af158ee26 100644 --- a/website/content/docs/hcp/index.mdx +++ b/website/content/docs/hcp/index.mdx @@ -47,6 +47,9 @@ Refer to [`hcp_packer_registry`](/packer/docs/templates/hcl_templates/blocks/bui Packer uses a unique fingerprint for tracking the completion of builds associated to an iteration. By default a fingerprint is automatically generated by Packer during each invocation of `packer build`, unless a fingerprint is manually provided via the `HCP_PACKER_BUILD_FINGERPRINT` environment variable. +In versions before 1.9.0, this fingerprint was computed from the Git SHA of the current HEAD in which your template is stored. If you were running builds using a non Git managed template, you had to set the `HCP_PACKER_BUILD_FINGERPRINT` environment variable prior to invoking `packer build`. +Starting with Packer 1.9.0, fingerprint generation does not rely on Git at all, and instead Packer now generates a Unique Lexicographically sortable Identifier (ULID) as the fingerprint for every `packer build` invocation. + #### Fingerprints and Incomplete Iterations When you build a template with Packer, there's always a chance that it does not succeed because of a network issue, a provisioning failure, or some upstream error. When that happens, Packer will output the generated fingerprint associated with the incomplete iteration so that you can resume building that iteration using the `HCP_PACKER_BUILD_FINGERPRINT` environment variable; an iteration can be resumed until it is marked as complete. This environment variable is necessary for resuming an incomplete iteration, otherwise Packer will create a new iteration for the build. From ffa1e54af5e63c9de550948a43a2d951ad5d324b Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 16 Jun 2023 15:46:53 -0400 Subject: [PATCH 011/156] Delete check-legacy-links-format.yml (#12471) Remove the check-legacy-links-format.yml workflow. These checks are now included as part of our content conformance checks that run on PRs with documentation content changes. --- .github/workflows/check-legacy-links-format.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/workflows/check-legacy-links-format.yml diff --git a/.github/workflows/check-legacy-links-format.yml b/.github/workflows/check-legacy-links-format.yml deleted file mode 100644 index 08c128a9f49..00000000000 --- a/.github/workflows/check-legacy-links-format.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Legacy Link Format Checker - -on: - push: - paths: - - "website/content/**/*.mdx" - - "website/data/*-nav-data.json" - -jobs: - check-links: - uses: hashicorp/dev-portal/.github/workflows/docs-content-check-legacy-links-format.yml@475289345d312552b745224b46895f51cc5fc490 - with: - repo-owner: "hashicorp" - repo-name: "packer" - commit-sha: ${{ github.sha }} - mdx-directory: "website/content" - nav-data-directory: "website/data" From f1c1e496857867075469b2abb7f728484208ecb0 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 11 May 2023 16:48:30 -0400 Subject: [PATCH 012/156] Fix executable directory path --- packer/plugin_folders.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/plugin_folders.go b/packer/plugin_folders.go index 07e74d19121..99ff3b13a40 100644 --- a/packer/plugin_folders.go +++ b/packer/plugin_folders.go @@ -19,7 +19,7 @@ func PluginFolders(dirs ...string) []string { if path, err := os.Executable(); err != nil { log.Printf("[ERR] Error finding executable: %v", err) } else { - res = append(res, path) + res = append(res, filepath.Dir(path)) } res = append(res, dirs...) From f7a0df4bd189b556bf5321178c17ef47e42471a1 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 11 May 2023 16:50:28 -0400 Subject: [PATCH 013/156] Reduce the number of nest plugin scans Packer will try to discover installed plugins in all of the directories defined by packer.KnowPluginFolders. In a previous release logic was added to scan nested directories in order to load plugins installed by `packer plugins install`. This change resulted in a nested directory scan for each folder within the KnownPluginFolders slice. This change reduces the nested directory scan to only the directories where plugins would have been installed using `packer plugins install` --- packer/plugin.go | 224 +++++++++++++++++++++------------ packer/plugin_discover_test.go | 1 + 2 files changed, 147 insertions(+), 78 deletions(-) diff --git a/packer/plugin.go b/packer/plugin.go index 1b64482a89b..4bd5765f159 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -6,6 +6,7 @@ package packer import ( "crypto/sha256" "encoding/json" + "errors" "fmt" "log" "os" @@ -16,7 +17,6 @@ import ( "strings" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - "github.com/hashicorp/packer-plugin-sdk/pathing" pluginsdk "github.com/hashicorp/packer-plugin-sdk/plugin" plugingetter "github.com/hashicorp/packer/packer/plugin-getter" ) @@ -80,50 +80,42 @@ func (c *PluginConfig) Discover() error { return nil } - // TODO: use KnownPluginFolders here. TODO probably after JSON is deprecated - // so that we can keep the current behavior just the way it is. - - // Next, look in the same directory as the executable. - exePath, err := os.Executable() - if err != nil { - log.Printf("[ERR] Error loading exe directory: %s", err) - } else { - if err := c.discoverExternalComponents(filepath.Dir(exePath)); err != nil { - return err - } + if len(c.KnownPluginFolders) == 0 { + return errors.New("no known plugin folders defined") } - // Next, look in the default plugins directory inside the configdir/.packer.d/plugins. - dir, err := pathing.ConfigDir() - if err != nil { - log.Printf("[ERR] Error loading config directory: %s", err) - } else { - if err := c.discoverExternalComponents(filepath.Join(dir, "plugins")); err != nil { + // TODO after JSON is deprecated remove support for legacy component plugins. + for _, knownFolder := range c.KnownPluginFolders { + if err := c.discoverLegacyMonoComponents(knownFolder); err != nil { return err } } - // Next, look in the CWD. - if err := c.discoverExternalComponents("."); err != nil { + // Pick last folder as it's the one with the highest priority + // This is the same logic used when installing plugins via Packer's plugin installation commands. + pluginInstallationPath := c.KnownPluginFolders[len(c.KnownPluginFolders)-1] + if err := c.discoverInstalledComponents(pluginInstallationPath); err != nil { return err } - // Check whether there is a custom Plugin directory defined. This gets - // absolute preference. - if packerPluginPath := os.Getenv("PACKER_PLUGIN_PATH"); packerPluginPath != "" { - sep := ":" - if runtime.GOOS == "windows" { - // on windows, PATH is semicolon-separated - sep = ";" + // Manually installed plugins take precedence over all. Duplicate plugins installed + // prior to the packer plugins install command should be removed by user to avoid overrides. + for _, knownFolder := range c.KnownPluginFolders { + pluginPaths, err := c.discoverSingle(filepath.Join(knownFolder, "packer-plugin-*")) + if err != nil { + return err } - plugPaths := strings.Split(packerPluginPath, sep) - for _, plugPath := range plugPaths { - if err := c.discoverExternalComponents(plugPath); err != nil { + for pluginName, pluginPath := range pluginPaths { + // Test pluginPath points to an executable + if _, err := exec.LookPath(pluginPath); err != nil { + log.Printf("[WARN] %q is not executable; skipping", pluginPath) + continue + } + if err := c.DiscoverMultiPlugin(pluginName, pluginPath); err != nil { return err } } } - return nil } @@ -206,64 +198,86 @@ func (c *PluginConfig) discoverExternalComponents(path string) error { log.Printf("using external datasource %v", externallyUsed) } - //Check for installed plugins using the `packer plugins install` command - binInstallOpts := plugingetter.BinaryInstallationOptions{ - OS: runtime.GOOS, - ARCH: runtime.GOARCH, - APIVersionMajor: pluginsdk.APIVersionMajor, - APIVersionMinor: pluginsdk.APIVersionMinor, - Checksummers: []plugingetter.Checksummer{ - {Type: "sha256", Hash: sha256.New()}, - }, - } + return nil +} - if runtime.GOOS == "windows" { - binInstallOpts.Ext = ".exe" +func (c *PluginConfig) discoverLegacyMonoComponents(path string) error { + var err error + log.Printf("[TRACE] discovering plugins in %s", path) + + if !filepath.IsAbs(path) { + path, err = filepath.Abs(path) + if err != nil { + return err + } } + var externallyUsed []string - pluginPaths, err = c.discoverSingle(filepath.Join(path, "*", "*", "*", fmt.Sprintf("packer-plugin-*%s", binInstallOpts.FilenameSuffix()))) + pluginPaths, err := c.discoverSingle(filepath.Join(path, "packer-builder-*")) if err != nil { return err } - for pluginName, pluginPath := range pluginPaths { - var checksumOk bool - for _, checksummer := range binInstallOpts.Checksummers { - cs, err := checksummer.GetCacheChecksumOfFile(pluginPath) - if err != nil { - log.Printf("[TRACE] GetChecksumOfFile(%q) failed: %v", pluginPath, err) - continue - } - - if err := checksummer.ChecksumFile(cs, pluginPath); err != nil { - log.Printf("[TRACE] ChecksumFile(%q) failed: %v", pluginPath, err) - continue - } - checksumOk = true - break - } - - if !checksumOk { - log.Printf("[TRACE] No checksum found for %q ignoring possibly unsafe binary", path) - continue - } + newPath := pluginPath // this needs to be stored in a new variable for the func below + c.Builders.Set(pluginName, func() (packersdk.Builder, error) { + return c.Client(newPath).Builder() + }) + externallyUsed = append(externallyUsed, pluginName) + } + if len(externallyUsed) > 0 { + sort.Strings(externallyUsed) + log.Printf("[INFO] using external builders: %v", externallyUsed) + externallyUsed = nil + } - if err := c.DiscoverMultiPlugin(pluginName, pluginPath); err != nil { - return err - } + pluginPaths, err = c.discoverSingle(filepath.Join(path, "packer-post-processor-*")) + if err != nil { + return err + } + for pluginName, pluginPath := range pluginPaths { + newPath := pluginPath // this needs to be stored in a new variable for the func below + c.PostProcessors.Set(pluginName, func() (packersdk.PostProcessor, error) { + return c.Client(newPath).PostProcessor() + }) + externallyUsed = append(externallyUsed, pluginName) + } + if len(externallyUsed) > 0 { + sort.Strings(externallyUsed) + log.Printf("using external post-processors %v", externallyUsed) + externallyUsed = nil } - // Manually installed plugins take precedence over all. Duplicate plugins installed - // prior to the packer plugins install command should be removed by user to avoid overrides. - pluginPaths, err = c.discoverSingle(filepath.Join(path, "packer-plugin-*")) + pluginPaths, err = c.discoverSingle(filepath.Join(path, "packer-provisioner-*")) if err != nil { return err } + for pluginName, pluginPath := range pluginPaths { + newPath := pluginPath // this needs to be stored in a new variable for the func below + c.Provisioners.Set(pluginName, func() (packersdk.Provisioner, error) { + return c.Client(newPath).Provisioner() + }) + externallyUsed = append(externallyUsed, pluginName) + } + if len(externallyUsed) > 0 { + sort.Strings(externallyUsed) + log.Printf("using external provisioners %v", externallyUsed) + externallyUsed = nil + } + pluginPaths, err = c.discoverSingle(filepath.Join(path, "packer-datasource-*")) + if err != nil { + return err + } for pluginName, pluginPath := range pluginPaths { - if err := c.DiscoverMultiPlugin(pluginName, pluginPath); err != nil { - return err - } + newPath := pluginPath // this needs to be stored in a new variable for the func below + c.DataSources.Set(pluginName, func() (packersdk.Datasource, error) { + return c.Client(newPath).Datasource() + }) + externallyUsed = append(externallyUsed, pluginName) + } + if len(externallyUsed) > 0 { + sort.Strings(externallyUsed) + log.Printf("using external datasource %v", externallyUsed) } return nil @@ -291,7 +305,7 @@ func (c *PluginConfig) discoverSingle(glob string) (map[string]string, error) { // We could do a full PATHEXT parse, but this is probably good enough. if runtime.GOOS == "windows" && strings.ToLower(filepath.Ext(file)) != ".exe" { log.Printf( - "[DEBUG] Ignoring plugin match %s, no exe extension", + "[TRACE] Ignoring plugin match %s, no exe extension", match) continue } @@ -307,7 +321,7 @@ func (c *PluginConfig) discoverSingle(glob string) (map[string]string, error) { // After the split the plugin name is "baz". pluginName = strings.SplitN(pluginName, "_", 2)[0] - log.Printf("[DEBUG] Discovered plugin: %s = %s", pluginName, match) + log.Printf("[INFO] Discovered potential plugin: %s = %s", pluginName, match) res[pluginName] = match } @@ -426,9 +440,9 @@ func (c *PluginConfig) Client(path string, args ...string) *PluginClient { } if strings.Contains(originalPath, PACKERSPACE) { - log.Printf("[TRACE] Starting internal plugin %s", args[len(args)-1]) + log.Printf("[INFO] Starting internal plugin %s", args[len(args)-1]) } else { - log.Printf("[TRACE] Starting external plugin %s %s", path, strings.Join(args, " ")) + log.Printf("[INFO] Starting external plugin %s %s", path, strings.Join(args, " ")) } var config PluginClientConfig config.Cmd = exec.Command(path, args...) @@ -437,3 +451,57 @@ func (c *PluginConfig) Client(path string, args ...string) *PluginClient { config.MaxPort = c.PluginMaxPort return NewClient(&config) } + +// discoverInstalledComponents scans the provided path for plugins installed by running packer plugins install or packer init. +// Valid plugins contain a matching system binary and valid checksum file. +func (c *PluginConfig) discoverInstalledComponents(path string) error { + //Check for installed plugins using the `packer plugins install` command + binInstallOpts := plugingetter.BinaryInstallationOptions{ + OS: runtime.GOOS, + ARCH: runtime.GOARCH, + APIVersionMajor: pluginsdk.APIVersionMajor, + APIVersionMinor: pluginsdk.APIVersionMinor, + Checksummers: []plugingetter.Checksummer{ + {Type: "sha256", Hash: sha256.New()}, + }, + } + + if runtime.GOOS == "windows" { + binInstallOpts.Ext = ".exe" + } + + pluginPath := filepath.Join(path, "*", "*", "*", fmt.Sprintf("packer-plugin-*%s", binInstallOpts.FilenameSuffix())) + pluginPaths, err := c.discoverSingle(pluginPath) + if err != nil { + return err + } + + for pluginName, pluginPath := range pluginPaths { + var checksumOk bool + for _, checksummer := range binInstallOpts.Checksummers { + cs, err := checksummer.GetCacheChecksumOfFile(pluginPath) + if err != nil { + log.Printf("[TRACE] GetChecksumOfFile(%q) failed: %v", pluginPath, err) + continue + } + + if err := checksummer.ChecksumFile(cs, pluginPath); err != nil { + log.Printf("[TRACE] ChecksumFile(%q) failed: %v", pluginPath, err) + continue + } + checksumOk = true + break + } + + if !checksumOk { + log.Printf("[WARN] No checksum found for %q ignoring possibly unsafe binary", path) + continue + } + + if err := c.DiscoverMultiPlugin(pluginName, pluginPath); err != nil { + return err + } + } + + return nil +} diff --git a/packer/plugin_discover_test.go b/packer/plugin_discover_test.go index 91e8ba6b318..32dccf9aae6 100644 --- a/packer/plugin_discover_test.go +++ b/packer/plugin_discover_test.go @@ -24,6 +24,7 @@ func newPluginConfig() PluginConfig { var conf PluginConfig conf.PluginMinPort = 10000 conf.PluginMaxPort = 25000 + conf.KnownPluginFolders = []string{os.TempDir()} return conf } From 4347e8cee80729e85fadca9b2dcc6fd564115ce9 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 23 May 2023 21:05:35 -0400 Subject: [PATCH 014/156] Default to PuluginFolders is KnownPluginFolders is unset * PACKER_PLUGIN_PATH takes precedence over all --- packer/plugin.go | 3 +-- packer/plugin_discover_test.go | 1 - packer/plugin_folders.go | 9 +++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packer/plugin.go b/packer/plugin.go index 4bd5765f159..5e4360f4fd6 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -6,7 +6,6 @@ package packer import ( "crypto/sha256" "encoding/json" - "errors" "fmt" "log" "os" @@ -81,7 +80,7 @@ func (c *PluginConfig) Discover() error { } if len(c.KnownPluginFolders) == 0 { - return errors.New("no known plugin folders defined") + c.KnownPluginFolders = PluginFolders() } // TODO after JSON is deprecated remove support for legacy component plugins. diff --git a/packer/plugin_discover_test.go b/packer/plugin_discover_test.go index 32dccf9aae6..91e8ba6b318 100644 --- a/packer/plugin_discover_test.go +++ b/packer/plugin_discover_test.go @@ -24,7 +24,6 @@ func newPluginConfig() PluginConfig { var conf PluginConfig conf.PluginMinPort = 10000 conf.PluginMaxPort = 25000 - conf.KnownPluginFolders = []string{os.TempDir()} return conf } diff --git a/packer/plugin_folders.go b/packer/plugin_folders.go index 99ff3b13a40..52d63aac4cc 100644 --- a/packer/plugin_folders.go +++ b/packer/plugin_folders.go @@ -16,6 +16,11 @@ import ( func PluginFolders(dirs ...string) []string { res := []string{} + if packerPluginPath := os.Getenv("PACKER_PLUGIN_PATH"); packerPluginPath != "" { + res = append(res, strings.Split(packerPluginPath, string(os.PathListSeparator))...) + return res + } + if path, err := os.Executable(); err != nil { log.Printf("[ERR] Error finding executable: %v", err) } else { @@ -30,9 +35,5 @@ func PluginFolders(dirs ...string) []string { res = append(res, filepath.Join(cd, "plugins")) } - if packerPluginPath := os.Getenv("PACKER_PLUGIN_PATH"); packerPluginPath != "" { - res = append(res, strings.Split(packerPluginPath, string(os.PathListSeparator))...) - } - return res } From 18cc6edbd5e4dc9384976ecf5c7b307add010986 Mon Sep 17 00:00:00 2001 From: Dylan Staley <88163+dstaley@users.noreply.github.com> Date: Fri, 23 Jun 2023 15:05:27 -0700 Subject: [PATCH 015/156] docs: move community tools to docs folder --- website/content/{ => docs}/community-tools.mdx | 0 website/data/docs-nav-data.json | 4 ++++ 2 files changed, 4 insertions(+) rename website/content/{ => docs}/community-tools.mdx (100%) diff --git a/website/content/community-tools.mdx b/website/content/docs/community-tools.mdx similarity index 100% rename from website/content/community-tools.mdx rename to website/content/docs/community-tools.mdx diff --git a/website/data/docs-nav-data.json b/website/data/docs-nav-data.json index e1de91658f1..7c7e110d518 100644 --- a/website/data/docs-nav-data.json +++ b/website/data/docs-nav-data.json @@ -887,6 +887,10 @@ "title": "Integration Program", "path": "partnerships" }, + { + "title": "Community Tools", + "path": "community-tools" + }, { "divider": true }, From 8982d4f168dd3042a53883408b4ff154d1f2a46a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 3 Jul 2023 14:13:08 -0400 Subject: [PATCH 016/156] Migrate external Parallels plugin to Parallels/packer-plugin-parallels (#12476) * Update external plugin documentation source The Parallels plugin for Packer is now maintained by the Parallels team, under their respective GitHub org. This changes updates the source address for the external plugin that should be used for pulling new plugin documentation. * Removed packer-plugin-parallels for list of vendored plugins --- command/vendored_plugins.go | 4 ---- go.mod | 3 +-- go.sum | 2 -- website/data/plugins-manifest.json | 5 +++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/command/vendored_plugins.go b/command/vendored_plugins.go index 79a8af171c6..0718b91a7c5 100644 --- a/command/vendored_plugins.go +++ b/command/vendored_plugins.go @@ -32,8 +32,6 @@ import ( googlecomputebuilder "github.com/hashicorp/packer-plugin-googlecompute/builder/googlecompute" googlecomputeexportpostprocessor "github.com/hashicorp/packer-plugin-googlecompute/post-processor/googlecompute-export" googlecomputeimportpostprocessor "github.com/hashicorp/packer-plugin-googlecompute/post-processor/googlecompute-import" - parallelsisobuilder "github.com/hashicorp/packer-plugin-parallels/builder/parallels/iso" - parallelspvmbuilder "github.com/hashicorp/packer-plugin-parallels/builder/parallels/pvm" qemubuilder "github.com/hashicorp/packer-plugin-qemu/builder/qemu" vagrantbuilder "github.com/hashicorp/packer-plugin-vagrant/builder/vagrant" vagrantpostprocessor "github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant" @@ -69,8 +67,6 @@ var VendoredBuilders = map[string]packersdk.Builder{ "azure-dtl": new(azuredtlbuilder.Builder), "docker": new(dockerbuilder.Builder), "googlecompute": new(googlecomputebuilder.Builder), - "parallels-iso": new(parallelsisobuilder.Builder), - "parallels-pvm": new(parallelspvmbuilder.Builder), "qemu": new(qemubuilder.Builder), "vagrant": new(vagrantbuilder.Builder), "vsphere-clone": new(vsphereclonebuilder.Builder), diff --git a/go.mod b/go.mod index bc42114765a..fa48d7d58da 100644 --- a/go.mod +++ b/go.mod @@ -59,11 +59,11 @@ require ( ) require ( + github.com/go-openapi/strfmt v0.21.3 github.com/hashicorp/packer-plugin-ansible v1.0.3 github.com/hashicorp/packer-plugin-azure v1.4.0 github.com/hashicorp/packer-plugin-docker v1.0.8 github.com/hashicorp/packer-plugin-googlecompute v1.1.0 - github.com/hashicorp/packer-plugin-parallels v1.0.3 github.com/hashicorp/packer-plugin-qemu v1.0.9 github.com/hashicorp/packer-plugin-vagrant v1.0.3 github.com/hashicorp/packer-plugin-virtualbox v1.0.4 @@ -127,7 +127,6 @@ require ( github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/loads v0.21.2 // indirect github.com/go-openapi/spec v0.20.8 // indirect - github.com/go-openapi/strfmt v0.21.3 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/go-openapi/validate v0.22.1 // indirect github.com/gofrs/uuid v4.0.0+incompatible // indirect diff --git a/go.sum b/go.sum index bd6a68ceadb..96c6e63f953 100644 --- a/go.sum +++ b/go.sum @@ -457,8 +457,6 @@ github.com/hashicorp/packer-plugin-docker v1.0.8 h1:UWPG/pl+1RFsaNQVhEuowCeOZuES github.com/hashicorp/packer-plugin-docker v1.0.8/go.mod h1:4U3gHULbUw3okSqqZgQZD5ptyJKs0S7LfOOt2U3V4Jk= github.com/hashicorp/packer-plugin-googlecompute v1.1.0 h1:/cSZCJuRV6osaSa1uOy8cpN+c/uiCbrSsZ8vyNC0slk= github.com/hashicorp/packer-plugin-googlecompute v1.1.0/go.mod h1:k7MhKwEDw9ASP3a1y1syKJFZiZ8pO4oH40HvVgGHzUE= -github.com/hashicorp/packer-plugin-parallels v1.0.3 h1:smypphUCEj3arCdlvbNtZvGC1ujsUSRtN1MBvZHt/w8= -github.com/hashicorp/packer-plugin-parallels v1.0.3/go.mod h1:Q842nvosVmP5FnYozk8ZZj93HGIan19jHTxGeteBCb0= github.com/hashicorp/packer-plugin-qemu v1.0.9 h1:1YKBBzBULYUBWtpAZJTbaLjjZPAdQ63okkpTqMBTnzM= github.com/hashicorp/packer-plugin-qemu v1.0.9/go.mod h1:BpWIpVpOoPFV9Ppmzq4DP/S0QNoh1R+7DUCqxHdXc+Y= github.com/hashicorp/packer-plugin-sdk v0.4.0 h1:UyLYe0y02D9wkOQ3FeeZWyFg2+mx2vLuWRGUL5xt50I= diff --git a/website/data/plugins-manifest.json b/website/data/plugins-manifest.json index ee9c1f5daf5..675c8e7271d 100644 --- a/website/data/plugins-manifest.json +++ b/website/data/plugins-manifest.json @@ -235,8 +235,9 @@ { "title": "Parallels", "path": "parallels", - "repo": "hashicorp/packer-plugin-parallels", - "version": "latest" + "repo": "parallels/packer-plugin-parallels", + "version": "latest", + "pluginTier": "verified" }, { "title": "Profitbricks", From 9c85fc274af579aee846b21cdbc0b89f8eaefb0f Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 6 Jul 2023 16:00:36 -0400 Subject: [PATCH 017/156] Update plugin loading documentation (#12485) Packer checks a number of directories for plugins upon initialization, with the introduction of multi-component plugins and underlying changes to the Packer SDK the ordering changed slightly. These changes update the related documentation to reflect the new ordering, and adds a plugin loading ordering section to the docs to help users discover how plugin loading works. Include in this change are updates to the PACKER_CONFIG_DIR environment variables to reflect the XDG base directory specification used as the default Packer configuration directory layout. * Update website/content/docs/configure.mdx --- website/content/docs/configure.mdx | 80 +++++------- .../content/docs/plugins/install-plugins.mdx | 114 +++++++++--------- .../partials/plugins/plugin-location.mdx | 71 +++-------- 3 files changed, 107 insertions(+), 158 deletions(-) diff --git a/website/content/docs/configure.mdx b/website/content/docs/configure.mdx index cce9f1b554b..1ab98692584 100644 --- a/website/content/docs/configure.mdx +++ b/website/content/docs/configure.mdx @@ -13,69 +13,42 @@ so you generally don't have to worry about it until you want to tweak a configuration. If you're just getting started with Packer, don't worry about core configuration for now. -## Packer's home directory - -Plugins and core configuration files can exist in the home directory of Packer. -The home directory of Packer will be the first one of the following env values -to be set : - -| Unix | Windows | -| ---------------------- | --------------------- | -| `${PACKER_CONFIG_DIR}` | `%PACKER_CONFIG_DIR%` | -| `${APPDATA}` | `%APPDATA%` | -| `${HOME}` | `%HOME%` | -| user dir of `${USER}` | user dir of `${USER}` | - --> Note: On this page "Packer's home directory" will be referenced as -`PACKER_HOME_DIR`. - -## Packer's config file - -Packer can optionally read a JSON file for the end user to set core settings. -The config file of Packer will be looked up on the following paths: - -| Unix | Windows | -| -------------------------------- | -------------------------------- | -| `${PACKER_CONFIG}` | `%PACKER_CONFIG%` | -| `PACKER_HOME_DIR/.packerconfig` | `PACKER_HOME_DIR/packer.config/` | -| `${XDG_CONFIG_HOME}/packer` | | -| `PACKER_HOME_DIR/.config/packer` | | - ## Packer's config directory Packer's configuration directory can potentially contain plugins and internal -Packer files. The config dir of Packer will be looked up on the following paths: +Packer files. The Packer config directory will be looked up on the following paths: | Unix | Windows | | --------------------------- | --------------------------- | -| `PACKER_HOME_DIR/.packer.d` | `PACKER_HOME_DIR/packer.d/` | +| `${HOME}/.config/packer/` | `%APPDATA%\packer.d\` | + +-> **Note:** On Unix systems, Packer defaults to using the XDG base directory specification. +When the environment variable `PACKER_CONFIG_DIR` is unset or empty a default equal to `$HOME/.config/packer` should be used. +In all other cases, where there is an existing older style `.packer.d` directory (e.g `$HOME/.packer.d/`) or PACKER_CONFIG_DIR is not empty +the older configuration directory will be used. Examples: -- On a Unix system, if the `$PACKER_CONFIG_DIR` env var is set to +- On a Unix system, if the `$PACKER_CONFIG_DIR` environment variable is set to `/home/packer`, the config directory will be: `/home/packer/.packer.d/` and other values will not be checked. -- On a Unix system, if the `HOME` env var is `/home/azr` or the `USER` env var - is `azr`, then the config directory will default to `/home/azr/.packer.d/`. -- On a Windows system, if the `PACKER_CONFIG_DIR` env var is set to `C:/`,the +- On a Windows system, if the `PACKER_CONFIG_DIR` environment variable is set to `C:/`,the config directory will be: `C:/packer.d/` and other values will not be checked. -## Packer's plugin directory - -@include "plugins/plugin-location.mdx" + +## Packer's config file (deprecated) -The format of the configuration file is basic JSON. +Packer can optionally read a JSON file for the end user to set core settings. +The config file of Packer will be looked up on the following paths: -## Packer's cache directory +| Unix | Windows | +| -------------------------------- | --------------------------------- | +| `${PACKER_CONFIG}` | `%PACKER_CONFIG%` | +| `${HOME}/.packerconfig` | `%APPDATA%\packer.config\` | -Packer uses a cache directory to download large files and for logistics around -large file download. By default, Packer caches things in the current directory, -under: `./packer_cache/`. This can be changed by setting the `PACKER_CACHE_DIR` -env var. It is recommended to share the same Packer cache dir across your -builds if you have multiple builds doing similar things to avoid downloading the -same ISO twice for example. +The format of the configuration file is basic JSON. -## Packer config file configuration Reference +### Packer config file configuration Reference Below is the list of all available configuration parameters for the core configuration file. None of these are required, since all have defaults. @@ -94,13 +67,20 @@ configuration file. None of these are required, since all have defaults. and the [`packer init`](/packer/docs/commands/init) command to install plugins; if you are using both, the `required_plugin` config will take precedence. -### HCP Packer Configuration +## Packer's plugin directory + +@include "plugins/plugin-location.mdx" -You can configure both legacy JSON and HCL2 Packer templates to publish image metadata to an active HCP Packer registry. The HCP Packer registry helps you track information about machine images, clearly designate which images are appropriate for test and production environments, and query the right images to use in both Packer and Terraform configurations. +## Packer's cache directory -For complete configuration details and examples, refer to [Packer Template Configuration](/hcp/docs/packer/store-image-metadata/template-configuration) in the HCP Packer documentation. +Packer uses a cache directory to download large files and for logistics around +large file download. By default, Packer caches things in the current directory, +under: `./packer_cache/`. This can be changed by setting the `PACKER_CACHE_DIR` +env var. It is recommended to share the same Packer cache directory across your +builds if you have multiple builds doing similar things to avoid downloading the +same ISO twice for example. -## Full list of Environment Variables usable for Packer +## Environment Variables usable for Packer Packer uses a variety of environmental variables. A listing and description of each can be found below: diff --git a/website/content/docs/plugins/install-plugins.mdx b/website/content/docs/plugins/install-plugins.mdx index 86ec7c5c15f..3af8ebbbf4c 100644 --- a/website/content/docs/plugins/install-plugins.mdx +++ b/website/content/docs/plugins/install-plugins.mdx @@ -13,6 +13,10 @@ post-processor components that ship with the Packer binary. Packer automatically This page explains how to install custom external plugins. Refer to [External Plugins](/packer/plugins) for a list of available plugins and their documentation. +## Plugin Loading Order + +@include "plugins/plugin-location.mdx" + ## Installation Guides Choose the tab that corresponds to the type of plugin you want to install. If you are not sure, check the plugin's name. @@ -22,10 +26,10 @@ Choose the tab that corresponds to the type of plugin you want to install. If yo -~> **Note**: Only _multi-component plugin binaries_ -- that is plugins named +-> **Note:** Only _multi-component plugin binaries_ -- plugins named packer-plugin-\*, like the `packer-plugin-amazon` -- are expected to work with Packer init. The legacy `builder`, `post-processor` and `provisioner` plugin -types will keep on being detected but Packer cannot install them automatically. +types will continue to be detected but Packer cannot install them automatically. If a plugin you use has not been upgraded to use the multi-component plugin architecture, contact your maintainer to request an upgrade. @@ -64,9 +68,8 @@ packer { Each plugin has two identifiers: -- A `source` address, which is only necessary when requiring a plugin outside the HashiCorp domain. -- A unique **local name**, which is used everywhere else in a Packer - configuration. +- A `source` address, which is necessary when requiring a plugin not bundled with the Packer binary. +- A unique **local name**, which is used everywhere else in a Packer configuration. ## Local Names @@ -135,7 +138,8 @@ follows: For example, the fictional `myawesomecloud` plugin could belong to the `hashicorp` namespace on `github.com`, so its `source` could be `github.com/hashicorp/myawesomecloud`, -Note: the actual _repository_ that myawesomecloud comes from must always have + +-> Note: the actual _repository_ that myawesomecloud comes from must always have the name format `github.com/hashicorp/packer-plugin-myawesomecloud`, but the `required_plugins` block omits the redundant `packer-plugin-` repository prefix for brevity. @@ -144,9 +148,34 @@ The source address with all three components given explicitly is called the plugin's _fully-qualified address_. You will see fully-qualified address in various outputs, like error messages. -## Plugin location +## Plugin Installation Workflow -@include "plugins/plugin-location.mdx" +* [`packer init`](/packer/docs/commands/init) will install plugins in the **last** directory +in the following numbered list. + +1. `PACKER_PLUGINS_PATH` if set will be the sole location for installing plugins. All other +plugin directories will be ignored. +1. `PACKER_CONFIG_DIR`\plugins on Windows systems, or `PACKER_CONFIG_DIR`/plugins on all other systems. + +* During the initialization of Packer, any plugin required in the +**`required_plugins`** section will be looked up in all entries of the following +list. **First** plugin found takes precedence. Two binaries of the same plugin +with two different version will be considered as two different plugins. Highest +found version matching `required_plugins` will be taken into consideration. + +During initialization, on a `darwin_amd64` system, Packer will look-up for the +following files: + +* `PACKER_PLUGIN_PATH/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` +* `PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` + +The first plugin-name/version files found will take precedence. + +For plugins located under the `github.com/azr/happycloud/` directory structure an accompanying SHA256SUM file +will be required in order for `packer init` to ensure the plugin being loaded has not been tampered with. +The SHA256SUM file will be automatically generated when a plugin is installed via `packer init` if the plugin +was installed manually into `PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/` then the file +`PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64_SHA256SUM` must be generated manually as well. ## Implicit Github urls @@ -171,37 +200,32 @@ will avoid conflicting with other plugins for other tools, like Terraform. --> The [`packer plugins`](/packer/docs/commands/plugins) command allows to install plugins without going through -`init`. For manual installation of plugin binaries, without the `packer plugins` command, please continue reading. +-> The [`packer plugins`](/packer/docs/commands/plugins), available from Packer v1.8.0, command allows +you to install plugins without going through `init`. -The easiest way to manually install a plugin is to name it correctly, then place -it in the proper directory. To name a plugin correctly, make sure the binary is -named `packer-plugin-NAME`. For example, `packer-plugin-amazon` for a "plugin" -binary named "amazon". This binary will make one or more components available to -use. Valid types for plugins are down this page. - -Once the plugin is named properly, Packer automatically discovers plugins in -the following directories in the given order. If a conflicting plugin is found -later, it will take precedence over one found earlier. +```shell +packer plugins install github.com/hashicorp/vagrant +``` -1. The directory where `packer` is, or the executable directory. +## Plugin Installation Workflow +Plugin installation via `packer plugins install` works similar to that of the `packer init` command, with the following +exceptions no `required_plugins` block required and can be used with both legacy JSON and HCL2 templates. -2. The `$HOME/.packer.d/plugins` directory, if `$HOME` is defined (Unix) +* [`packer plugins install`](/packer/docs/commands/plugins) will install plugins in the **last** directory +in the following numbered list. -3. The `%APPDATA%/packer.d/plugins` if `%APPDATA%` is defined (Windows) +1. `PACKER_PLUGINS_PATH` if set will be the sole location for installing plugins. All other +plugin directories will be ignored. +1. `PACKER_CONFIG_DIR`\plugins on Windows systems, or `PACKER_CONFIG_DIR`/plugins on all other systems. -4. The `%USERPROFILE%/packer.d/plugins` if `%USERPROFILE%` is defined - (Windows) -5. The current working directory. +For manual installation of plugin binaries, without the `packer plugins` command, please continue reading. -6. The directory defined in the env var `PACKER_PLUGIN_PATH`. There can be more - than one directory defined; for example, `~/custom-dir-1:~/custom-dir-2`. - Separate directories in the PATH string using a colon (`:`) on POSIX systems and - a semicolon (`;`) on Windows systems. The above example path would be able to - find a provisioner named `packer-provisioner-foo` in either - `~/custom-dir-1/packer-provisioner-foo` or - `~/custom-dir-2/packer-provisioner-foo`. +The easiest way to manually install a plugin is to name it correctly, then place +it in the proper directory. To name a plugin correctly, make sure the binary is +named `packer-plugin-NAME`. For example, `packer-plugin-amazon` for a "plugin" +binary named "amazon". This binary will make one or more components available to +use. Valid types for plugins are down this page. The valid types for plugins are: @@ -217,6 +241,7 @@ The valid types for plugins are: - `provisioner` - A provisioner to install software on images created by a builder. + @@ -226,29 +251,6 @@ named `packer-COMPONENT-NAME`. For example, `packer-provisioner-comment` for a " binary named "comment". This binary will make a single provisioner named `comment` available to use. Valid types for plugins are down this page. -Once the plugin is named properly, Packer automatically discovers plugins in -the following directories in the given order. If a conflicting plugin is found -later, it will take precedence over one found earlier. - -1. The directory where `packer` is, or the executable directory. - -2. The `$HOME/.packer.d/plugins` directory, if `$HOME` is defined (Unix) - -3. The `%APPDATA%/packer.d/plugins` if `%APPDATA%` is defined (Windows) - -4. The `%USERPROFILE%/packer.d/plugins` if `%USERPROFILE%` is defined - (Windows) - -5. The current working directory. - -6. The directory defined in the env var `PACKER_PLUGIN_PATH`. There can be more - than one directory defined; for example, `~/custom-dir-1:~/custom-dir-2`. - Separate directories in the PATH string using a colon (`:`) on POSIX systems and - a semicolon (`;`) on Windows systems. The above example path would be able to - find a provisioner named `packer-provisioner-foo` in either - `~/custom-dir-1/packer-provisioner-foo` or - `~/custom-dir-2/packer-provisioner-foo`. - The valid types for plugins are: - `plugin` - A plugin binary that can contain one or more of each Packer component @@ -264,4 +266,4 @@ The valid types for plugins are: builder. - \ No newline at end of file + diff --git a/website/content/partials/plugins/plugin-location.mdx b/website/content/partials/plugins/plugin-location.mdx index eec78bf10b9..d8e997c7d44 100644 --- a/website/content/partials/plugins/plugin-location.mdx +++ b/website/content/partials/plugins/plugin-location.mdx @@ -1,58 +1,25 @@ -Plugins will usually be located in the -[PACKER_HOME_DIR](/packer/docs/configure#packer-s-home-directory). +Upon the initialization of Packer, any externally installed plugin will be automatically +discovered and loaded. -* [`packer init`](/packer/docs/commands/init) will install plugins in the **last** directory -in the following numbered list. +Packer plugins will usually be located within a plugins sub-directory under Packer's main config directory +[PACKER_CONFIG_DIR](/packer/docs/configure#packer-s-config-directory). If `PACKER_CONFIG_DIR` is +either not set or empty, a default equal to `$HOME/.config/packer/plugins` on UNIX, or `%APPDATA%\packer.d\plugins` +for Windows, will be used. -* During the initialization of Packer, any plugin required in the -**`required_plugins`** section will be looked up in all entries of the following -list. **First** plugin found takes precedence. Two binaries of the same plugin -with two different version will be considered as two different plugins. Highest -found version matching `required_plugins` will be taken into consideration. +Where applicable, some installation processes such as `packer init` may override the plugin loading process. +Refer to the specific installation guides for any plugin loading overrides. -1. The directory where `packer` is, or the executable directory. -1. The current working directory. (`"."`) -1. The `PACKER_HOME_DIR/plugins` directory. `PACKER_HOME_DIR` refers to *[Packer's home -directory](/packer/docs/configure#packer-s-home-directory)*, if it could be found. -1. The director(y/ies) under the `PACKER_PLUGIN_PATH` env var, if `PACKER_PLUGIN_PATH` -is set. +Packer uses the following process for loading the correct plugin: -~> **Note**: There can be more than one directory in the `PACKER_PLUGIN_PATH` -env var, it will be seperated by a semicolon (`;`) on Windows systems and a -colon (`:`) on other systems. The order priority will be kept. +1. All directories under the `PACKER_PLUGIN_PATH` environment variable, if `PACKER_PLUGIN_PATH` +is set. The `PACKER_PLUGIN_PATH` takes precedences over all other plugin directories; no other directories will be checked. +1. The directory where `packer` is installed, or the executable directory. +1. The current working directory, where `packer build` is being invoked. (`"."`) +1. The `PACKER_CONFIG_DIR/plugins` directory. `PACKER_CONFIG_DIR` refers to *[Packer's config +directory](/packer/docs/configure#packer-s-config-directory)*, if it could be found. -Using the following example : -```hcl - required_plugins { - happycloud = { - version = ">= 2.7.0" - source = "github.com/azr/happycloud" - } - } -``` +-> **Note:** The `PACKER_PLUGIN_PATH` environment variable can be set to more that one directories; +for example, ~/custom-dir-1:~/custom-dir-2. Separate directories in the PATH string using a colon (:) on UNIX systems +and a semicolon (;) on Windows systems. The above example path would be able to find a single or multi-component plugin +in either `~/custom-dir-1/packer/` or `~/custom-dir-2/`. -The plugin getter will then install the binaries in the following location for a -system with no `PACKER_PLUGIN_PATH` env var set. - -* `PACKER_HOME_DIR/plugins/github.com/hashicorp/happycloud/` - -During initialization, on a `darwin_amd64` system, Packer will look-up for the -following files: - -* `PACKER_EXEC_DIR/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` -* `./github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` -* `PACKER_HOME_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` -* `PACKER_PLUGIN_PATH/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` -* `./packer-plugin-happycloud` - -The first plugin-name/version files found will take precedence. - -For plugins located under the `github.com/azr/happycloud/` directory structure an accompanying SHA256SUM file -will be required in order for `packer init` to ensure the plugin being loaded has not been tampered with. -The SHA256SUM file will be automatically generated when a plugin is installed via `packer init` if the plugin -was installed manually into `PACKER_HOME_DIR/plugins/github.com/azr/happycloud/` then the file -`PACKER_HOME_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64_SHA256SUM` must be generated manually as well. - --> Note: `PACKER_HOME_DIR` is not an actual env var and refers to [Packer's home -directory](#packer-s-home-directory). `PACKER_EXEC_DIR` is not an actual env var -and refers to the directory where `packer` is, or the executable directory. From 8beddcf52aa2f56594848a13d666e8356140aede Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 12 Jul 2023 10:24:05 -0400 Subject: [PATCH 018/156] website: fix header on configure page When the config file header was reworked, an erroneous link was included and placed so close to the header that it was rendered verbatim in the final documentation page. By adding an extra empty line in between the anchor link and the header, this renders correctly. --- website/content/docs/configure.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/content/docs/configure.mdx b/website/content/docs/configure.mdx index 1ab98692584..18eeb409396 100644 --- a/website/content/docs/configure.mdx +++ b/website/content/docs/configure.mdx @@ -36,6 +36,7 @@ Examples: config directory will be: `C:/packer.d/` and other values will not be checked. + ## Packer's config file (deprecated) Packer can optionally read a JSON file for the end user to set core settings. From 0e3de18e989ec7d366679d6ebd95e8437c81798d Mon Sep 17 00:00:00 2001 From: akkuman Date: Thu, 13 Jul 2023 16:41:50 +0800 Subject: [PATCH 019/156] fix: revise env var PACKER_PLUGIN_PATH ref: https://github.com/hashicorp/packer/pull/8616/files#diff-0e426a43248661127a0c0ee115aef7a1093b635f8993b3f7ebb1dd9f05b8f249R153 --- website/content/docs/plugins/install-plugins.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/plugins/install-plugins.mdx b/website/content/docs/plugins/install-plugins.mdx index 3af8ebbbf4c..0460e6c561c 100644 --- a/website/content/docs/plugins/install-plugins.mdx +++ b/website/content/docs/plugins/install-plugins.mdx @@ -153,7 +153,7 @@ various outputs, like error messages. * [`packer init`](/packer/docs/commands/init) will install plugins in the **last** directory in the following numbered list. -1. `PACKER_PLUGINS_PATH` if set will be the sole location for installing plugins. All other +1. `PACKER_PLUGIN_PATH` if set will be the sole location for installing plugins. All other plugin directories will be ignored. 1. `PACKER_CONFIG_DIR`\plugins on Windows systems, or `PACKER_CONFIG_DIR`/plugins on all other systems. From 456bc2397b3950860d09eb4c3ca324dcc2ac512f Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 17 Jul 2023 11:25:42 -0400 Subject: [PATCH 020/156] hcl2template: only warn once for missing plugins In HCL2, if a template contains a `required_plugins' block, but the required plugins are not installed, we print a warning. Prior to this commit, this was reported as an error once per missing plugin, which was redundant. This commit changes that by gathering all the missing plugins once, and printing them as a bullet list, so the message isn't redundant anymore. --- hcl2template/plugin.go | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/hcl2template/plugin.go b/hcl2template/plugin.go index bd1080b836b..1c32ef7779e 100644 --- a/hcl2template/plugin.go +++ b/hcl2template/plugin.go @@ -8,6 +8,7 @@ import ( "fmt" "log" "runtime" + "strings" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/packer-plugin-sdk/didyoumean" @@ -77,6 +78,8 @@ func (cfg *PackerConfig) detectPluginBinaries() hcl.Diagnostics { return diags } + uninstalledPlugins := map[string]string{} + for _, pluginRequirement := range pluginReqs { sortedInstalls, err := pluginRequirement.ListInstallations(opts) if err != nil { @@ -88,11 +91,7 @@ func (cfg *PackerConfig) detectPluginBinaries() hcl.Diagnostics { continue } if len(sortedInstalls) == 0 { - diags = append(diags, &hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: fmt.Sprintf("no plugin installed for %s %v", pluginRequirement.Identifier, pluginRequirement.VersionConstraints.String()), - Detail: "Did you run packer init for this project ?", - }) + uninstalledPlugins[pluginRequirement.Identifier.String()] = pluginRequirement.VersionConstraints.String() continue } log.Printf("[TRACE] Found the following %q installations: %v", pluginRequirement.Identifier, sortedInstalls) @@ -108,6 +107,20 @@ func (cfg *PackerConfig) detectPluginBinaries() hcl.Diagnostics { } } + if len(uninstalledPlugins) > 0 { + detailMessage := &strings.Builder{} + detailMessage.WriteString("The following plugins are required, but not installed:\n\n") + for pluginName, pluginVersion := range uninstalledPlugins { + fmt.Fprintf(detailMessage, "* %s %s\n", pluginName, pluginVersion) + } + detailMessage.WriteString("\nDid you run packer init for this project ?") + diags = append(diags, &hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Missing plugins", + Detail: detailMessage.String(), + }) + } + return diags } From 2824320aa165ccf1a6b5aedad27699288b373382 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 11 Jul 2023 10:40:22 -0400 Subject: [PATCH 021/156] packer: remove discoverExternalComponents Since the `discoverExternalComponents' function was defined but not called anywhere, it is dead code, and can be safely removed from the codebase. --- packer/plugin.go | 82 ------------------------------------------------ 1 file changed, 82 deletions(-) diff --git a/packer/plugin.go b/packer/plugin.go index 5e4360f4fd6..a4321d90fd0 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -118,88 +118,6 @@ func (c *PluginConfig) Discover() error { return nil } -func (c *PluginConfig) discoverExternalComponents(path string) error { - var err error - log.Printf("[TRACE] discovering plugins in %s", path) - - if !filepath.IsAbs(path) { - path, err = filepath.Abs(path) - if err != nil { - return err - } - } - var externallyUsed []string - - pluginPaths, err := c.discoverSingle(filepath.Join(path, "packer-builder-*")) - if err != nil { - return err - } - for pluginName, pluginPath := range pluginPaths { - newPath := pluginPath // this needs to be stored in a new variable for the func below - c.Builders.Set(pluginName, func() (packersdk.Builder, error) { - return c.Client(newPath).Builder() - }) - externallyUsed = append(externallyUsed, pluginName) - } - if len(externallyUsed) > 0 { - sort.Strings(externallyUsed) - log.Printf("[INFO] using external builders: %v", externallyUsed) - externallyUsed = nil - } - - pluginPaths, err = c.discoverSingle(filepath.Join(path, "packer-post-processor-*")) - if err != nil { - return err - } - for pluginName, pluginPath := range pluginPaths { - newPath := pluginPath // this needs to be stored in a new variable for the func below - c.PostProcessors.Set(pluginName, func() (packersdk.PostProcessor, error) { - return c.Client(newPath).PostProcessor() - }) - externallyUsed = append(externallyUsed, pluginName) - } - if len(externallyUsed) > 0 { - sort.Strings(externallyUsed) - log.Printf("using external post-processors %v", externallyUsed) - externallyUsed = nil - } - - pluginPaths, err = c.discoverSingle(filepath.Join(path, "packer-provisioner-*")) - if err != nil { - return err - } - for pluginName, pluginPath := range pluginPaths { - newPath := pluginPath // this needs to be stored in a new variable for the func below - c.Provisioners.Set(pluginName, func() (packersdk.Provisioner, error) { - return c.Client(newPath).Provisioner() - }) - externallyUsed = append(externallyUsed, pluginName) - } - if len(externallyUsed) > 0 { - sort.Strings(externallyUsed) - log.Printf("using external provisioners %v", externallyUsed) - externallyUsed = nil - } - - pluginPaths, err = c.discoverSingle(filepath.Join(path, "packer-datasource-*")) - if err != nil { - return err - } - for pluginName, pluginPath := range pluginPaths { - newPath := pluginPath // this needs to be stored in a new variable for the func below - c.DataSources.Set(pluginName, func() (packersdk.Datasource, error) { - return c.Client(newPath).Datasource() - }) - externallyUsed = append(externallyUsed, pluginName) - } - if len(externallyUsed) > 0 { - sort.Strings(externallyUsed) - log.Printf("using external datasource %v", externallyUsed) - } - - return nil -} - func (c *PluginConfig) discoverLegacyMonoComponents(path string) error { var err error log.Printf("[TRACE] discovering plugins in %s", path) From a2930bda4fb9863687bd614ea3b875604d1acda0 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 11 Jul 2023 15:41:37 -0400 Subject: [PATCH 022/156] packer: warn on bundled plugins usage Since bundled plugins will be removed in an upcoming version of Packer, this commit adds a new warning message whenever a template uses one such plugin. This warning has been implemented on build, validate, console and the inspect subcommands. In addition to warning about the upcoming change and potential issue this will cause, this warning message proposes solutions to the user so they know what they'll have to do in order not to rely on those bundled plugins later. --- acctest/plugin/bundled_plugin_test.go | 181 ++++++++++++++++++ .../test-fixtures/basic_amazon_bundled.json | 10 + .../basic_amazon_bundled.pkr.hcl | 11 ++ ...basic_amazon_with_required_plugins.pkr.hcl | 20 ++ command/build.go | 10 +- command/meta.go | 175 +++++++++++++++++ command/validate.go | 10 +- command/vendored_plugins.go | 168 ++++++++++++++++ config.go | 4 + hcl2template/parser.go | 15 +- hcl2template/plugin.go | 2 +- packer/core.go | 6 + packer/run_interfaces.go | 7 + 13 files changed, 603 insertions(+), 16 deletions(-) create mode 100644 acctest/plugin/bundled_plugin_test.go create mode 100644 acctest/plugin/test-fixtures/basic_amazon_bundled.json create mode 100644 acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl create mode 100644 acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl diff --git a/acctest/plugin/bundled_plugin_test.go b/acctest/plugin/bundled_plugin_test.go new file mode 100644 index 00000000000..e9308a59869 --- /dev/null +++ b/acctest/plugin/bundled_plugin_test.go @@ -0,0 +1,181 @@ +package plugin + +import ( + _ "embed" + "errors" + "fmt" + "os" + "os/exec" + "strings" + "testing" + + "github.com/hashicorp/go-multierror" + amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance" + "github.com/hashicorp/packer-plugin-sdk/acctest" + "github.com/hashicorp/packer/hcl2template/addrs" +) + +//go:embed test-fixtures/basic_amazon_bundled.pkr.hcl +var basicAmazonBundledEbsTemplate string + +func TestAccBuildBundledPlugins(t *testing.T) { + plugin := addrs.Plugin{ + Hostname: "github.com", + Namespace: "hashicorp", + Type: "amazon", + } + testCase := &acctest.PluginTestCase{ + Name: "amazon-ebs_bundled_test", + Setup: func() error { + return cleanupPluginInstallation(plugin) + }, + Teardown: func() error { + helper := amazonacc.AMIHelper{ + Region: "us-east-1", + Name: "packer-plugin-bundled-amazon-ebs-test", + } + return helper.CleanUpAmi() + }, + Template: basicAmazonBundledEbsTemplate, + Type: "amazon-ebs", + Init: false, + Check: func(buildCommand *exec.Cmd, logfile string) error { + if buildCommand.ProcessState != nil { + if buildCommand.ProcessState.ExitCode() != 0 { + return fmt.Errorf("Bad exit code. Logfile: %s", logfile) + } + } + + rawLogs, err := os.ReadFile(logfile) + if err != nil { + return fmt.Errorf("failed to read logs: %s", err) + } + + var errs error + + logs := string(rawLogs) + + if !strings.Contains(logs, "Warning: Bundled plugins used") { + errs = multierror.Append(errs, errors.New("expected warning about bundled plugins used, did not find it")) + } + + if !strings.Contains(logs, "Then run 'packer init' to manage installation of the plugins") { + errs = multierror.Append(errs, errors.New("expected suggestion about packer init in logs, did not find it.")) + } + + return errs + }, + } + + acctest.TestPlugin(t, testCase) +} + +//go:embed test-fixtures/basic_amazon_with_required_plugins.pkr.hcl +var basicAmazonRequiredPluginEbsTemplate string + +func TestAccBuildBundledPluginsWithRequiredPlugins(t *testing.T) { + plugin := addrs.Plugin{ + Hostname: "github.com", + Namespace: "hashicorp", + Type: "amazon", + } + testCase := &acctest.PluginTestCase{ + Name: "amazon-ebs_with_required_plugins_test", + Setup: func() error { + return cleanupPluginInstallation(plugin) + }, + Teardown: func() error { + helper := amazonacc.AMIHelper{ + Region: "us-east-1", + Name: "packer-plugin-required-plugin-amazon-ebs-test", + } + return helper.CleanUpAmi() + }, + Template: basicAmazonRequiredPluginEbsTemplate, + Type: "amazon-ebs", + Init: false, + Check: func(buildCommand *exec.Cmd, logfile string) error { + if buildCommand.ProcessState != nil { + if buildCommand.ProcessState.ExitCode() != 1 { + return fmt.Errorf("Bad exit code. Logfile: %s", logfile) + } + } + + rawLogs, err := os.ReadFile(logfile) + if err != nil { + return fmt.Errorf("failed to read logs: %s", err) + } + + var errs error + + logs := string(rawLogs) + + if strings.Contains(logs, "Warning: Bundled plugins used") { + errs = multierror.Append(errs, errors.New("did not expect warning about bundled plugins used")) + } + + if !strings.Contains(logs, "Missing plugins") { + errs = multierror.Append(errs, errors.New("expected error about plugins required and not installed, did not find it")) + } + + return errs + }, + } + + acctest.TestPlugin(t, testCase) +} + +//go:embed test-fixtures/basic_amazon_bundled.json +var basicAmazonBundledEbsTemplateJSON string + +func TestAccBuildBundledPluginsJSON(t *testing.T) { + plugin := addrs.Plugin{ + Hostname: "github.com", + Namespace: "hashicorp", + Type: "amazon", + } + testCase := &acctest.PluginTestCase{ + Name: "amazon-ebs_bundled_test_json", + Setup: func() error { + return cleanupPluginInstallation(plugin) + }, + Teardown: func() error { + helper := amazonacc.AMIHelper{ + Region: "us-east-1", + Name: "packer-plugin-bundled-amazon-ebs-test-json", + } + return helper.CleanUpAmi() + }, + Template: basicAmazonBundledEbsTemplateJSON, + Type: "amazon-ebs", + Init: false, + Check: func(buildCommand *exec.Cmd, logfile string) error { + if buildCommand.ProcessState != nil { + if buildCommand.ProcessState.ExitCode() != 0 { + return fmt.Errorf("Bad exit code. Logfile: %s", logfile) + } + } + + rawLogs, err := os.ReadFile(logfile) + if err != nil { + return fmt.Errorf("failed to read logs: %s", err) + } + + var errs error + + logs := string(rawLogs) + + if !strings.Contains(logs, "Warning: Bundled plugins used") { + errs = multierror.Append(errs, errors.New("expected warning about bundled plugins, did not find it.")) + } + + if !strings.Contains(logs, "plugins with the 'packer plugins install' command") { + errs = multierror.Append(errs, errors.New("expected suggestion about packer plugins install in logs, did not find it.")) + } + + return errs + }, + } + + acctest.TestPlugin(t, testCase) +} diff --git a/acctest/plugin/test-fixtures/basic_amazon_bundled.json b/acctest/plugin/test-fixtures/basic_amazon_bundled.json new file mode 100644 index 00000000000..f674cd130d1 --- /dev/null +++ b/acctest/plugin/test-fixtures/basic_amazon_bundled.json @@ -0,0 +1,10 @@ +{ + "builders": [{ + "type": "amazon-ebs", + "region": "us-east-1", + "instance_type": "m3.medium", + "source_ami": "ami-76b2a71e", + "ssh_username": "ubuntu", + "ami_name": "packer-plugin-bundled-amazon-ebs-test-json" + }] +} diff --git a/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl b/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl new file mode 100644 index 00000000000..c17a09df04f --- /dev/null +++ b/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl @@ -0,0 +1,11 @@ +source "amazon-ebs" "basic-test" { + region = "us-east-1" + instance_type = "m3.medium" + source_ami = "ami-76b2a71e" + ssh_username = "ubuntu" + ami_name = "packer-plugin-bundled-amazon-ebs-test" +} + +build { + sources = ["source.amazon-ebs.basic-test"] +} diff --git a/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl b/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl new file mode 100644 index 00000000000..f9ba5a55b2c --- /dev/null +++ b/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl @@ -0,0 +1,20 @@ +packer { + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon", + version = "~> 1" + } + } +} + +source "amazon-ebs" "basic-test" { + region = "us-east-1" + instance_type = "m3.medium" + source_ami = "ami-76b2a71e" + ssh_username = "ubuntu" + ami_name = "packer-plugin-bundled-amazon-ebs-test" +} + +build { + sources = ["source.amazon-ebs.basic-test"] +} diff --git a/command/build.go b/command/build.go index b707fe22d6f..842938adcb9 100644 --- a/command/build.go +++ b/command/build.go @@ -87,7 +87,15 @@ func (c *BuildCommand) RunContext(buildCtx context.Context, cla *BuildArgs) int return ret } - diags := packerStarter.Initialize(packer.InitializeOptions{}) + diags := packerStarter.DetectPluginBinaries() + ret = writeDiags(c.Ui, nil, diags) + if ret != 0 { + return ret + } + + diags = packerStarter.Initialize(packer.InitializeOptions{}) + bundledDiags := c.DetectBundledPlugins(packerStarter) + diags = append(bundledDiags, diags...) ret = writeDiags(c.Ui, nil, diags) if ret != 0 { return ret diff --git a/command/meta.go b/command/meta.go index 99123fd8ec7..1579d152237 100644 --- a/command/meta.go +++ b/command/meta.go @@ -9,7 +9,9 @@ import ( "fmt" "io" "os" + "strings" + "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclparse" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template" @@ -179,3 +181,176 @@ func (m *Meta) GetConfigFromJSON(cla *MetaArgs) (packer.Handler, int) { } return core, ret } + +func (m *Meta) DetectBundledPlugins(handler packer.Handler) hcl.Diagnostics { + var plugins []string + + switch h := handler.(type) { + case *packer.Core: + plugins = m.detectBundledPluginsJSON(h) + case *hcl2template.PackerConfig: + plugins = m.detectBundledPluginsHCL2(handler.(*hcl2template.PackerConfig)) + } + + if len(plugins) == 0 { + return nil + } + + buf := &strings.Builder{} + buf.WriteString("This template relies on the use of plugins bundled into the Packer binary.\n") + buf.WriteString("The practice of bundling external plugins into Packer will be removed in an upcoming version.\n\n") + switch h := handler.(type) { + case *packer.Core: + buf.WriteString("To remove this warning and ensure builds keep working you can install these external plugins with the 'packer plugins install' command\n\n") + + for _, plugin := range plugins { + fmt.Fprintf(buf, "* packer plugins install %s\n", plugin) + } + + buf.WriteString("\nAlternatively, if you upgrade your templates to HCL2, you can use 'packer init' with a 'required_plugins' block to automatically install external plugins.\n\n") + fmt.Fprintf(buf, "You can try HCL2 by running 'packer hcl2_upgrade %s'", h.Template.Path) + case *hcl2template.PackerConfig: + buf.WriteString("To remove this warning, add the following section to your template:\n") + buf.WriteString(m.fixRequiredPlugins(h)) + buf.WriteString("\nThen run 'packer init' to manage installation of the plugins") + } + + return hcl.Diagnostics{ + &hcl.Diagnostic{ + Severity: hcl.DiagWarning, + Summary: "Bundled plugins used", + Detail: buf.String(), + }, + } +} + +func (m *Meta) detectBundledPluginsJSON(core *packer.Core) []string { + bundledPlugins := map[string]struct{}{} + + tmpl := core.Template + if tmpl == nil { + panic("No template parsed. This is a Packer bug which should be reported, please open an issue on the project's issue tracker.") + } + + for _, b := range tmpl.Builders { + builderType := fmt.Sprintf("packer-builder-%s", b.Type) + if bundledStatus[builderType] { + bundledPlugins[builderType] = struct{}{} + } + } + + for _, p := range tmpl.Provisioners { + provisionerType := fmt.Sprintf("packer-provisioner-%s", p.Type) + if bundledStatus[provisionerType] { + bundledPlugins[provisionerType] = struct{}{} + } + } + + for _, pps := range tmpl.PostProcessors { + for _, pp := range pps { + postProcessorType := fmt.Sprintf("packer-post-processor-%s", pp.Type) + if bundledStatus[postProcessorType] { + bundledPlugins[postProcessorType] = struct{}{} + } + } + } + + return compileBundledPluginList(bundledPlugins) +} + +var knownPluginPrefixes = map[string]string{ + "amazon": "github.com/hashicorp/amazon", + "ansible": "github.com/hashicorp/ansible", + "azure": "github.com/hashicorp/azure", + "docker": "github.com/hashicorp/docker", + "googlecompute": "github.com/hashicorp/googlecompute", + "qemu": "github.com/hashicorp/qemu", + "vagrant": "github.com/hashicorp/vagrant", + "vmware": "github.com/hashicorp/vmware", + "vsphere": "github.com/hashicorp/vsphere", +} + +func (m *Meta) fixRequiredPlugins(config *hcl2template.PackerConfig) string { + plugins := map[string]struct{}{} + + for _, b := range config.Builds { + for _, b := range b.Sources { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(b.Type, prefix) { + plugins[plugin] = struct{}{} + } + } + } + + for _, p := range b.ProvisionerBlocks { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(p.PType, prefix) { + plugins[plugin] = struct{}{} + } + } + } + + for _, pps := range b.PostProcessorsLists { + for _, pp := range pps { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(pp.PType, prefix) { + plugins[plugin] = struct{}{} + } + } + } + } + } + + for _, ds := range config.Datasources { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(ds.Type, prefix) { + plugins[plugin] = struct{}{} + } + } + } + + retPlugins := make([]string, 0, len(plugins)) + for plugin := range plugins { + retPlugins = append(retPlugins, plugin) + } + + return generateRequiredPluginsBlock(retPlugins) +} + +func (m *Meta) detectBundledPluginsHCL2(config *hcl2template.PackerConfig) []string { + bundledPlugins := map[string]struct{}{} + + for _, b := range config.Builds { + for _, src := range b.Sources { + builderType := fmt.Sprintf("packer-builder-%s", src.Type) + if bundledStatus[builderType] { + bundledPlugins[builderType] = struct{}{} + } + } + + for _, p := range b.ProvisionerBlocks { + provisionerType := fmt.Sprintf("packer-provisioner-%s", p.PType) + if bundledStatus[provisionerType] { + bundledPlugins[provisionerType] = struct{}{} + } + } + + for _, pps := range b.PostProcessorsLists { + for _, pp := range pps { + postProcessorType := fmt.Sprintf("packer-post-processor-%s", pp.PType) + if bundledStatus[postProcessorType] { + bundledPlugins[postProcessorType] = struct{}{} + } + } + } + } + + for _, ds := range config.Datasources { + dsType := fmt.Sprintf("packer-datasource-%s", ds.Type) + if bundledStatus[dsType] { + bundledPlugins[dsType] = struct{}{} + } + } + + return compileBundledPluginList(bundledPlugins) +} diff --git a/command/validate.go b/command/validate.go index 1bc4cc1d7eb..2b7e2107b0d 100644 --- a/command/validate.go +++ b/command/validate.go @@ -65,9 +65,17 @@ func (c *ValidateCommand) RunContext(ctx context.Context, cla *ValidateArgs) int return 0 } - diags := packerStarter.Initialize(packer.InitializeOptions{ + diags := packerStarter.DetectPluginBinaries() + ret = writeDiags(c.Ui, nil, diags) + if ret != 0 { + return ret + } + + diags = packerStarter.Initialize(packer.InitializeOptions{ SkipDatasourcesExecution: !cla.EvaluateDatasources, }) + bundledDiags := c.DetectBundledPlugins(packerStarter) + diags = append(bundledDiags, diags...) ret = writeDiags(c.Ui, nil, diags) if ret != 0 { return ret diff --git a/command/vendored_plugins.go b/command/vendored_plugins.go index 0718b91a7c5..d6e5f836338 100644 --- a/command/vendored_plugins.go +++ b/command/vendored_plugins.go @@ -4,6 +4,10 @@ package command import ( + "fmt" + "log" + "strings" + packersdk "github.com/hashicorp/packer-plugin-sdk/packer" // Previously core-bundled components, split into their own plugins but @@ -102,6 +106,170 @@ var VendoredPostProcessors = map[string]packersdk.PostProcessor{ "vsphere": new(vspherepostprocessor.PostProcessor), } +// bundledStatus is used to know if one of the bundled components is loaded from +// an external plugin, or from the bundled plugins. +// +// We keep track of this to produce a warning if a user relies on one +// such plugin, as they will be removed in a later version of Packer. +var bundledStatus = map[string]bool{ + "packer-builder-amazon-ebs": false, + "packer-builder-amazon-chroot": false, + "packer-builder-amazon-ebssurrogate": false, + "packer-builder-amazon-ebsvolume": false, + "packer-builder-amazon-instance": false, + "packer-post-processor-amazon-import": false, + "packer-datasource-amazon-ami": false, + "packer-datasource-amazon-secretsmanager": false, + + "packer-provisioner-ansible": false, + "packer-provisioner-ansible-local": false, + + "packer-provisioner-azure-dtlartifact": false, + "packer-builder-azure-arm": false, + "packer-builder-azure-chroot": false, + "packer-builder-azure-dtl": false, + + "packer-builder-docker": false, + "packer-post-processor-docker-import": false, + "packer-post-processor-docker-push": false, + "packer-post-processor-docker-save": false, + "packer-post-processor-docker-tag": false, + + "packer-builder-googlecompute": false, + "packer-post-processor-googlecompute-export": false, + "packer-post-processor-googlecompute-import": false, + + "packer-builder-qemu": false, + + "packer-builder-vagrant": false, + "packer-post-processor-vagrant": false, + "packer-post-processor-vagrant-cloud": false, + + "packer-builder-virtualbox-iso": false, + "packer-builder-virtualbox-ovf": false, + "packer-builder-virtualbox-vm": false, + + "packer-builder-vmware-iso": false, + "packer-builder-vmware-vmx": false, + + "packer-builder-vsphere-clone": false, + "packer-builder-vsphere-iso": false, + "packer-post-processor-vsphere-template": false, + "packer-post-processor-vsphere": false, +} + +// TrackBundledPlugin marks a component as loaded from Packer's bundled plugins +// instead of from an externally loaded plugin. +// +// NOTE: `pluginName' must be in the format `packer--' +func TrackBundledPlugin(pluginName string) { + _, exists := bundledStatus[pluginName] + if !exists { + return + } + + bundledStatus[pluginName] = true +} + +var componentPluginMap = map[string]string{ + "packer-builder-amazon-ebs": "github.com/hashicorp/amazon", + "packer-builder-amazon-chroot": "github.com/hashicorp/amazon", + "packer-builder-amazon-ebssurrogate": "github.com/hashicorp/amazon", + "packer-builder-amazon-ebsvolume": "github.com/hashicorp/amazon", + "packer-builder-amazon-instance": "github.com/hashicorp/amazon", + "packer-post-processor-amazon-import": "github.com/hashicorp/amazon", + "packer-datasource-amazon-ami": "github.com/hashicorp/amazon", + "packer-datasource-amazon-secretsmanager": "github.com/hashicorp/amazon", + + "packer-provisioner-ansible": "github.com/hashicorp/ansible", + "packer-provisioner-ansible-local": "github.com/hashicorp/ansible", + + "packer-provisioner-azure-dtlartifact": "github.com/hashicorp/azure", + "packer-builder-azure-arm": "github.com/hashicorp/azure", + "packer-builder-azure-chroot": "github.com/hashicorp/azure", + "packer-builder-azure-dtl": "github.com/hashicorp/azure", + + "packer-builder-docker": "github.com/hashicorp/docker", + "packer-post-processor-docker-import": "github.com/hashicorp/docker", + "packer-post-processor-docker-push": "github.com/hashicorp/docker", + "packer-post-processor-docker-save": "github.com/hashicorp/docker", + "packer-post-processor-docker-tag": "github.com/hashicorp/docker", + + "packer-builder-googlecompute": "github.com/hashicorp/googlecompute", + "packer-post-processor-googlecompute-export": "github.com/hashicorp/googlecompute", + "packer-post-processor-googlecompute-import": "github.com/hashicorp/googlecompute", + + "packer-builder-qemu": "github.com/hashicorp/qemu", + + "packer-builder-vagrant": "github.com/hashicorp/vagrant", + "packer-post-processor-vagrant": "github.com/hashicorp/vagrant", + "packer-post-processor-vagrant-cloud": "github.com/hashicorp/vagrant", + + "packer-builder-virtualbox-iso": "github.com/hashicorp/virtualbox", + "packer-builder-virtualbox-ovf": "github.com/hashicorp/virtualbox", + "packer-builder-virtualbox-vm": "github.com/hashicorp/virtualbox", + + "packer-builder-vmware-iso": "github.com/hashicorp/vmware", + "packer-builder-vmware-vmx": "github.com/hashicorp/vmware", + + "packer-builder-vsphere-clone": "github.com/hashicorp/vsphere", + "packer-builder-vsphere-iso": "github.com/hashicorp/vsphere", + "packer-post-processor-vsphere-template": "github.com/hashicorp/vsphere", + "packer-post-processor-vsphere": "github.com/hashicorp/vsphere", +} + +// compileBundledPluginList returns a list of plugins to import in a config +// +// This only works on bundled plugins and serves as a way to inform users that +// they should not rely on a bundled plugin anymore, but give them recommendations +// on how to manage those plugins instead. +func compileBundledPluginList(componentMap map[string]struct{}) []string { + plugins := map[string]struct{}{} + for component := range componentMap { + plugin, ok := componentPluginMap[component] + if !ok { + log.Printf("Unknown bundled plugin component: %q", component) + continue + } + + plugins[plugin] = struct{}{} + } + + pluginList := make([]string, 0, len(plugins)) + for plugin := range plugins { + pluginList = append(pluginList, plugin) + } + + return pluginList +} + +func generateRequiredPluginsBlock(plugins []string) string { + if len(plugins) == 0 { + return "" + } + + buf := &strings.Builder{} + buf.WriteString(` +packer { + required_plugins {`) + + for _, plugin := range plugins { + pluginName := strings.Replace(plugin, "github.com/hashicorp/", "", 1) + fmt.Fprintf(buf, ` + %s = { + source = %q + version = "~> 1" + }`, pluginName, plugin) + } + + buf.WriteString(` + } +} +`) + + return buf.String() +} + // Upon init lets load up any plugins that were vendored manually into the default // set of plugins. func init() { diff --git a/config.go b/config.go index 6b59b98fe63..af679dd8e0b 100644 --- a/config.go +++ b/config.go @@ -153,6 +153,7 @@ func (c *config) discoverInternalComponents() error { for builder := range command.Builders { builder := builder if !c.Plugins.Builders.Has(builder) { + command.TrackBundledPlugin(fmt.Sprintf("packer-builder-%s", builder)) bin := fmt.Sprintf("%s%splugin%spacker-builder-%s", packerPath, PACKERSPACE, PACKERSPACE, builder) c.Plugins.Builders.Set(builder, func() (packersdk.Builder, error) { @@ -164,6 +165,7 @@ func (c *config) discoverInternalComponents() error { for provisioner := range command.Provisioners { provisioner := provisioner if !c.Plugins.Provisioners.Has(provisioner) { + command.TrackBundledPlugin(fmt.Sprintf("packer-provisioner-%s", provisioner)) bin := fmt.Sprintf("%s%splugin%spacker-provisioner-%s", packerPath, PACKERSPACE, PACKERSPACE, provisioner) c.Plugins.Provisioners.Set(provisioner, func() (packersdk.Provisioner, error) { @@ -175,6 +177,7 @@ func (c *config) discoverInternalComponents() error { for postProcessor := range command.PostProcessors { postProcessor := postProcessor if !c.Plugins.PostProcessors.Has(postProcessor) { + command.TrackBundledPlugin(fmt.Sprintf("packer-post-processor-%s", postProcessor)) bin := fmt.Sprintf("%s%splugin%spacker-post-processor-%s", packerPath, PACKERSPACE, PACKERSPACE, postProcessor) c.Plugins.PostProcessors.Set(postProcessor, func() (packersdk.PostProcessor, error) { @@ -186,6 +189,7 @@ func (c *config) discoverInternalComponents() error { for dataSource := range command.Datasources { dataSource := dataSource if !c.Plugins.DataSources.Has(dataSource) { + command.TrackBundledPlugin(fmt.Sprintf("packer-datasource-%s", dataSource)) bin := fmt.Sprintf("%s%splugin%spacker-datasource-%s", packerPath, PACKERSPACE, PACKERSPACE, dataSource) c.Plugins.DataSources.Set(dataSource, func() (packersdk.Datasource, error) { diff --git a/hcl2template/parser.go b/hcl2template/parser.go index 2246131fa88..a724bb807bd 100644 --- a/hcl2template/parser.go +++ b/hcl2template/parser.go @@ -308,19 +308,8 @@ func filterVarsFromLogs(inputOrLocal Variables) { } func (cfg *PackerConfig) Initialize(opts packer.InitializeOptions) hcl.Diagnostics { - var diags hcl.Diagnostics - - // enable packer to start plugins requested in required_plugins. - moreDiags := cfg.detectPluginBinaries() - diags = append(diags, moreDiags...) - if moreDiags.HasErrors() { - return diags - } - - moreDiags = cfg.InputVariables.ValidateValues() - diags = append(diags, moreDiags...) - moreDiags = cfg.LocalVariables.ValidateValues() - diags = append(diags, moreDiags...) + diags := cfg.InputVariables.ValidateValues() + diags = append(diags, cfg.LocalVariables.ValidateValues()...) diags = append(diags, cfg.evaluateDatasources(opts.SkipDatasourcesExecution)...) diags = append(diags, checkForDuplicateLocalDefinition(cfg.LocalBlocks)...) diags = append(diags, cfg.evaluateLocalVariables(cfg.LocalBlocks)...) diff --git a/hcl2template/plugin.go b/hcl2template/plugin.go index 1c32ef7779e..4a5c0186647 100644 --- a/hcl2template/plugin.go +++ b/hcl2template/plugin.go @@ -55,7 +55,7 @@ func (cfg *PackerConfig) PluginRequirements() (plugingetter.Requirements, hcl.Di return reqs, diags } -func (cfg *PackerConfig) detectPluginBinaries() hcl.Diagnostics { +func (cfg *PackerConfig) DetectPluginBinaries() hcl.Diagnostics { opts := plugingetter.ListInstallationsOptions{ FromFolders: cfg.parser.PluginConfig.KnownPluginFolders, BinaryInstallationOptions: plugingetter.BinaryInstallationOptions{ diff --git a/packer/core.go b/packer/core.go index 4d62cce6bc3..b711af080bc 100644 --- a/packer/core.go +++ b/packer/core.go @@ -132,6 +132,12 @@ func NewCore(c *CoreConfig) *Core { return core } +// DetectPluginBinaries is used to load required plugins from the template, +// since it is unsupported in JSON, this is essentially a no-op. +func (c *Core) DetectPluginBinaries() hcl.Diagnostics { + return nil +} + func (c *Core) Initialize(_ InitializeOptions) hcl.Diagnostics { err := c.initialize() if err != nil { diff --git a/packer/run_interfaces.go b/packer/run_interfaces.go index 5bf1151529c..253998c20a4 100644 --- a/packer/run_interfaces.go +++ b/packer/run_interfaces.go @@ -40,6 +40,12 @@ type InitializeOptions struct { SkipDatasourcesExecution bool } +type PluginBinaryDetector interface { + // DetectPluginBinaries is used only for HCL2 templates, and loads required + // plugins if specified. + DetectPluginBinaries() hcl.Diagnostics +} + // The Handler handles all Packer things. This interface reflects the Packer // commands, ex: init, console ( evaluate ), fix config, inspect config, etc. To // run a build we will start the builds and then the core of Packer handles @@ -53,6 +59,7 @@ type Handler interface { BuildGetter ConfigFixer ConfigInspector + PluginBinaryDetector } //go:generate enumer -type FixConfigMode From b522edca36cdbc33c3c24c8659d0b4e69682b4e0 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 14 Jul 2023 17:11:54 -0400 Subject: [PATCH 023/156] hcl2_upgrade: add required_plugins in out template When a legacy JSON template references built-in plugins, we add them to the resulting template as a `required_plugins' block in HCL2. --- command/hcl2_upgrade.go | 85 ++++++++++++++++++- command/hcl2_upgrade_test.go | 1 + .../hcl2_upgrade/ami_test/expected.pkr.hcl | 8 ++ .../aws-access-config/expected.pkr.hcl | 6 ++ .../hcl2_upgrade/azure_shg/expected.pkr.hcl | 8 ++ .../bundled-plugin-used/expected.pkr.hcl | 29 +++++++ .../bundled-plugin-used/input.json | 11 +++ .../hcl2_upgrade/complete/expected.pkr.hcl | 6 ++ .../hcl2_upgrade/minimal/expected.pkr.hcl | 6 ++ .../hcl2_upgrade/source-name/expected.pkr.hcl | 6 ++ .../expected.pkr.hcl | 8 ++ .../without-annotations/expected.pkr.hcl | 6 ++ 12 files changed, 176 insertions(+), 4 deletions(-) create mode 100644 command/test-fixtures/hcl2_upgrade/bundled-plugin-used/expected.pkr.hcl create mode 100644 command/test-fixtures/hcl2_upgrade/bundled-plugin-used/input.json diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index adba96d7f87..08b7d2ad745 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -797,16 +797,93 @@ type PackerParser struct { } func (p *PackerParser) Parse(tpl *template.Template) error { + reqPlugins, err := p.generateRequiredPluginsBlock(tpl) + if err != nil { + return err + } + + if tpl.MinVersion == "" && reqPlugins == nil { + return nil + } + + fileContent := hclwrite.NewEmptyFile() + body := fileContent.Body() + packerBody := body.AppendNewBlock("packer", nil).Body() + if tpl.MinVersion != "" { - fileContent := hclwrite.NewEmptyFile() - body := fileContent.Body() - packerBody := body.AppendNewBlock("packer", nil).Body() packerBody.SetAttributeValue("required_version", cty.StringVal(fmt.Sprintf(">= %s", tpl.MinVersion))) - p.out = fileContent.Bytes() } + + if reqPlugins != nil { + packerBody.AppendBlock(reqPlugins) + } + + p.out = fileContent.Bytes() + return nil } +func gatherPluginsFromTemplate(tpl *template.Template) []string { + plugins := map[string]struct{}{} + + for _, b := range tpl.Builders { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(b.Type, prefix) { + plugins[plugin] = struct{}{} + } + } + } + + for _, p := range tpl.Provisioners { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(p.Type, prefix) { + plugins[plugin] = struct{}{} + } + } + } + + for _, pps := range tpl.PostProcessors { + for _, pp := range pps { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(pp.Type, prefix) { + plugins[plugin] = struct{}{} + } + } + } + } + + if len(plugins) == 0 { + return nil + } + + retPlugins := make([]string, 0, len(plugins)) + for plugin := range plugins { + retPlugins = append(retPlugins, plugin) + } + + sort.Strings(retPlugins) + + return retPlugins +} + +func (p *PackerParser) generateRequiredPluginsBlock(tpl *template.Template) (*hclwrite.Block, error) { + plugins := gatherPluginsFromTemplate(tpl) + if len(plugins) == 0 { + return nil, nil + } + + reqPlugins := hclwrite.NewBlock("required_plugins", nil) + for _, plugin := range plugins { + pluginBlock := cty.ObjectVal(map[string]cty.Value{ + "source": cty.StringVal(plugin), + "version": cty.StringVal("~> 1"), + }) + reqPlugins.Body().SetAttributeValue(strings.Replace(plugin, "github.com/hashicorp/", "", 1), pluginBlock) + } + + return reqPlugins, nil +} + func (p *PackerParser) Write(out *bytes.Buffer) { if len(p.out) > 0 { if p.WithAnnotations { diff --git a/command/hcl2_upgrade_test.go b/command/hcl2_upgrade_test.go index d2f92b6b690..afa8575aa8e 100644 --- a/command/hcl2_upgrade_test.go +++ b/command/hcl2_upgrade_test.go @@ -38,6 +38,7 @@ func Test_hcl2_upgrade(t *testing.T) { {folder: "complete-variables-with-template-engine", flags: []string{}}, {folder: "undeclared-variables", flags: []string{}, exitCode: 0}, {folder: "varfile-with-no-variables-block", flags: []string{}, exitCode: 0}, + {folder: "bundled-plugin-used", flags: []string{}, exitCode: 0}, } for _, tc := range tc { diff --git a/command/test-fixtures/hcl2_upgrade/ami_test/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/ami_test/expected.pkr.hcl index 72ccb20383c..8a72f3551b0 100644 --- a/command/test-fixtures/hcl2_upgrade/ami_test/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/ami_test/expected.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + } +} source "amazon-ebs" "autogenerated_1" { run_tags = { diff --git a/command/test-fixtures/hcl2_upgrade/aws-access-config/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/aws-access-config/expected.pkr.hcl index 9ccbe9dc2fc..8c34e4735b3 100644 --- a/command/test-fixtures/hcl2_upgrade/aws-access-config/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/aws-access-config/expected.pkr.hcl @@ -1,5 +1,11 @@ packer { required_version = ">= 1.6.0" + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + } } variable "aws_access_key" { diff --git a/command/test-fixtures/hcl2_upgrade/azure_shg/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/azure_shg/expected.pkr.hcl index 089ce80a781..15d5a4ad33e 100644 --- a/command/test-fixtures/hcl2_upgrade/azure_shg/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/azure_shg/expected.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + azure = { + source = "github.com/hashicorp/azure" + version = "~> 1" + } + } +} source "azure-arm" "autogenerated_1" { shared_image_gallery { diff --git a/command/test-fixtures/hcl2_upgrade/bundled-plugin-used/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/bundled-plugin-used/expected.pkr.hcl new file mode 100644 index 00000000000..cce175b01bd --- /dev/null +++ b/command/test-fixtures/hcl2_upgrade/bundled-plugin-used/expected.pkr.hcl @@ -0,0 +1,29 @@ +packer { + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + ansible = { + source = "github.com/hashicorp/ansible" + version = "~> 1" + } + googlecompute = { + source = "github.com/hashicorp/googlecompute" + version = "~> 1" + } + } +} + +source "amazon-ebs" "autogenerated_1" { +} + +build { + sources = ["source.amazon-ebs.autogenerated_1"] + + provisioner "ansible-local" { + } + + post-processor "googlecompute-import" { + } +} diff --git a/command/test-fixtures/hcl2_upgrade/bundled-plugin-used/input.json b/command/test-fixtures/hcl2_upgrade/bundled-plugin-used/input.json new file mode 100644 index 00000000000..917c7105e5a --- /dev/null +++ b/command/test-fixtures/hcl2_upgrade/bundled-plugin-used/input.json @@ -0,0 +1,11 @@ +{ + "builders": [{ + "type": "amazon-ebs" + }], + "provisioners": [{ + "type": "ansible-local" + }], + "post-processors": [{ + "type": "googlecompute-import" + }] +} diff --git a/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl index bcc669b6438..a6800c67210 100644 --- a/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl @@ -14,6 +14,12 @@ # See https://www.packer.io/docs/templates/hcl_templates/blocks/packer for more info packer { required_version = ">= 1.6.0" + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + } } # All generated input variables will be of 'string' type as this is how Packer JSON diff --git a/command/test-fixtures/hcl2_upgrade/minimal/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/minimal/expected.pkr.hcl index 2802e8e18b0..316293c39e7 100644 --- a/command/test-fixtures/hcl2_upgrade/minimal/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/minimal/expected.pkr.hcl @@ -14,6 +14,12 @@ # See https://www.packer.io/docs/templates/hcl_templates/blocks/packer for more info packer { required_version = ">= 1.6.0" + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + } } # All generated input variables will be of 'string' type as this is how Packer JSON diff --git a/command/test-fixtures/hcl2_upgrade/source-name/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/source-name/expected.pkr.hcl index b5adf8ef55b..c4145f7d145 100644 --- a/command/test-fixtures/hcl2_upgrade/source-name/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/source-name/expected.pkr.hcl @@ -14,6 +14,12 @@ # See https://www.packer.io/docs/templates/hcl_templates/blocks/packer for more info packer { required_version = ">= 1.6.0" + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + } } # All generated input variables will be of 'string' type as this is how Packer JSON diff --git a/command/test-fixtures/hcl2_upgrade/vsphere_linux_options_and_network_interface/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/vsphere_linux_options_and_network_interface/expected.pkr.hcl index a160d0c9eed..16c3c21ca24 100644 --- a/command/test-fixtures/hcl2_upgrade/vsphere_linux_options_and_network_interface/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/vsphere_linux_options_and_network_interface/expected.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + vsphere = { + source = "github.com/hashicorp/vsphere" + version = "~> 1" + } + } +} source "vsphere-clone" "autogenerated_1" { RAM_reserve_all = false diff --git a/command/test-fixtures/hcl2_upgrade/without-annotations/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/without-annotations/expected.pkr.hcl index e332c21e08f..414ebc55a96 100644 --- a/command/test-fixtures/hcl2_upgrade/without-annotations/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/without-annotations/expected.pkr.hcl @@ -1,5 +1,11 @@ packer { required_version = ">= 1.6.0" + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + } } variable "aws_access_key" { From 6e764658b7722aa09e7a825f5d6a126bfa268797 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com> Date: Tue, 18 Jul 2023 16:14:35 -0400 Subject: [PATCH 024/156] Makefile: remove mode-check target (#12505) The Makefile would check for executable files inside the Packer repository, and produce errors if one was detected and not explicitely whitelisted through the `EXECUTABLE_FILES' Makefile variable. This check was introduced a while back to avoid having executable files in the repository, but this check can be problematic sometimes because of how it is written, namely when building the website, which causes a lot of JS executable files to appear in the hierarchy, and in turn this causes the shell expansion to fail because of the large number of arguments. Since this test is not necessary for Packer to build or test, and since it implies that we have to maintain the whitelist regex, we remove it from the Makefile. --- Makefile | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index ad6cfd3a28a..01d62f0053c 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,6 @@ GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) GOPATH=$(shell go env GOPATH) -EXECUTABLE_FILES=$(shell find . -type f -executable | egrep -v '^\./(website/[vendor|tmp]|vendor/|\.git|bin/|scripts/|pkg/)' | egrep -v '.*(\.sh|\.bats|\.git)' | egrep -v './provisioner/(ansible|inspec)/test-fixtures/exit1') - # Get the git commit GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true) GIT_COMMIT=$(shell git rev-parse --short HEAD) @@ -133,15 +131,6 @@ fmt-check: fmt ## Check go code formatting exit 1; \ fi -mode-check: ## Check that only certain files are executable - @echo "==> Checking that only certain files are executable..." - @if [ ! -z "$(EXECUTABLE_FILES)" ]; then \ - echo "These files should not be executable or they must be white listed in the Makefile:"; \ - echo "$(EXECUTABLE_FILES)" | xargs -n1; \ - exit 1; \ - else \ - echo "Check passed."; \ - fi fmt-docs: @find ./website/pages/docs -name "*.md" -exec pandoc --wrap auto --columns 79 --atx-headers -s -f "markdown_github+yaml_metadata_block" -t "markdown_github+yaml_metadata_block" {} -o {} \; @@ -166,7 +155,7 @@ generate-check: generate ## Check go code generation is on par exit 1; \ fi -test: mode-check vet ## Run unit tests +test: vet ## Run unit tests @go test -count $(COUNT) $(TEST) $(TESTARGS) -timeout=3m # acctest runs provisioners acceptance tests @@ -178,7 +167,7 @@ testacc: # install-build-deps generate ## Run acceptance tests @echo "WARN: Acceptance tests will take a long time to run and may cost money. Ctrl-C if you want to cancel." PACKER_ACC=1 go test -count $(COUNT) -v $(TEST) $(TESTARGS) -timeout=120m -testrace: mode-check vet ## Test with race detection enabled +testrace: vet ## Test with race detection enabled @go test -count $(COUNT) -race $(TEST) $(TESTARGS) -timeout=3m -p=8 # Runs code coverage and open a html page with report From 5271c287498556266deb2ffb06f0164bbacf09f1 Mon Sep 17 00:00:00 2001 From: GaryNg Date: Tue, 18 Jul 2023 21:47:06 +0800 Subject: [PATCH 025/156] Add closing code block --- .../docs/templates/hcl_templates/functions/contextual/vault.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx b/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx index f36e8f65823..c4b25b9798f 100644 --- a/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx +++ b/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx @@ -49,6 +49,7 @@ local "foo" { expression = vault("secrets/hello", "foo") sensitive = true } +``` The `local` block example accesses the Vault path `secrets/foo` and returns the value stored at the key `foo`, storing it as the local variable `local.foo`. However, the output of From cc1e2fca782de3e1a854597a6ed51445cba93765 Mon Sep 17 00:00:00 2001 From: GaryNg Date: Tue, 18 Jul 2023 21:52:26 +0800 Subject: [PATCH 026/156] Prefix url with product slug --- .../docs/templates/hcl_templates/functions/contextual/vault.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx b/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx index c4b25b9798f..95454cf211c 100644 --- a/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx +++ b/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx @@ -54,7 +54,7 @@ local "foo" { The `local` block example accesses the Vault path `secrets/foo` and returns the value stored at the key `foo`, storing it as the local variable `local.foo`. However, the output of the newly stored local variable will be filtered from the Packer build output, and replaced -with the value ''. See [Local Values](/docs/templates/hcl_templates/locals) for more details. +with the value ''. See [Local Values](/packer/docs/templates/hcl_templates/locals) for more details. ## Usage From 58b193f221308f6235cca015153543672b0aeede Mon Sep 17 00:00:00 2001 From: GaryNg Date: Wed, 19 Jul 2023 22:55:14 +0800 Subject: [PATCH 027/156] Use backtick to prevent html parsing Co-authored-by: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com> --- .../docs/templates/hcl_templates/functions/contextual/vault.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx b/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx index 95454cf211c..8136a10114d 100644 --- a/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx +++ b/website/content/docs/templates/hcl_templates/functions/contextual/vault.mdx @@ -54,7 +54,7 @@ local "foo" { The `local` block example accesses the Vault path `secrets/foo` and returns the value stored at the key `foo`, storing it as the local variable `local.foo`. However, the output of the newly stored local variable will be filtered from the Packer build output, and replaced -with the value ''. See [Local Values](/packer/docs/templates/hcl_templates/locals) for more details. +with the value ``. See [Local Values](/packer/docs/templates/hcl_templates/locals) for more details. ## Usage From 0194d839b0ffb1a07ba10e72b693bd12daf9e636 Mon Sep 17 00:00:00 2001 From: "hashicorp-tsccr[bot]" <129506189+hashicorp-tsccr[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 13:20:14 -0400 Subject: [PATCH 028/156] Result of tsccr-helper -log-level=info -pin-all-workflows . (#12507) Co-authored-by: hashicorp-tsccr[bot] --- .github/workflows/acceptance-test.yml | 10 +++++----- .github/workflows/auto-close-stale-issues.yml | 2 +- .github/workflows/build.yml | 14 +++++++------- .github/workflows/check-plugin-docs.yml | 4 ++-- .github/workflows/create-release-branch.yml | 2 +- .github/workflows/go-test.yml | 14 +++++++------- .github/workflows/go-validate.yml | 18 +++++++++--------- .github/workflows/issue-comment-created.yml | 2 +- .github/workflows/issue-migrator.yml | 2 +- .github/workflows/issues-opened.yml | 8 ++++---- .github/workflows/jira.yml | 6 +++--- .github/workflows/lock.yml | 2 +- .github/workflows/nightly-release.yml | 12 ++++++------ 13 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/acceptance-test.yml b/.github/workflows/acceptance-test.yml index 98d012cb8d4..783b6bdccde 100644 --- a/.github/workflows/acceptance-test.yml +++ b/.github/workflows/acceptance-test.yml @@ -19,7 +19,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: 'Determine Go version' id: get-go-version # We use .go-version as our source of truth for current Go @@ -40,12 +40,12 @@ jobs: # Packer GH Token for API Rate Limiting PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - name: IAM Assume Role - uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0 + uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0 with: role-to-assume: ${{ env.AWS_ROLE_ARN }} aws-region: ${{ env.AWS_REGION }} @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Send slack notification on failure - uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 + uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 with: payload: | { diff --git a/.github/workflows/auto-close-stale-issues.yml b/.github/workflows/auto-close-stale-issues.yml index 40b04dec196..af4a089df5d 100644 --- a/.github/workflows/auto-close-stale-issues.yml +++ b/.github/workflows/auto-close-stale-issues.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write # for actions/stale to close stale PRs runs-on: ubuntu-latest steps: - - uses: actions/stale@a20b814fb01b71def3bd6f56e7494d667ddf28da # v8.0.0 + - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-issue-stale: 23 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 657b9c39ebc..b713ef62393 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: 'Determine Go version' id: get-go-version # We use .go-version as our source of truth for current Go @@ -44,7 +44,7 @@ jobs: product-prerelease-version: ${{ steps.set-product-version.outputs.prerelease-product-version }} set-ld-flags: ${{ steps.set-ld-flags.outputs.set-ld-flags }} steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: set product version id: set-product-version uses: hashicorp/actions-set-product-version@v1 @@ -67,7 +67,7 @@ jobs: filepath: ${{ steps.generate-metadata-file.outputs.filepath }} steps: - name: 'Checkout directory' - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Generate metadata file id: generate-metadata-file uses: hashicorp/actions-generate-metadata@main @@ -105,7 +105,7 @@ jobs: GOPRIVATE: "github.com/hashicorp" GO111MODULE: on steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -142,7 +142,7 @@ jobs: GO111MODULE: on steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -204,7 +204,7 @@ jobs: GO111MODULE: on steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -234,7 +234,7 @@ jobs: env: version: ${{ needs.set-product-version.outputs.product-version }} steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Docker Build (Action) uses: hashicorp/actions-docker-build@v1 with: diff --git a/.github/workflows/check-plugin-docs.yml b/.github/workflows/check-plugin-docs.yml index c43ae9cb33c..00ba2851ef8 100644 --- a/.github/workflows/check-plugin-docs.yml +++ b/.github/workflows/check-plugin-docs.yml @@ -23,9 +23,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Setup Node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 with: node-version: '16.x' - name: Install Dependencies diff --git a/.github/workflows/create-release-branch.yml b/.github/workflows/create-release-branch.yml index 0d1f4f3953c..780087058b7 100644 --- a/.github/workflows/create-release-branch.yml +++ b/.github/workflows/create-release-branch.yml @@ -4,7 +4,7 @@ jobs: create-branch: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - uses: hashicorp/actions-create-release-branch@v1 with: token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 93f8eeb1ae8..2f426d16a03 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -24,7 +24,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: 'Determine Go version' id: get-go-version run: | @@ -36,8 +36,8 @@ jobs: runs-on: ubuntu-latest name: Linux go tests steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: TESTARGS="-coverprofile=coverage.txt -covermode=atomic" make ci @@ -47,8 +47,8 @@ jobs: runs-on: macos-latest name: Darwin go tests steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go test ./... -coverprofile=coverage.txt -covermode=atomic @@ -58,8 +58,8 @@ jobs: runs-on: windows-latest name: Windows go tests steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go test ./... -coverprofile=coverage.txt -covermode=atomic diff --git a/.github/workflows/go-validate.yml b/.github/workflows/go-validate.yml index d67b3aa5151..a3c45f794ff 100644 --- a/.github/workflows/go-validate.yml +++ b/.github/workflows/go-validate.yml @@ -20,7 +20,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: 'Determine Go version' id: get-go-version run: | @@ -32,8 +32,8 @@ jobs: runs-on: ubuntu-latest name: Go Mod Tidy steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go mod tidy @@ -43,10 +43,10 @@ jobs: runs-on: ubuntu-latest name: Lint steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: fetch-depth: 0 - - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: echo "$GITHUB_SHA" @@ -59,8 +59,8 @@ jobs: runs-on: ubuntu-latest name: Fmt check steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: make fmt-check @@ -70,8 +70,8 @@ jobs: runs-on: ubuntu-latest name: Generate check steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: make generate-check diff --git a/.github/workflows/issue-comment-created.yml b/.github/workflows/issue-comment-created.yml index f250dc1f101..e28ac0d0939 100644 --- a/.github/workflows/issue-comment-created.yml +++ b/.github/workflows/issue-comment-created.yml @@ -14,7 +14,7 @@ jobs: issues: write # for actions-ecosystem/action-remove-labels to remove issue labels runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0 with: github_token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/issue-migrator.yml b/.github/workflows/issue-migrator.yml index 9acc66ee6d4..58eed27f22a 100644 --- a/.github/workflows/issue-migrator.yml +++ b/.github/workflows/issue-migrator.yml @@ -12,7 +12,7 @@ jobs: if: startsWith(github.event.label.name, 'remote-plugin/') runs-on: ubuntu-latest steps: - - uses: bflad/action-migrate-issue@main # TSCCR: no entry for repository "bflad/action-migrate-issue" + - uses: bflad/action-migrate-issue@main # TSCCR: no entry for repository "bflad/action-migrate-issue" with: source-issue-comment: | This issue has been migrated to {target-issue-url} due to the [Packer Plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). diff --git a/.github/workflows/issues-opened.yml b/.github/workflows/issues-opened.yml index 57a8cd0cb65..86adfacef1f 100644 --- a/.github/workflows/issues-opened.yml +++ b/.github/workflows/issues-opened.yml @@ -13,8 +13,8 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - uses: github/issue-labeler@e24a3eb6b2e28c8904d086302a2b760647f5f45c # v3.1 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: github/issue-labeler@98b5412841f6c4b0b3d9c29d53c13fad16bd7de2 # v3.2 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler-issue-triage.yml @@ -27,7 +27,7 @@ jobs: if: contains(github.event.issue.labels.*.name, 'question') runs-on: ubuntu-latest steps: - - uses: actions-ecosystem/action-create-comment@v1.0.2 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" + - uses: actions-ecosystem/action-create-comment@v1.0.2 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" with: github_token: ${{ secrets.GITHUB_TOKEN }} body: | @@ -39,7 +39,7 @@ jobs: If no activity is taken on this question within 30 days it will be automatically closed. If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue. - - uses: actions-ecosystem/action-add-labels@v1.1.3 # TSCCR: no entry for repository "actions-ecosystem/action-add-labels" + - uses: actions-ecosystem/action-add-labels@v1.1.3 # TSCCR: no entry for repository "actions-ecosystem/action-add-labels" with: github_token: ${{ secrets.GITHUB_TOKEN }} labels: needs-reply diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index e0e82a97f01..a0fe240edb6 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Login - uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1 + uses: atlassian/gajira-login@ca13f8850ea309cf44a6e4e0c49d9aa48ac3ca4c # v3 env: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} @@ -61,7 +61,7 @@ jobs: - name: Create ticket id: create-ticket if: steps.search.outputs.issue == '' && github.event.label.name == 'sync to jira' && steps.set-ticket-type.outputs.type != 'Invalid' - uses: atlassian/gajira-create@59e177c4f6451399df5b4911c2211104f171e669 # v3.0.1 + uses: atlassian/gajira-create@1ff0b6bd115a780592b47bfbb63fc4629132e6ec # v3 with: project: HPR issuetype: "${{ steps.set-ticket-type.outputs.type }}" @@ -74,7 +74,7 @@ jobs: - name: Add tracking comment if: steps.create-ticket.outputs.issue != '' && steps.set-ticket-type.outputs.type != 'Invalid' - uses: actions-ecosystem/action-create-comment@v1.0.0 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" + uses: actions-ecosystem/action-create-comment@v1.0.0 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" with: github_token: ${{ secrets.GITHUB_TOKEN }} body: | diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 77f57ab0a7f..f1f17b35893 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -15,7 +15,7 @@ jobs: pull-requests: write # for dessant/lock-threads to lock PRs runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836 # v4.0.0 + - uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v4.0.1 with: github-token: ${{ github.token }} issue-comment: > diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index ea388be057c..72a1ee3503b 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -24,7 +24,7 @@ jobs: needs: build-artifacts runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Download built artifacts uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: @@ -38,7 +38,7 @@ jobs: echo "BUILD_OUTPUT_LIST=$(cat tmp2.txt | tr '\n' ',' | perl -ple 'chop')" >> $GITHUB_ENV rm -rf tmp.txt && rm -rf tmp2.txt - name: Advance nightly tag - uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3 + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -62,7 +62,7 @@ jobs: - name: Create a nightly GitHub prerelease id: create_prerelease continue-on-error: true - uses: ncipollo/release-action@v1 # TSCCR: no entry for repository "ncipollo/release-action" + uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0 with: name: nightly artifacts: "${{ env.BUILD_OUTPUT_LIST }}" @@ -85,7 +85,7 @@ jobs: - name: Retry failed nightly GitHub prerelease id: create_prerelease_retry if: steps.create_prerelease.outcome == 'failure' - uses: ncipollo/release-action@v1 # TSCCR: no entry for repository "ncipollo/release-action" + uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0 with: name: nightly artifacts: "${{ env.BUILD_OUTPUT_LIST }}" @@ -101,7 +101,7 @@ jobs: run: | echo "prerelease_id=${{ steps.create_prerelease_retry.outputs.id }}" >> $GITHUB_ENV - name: Publish nightly GitHub prerelease - uses: eregon/publish-release@v1 # TSCCR: no entry for repository "eregon/publish-release" + uses: eregon/publish-release@46913fa2b3f7edc7345ae3c17f6d1b093a54916d # v1.0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -117,7 +117,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Send slack notification on failure - uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 + uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 with: payload: | { From 3c4a4f06da67f1f6a472e373dde3b0bb0d7a67e9 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 19 Jul 2023 10:26:27 -0400 Subject: [PATCH 029/156] CHANGELOG: add changelog for Packer 1.9.2 --- CHANGELOG.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d04040aa1a8..54fd88302ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,61 @@ -## 1.9.2 (Upcoming) +## 1.9.2 (July 19, 2023) + +### NOTES: + +* Vendored plugins within Packer have not been updated. Plugin releases occur on + a regular basis to address issues and feature requests. + Please note that in an upcoming version of Packer, we will remove the last + bundled plugins from Packer. + Users are encouraged to use `packer init` for HCL2 templates or + `packer plugins install` with legacy JSON templates for installing external + plugins. + +* Packer will now warn when using bundled plugins. This feature will be removed in + a future version of the tool, so this warning is meant to bring awareness of the + upcoming change, and to help users update their environment/templates to be + ready for this. + [GH-12495](https://github.com/hashicorp/packer/pull/12495) + +### BUG FIXES: + +* Fixed a bug with how Packer was discovering plugins: in order to load + plugins, Packer would recursively scan all the known directories in which + we could have installed plugins. This caused unnecessary directory + walks and slowdowns upon invocation. Packer will now only check + for nested plugins within the directories used by commands such as `packer + init`, or `packer plugins install`, or as defined in PACKER_PLUGIN_PATH. + Refer to + [Packer's plugin directory documentation](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory) + for details on how loading works. + [GH-12414](https://github.com/hashicorp/packer/pull/12414) + +* The `packer init` subcommand now bundles all the missing installed plugins into one + condensed warning, as opposed to one warning per missing plugin. + [GH-12506](https://github.com/hashicorp/packer/pull/12506) + +### PLUGINS: + +* packer-plugin-parallels: The Parallels plugin has been handed over to the Parallels + team. New releases for this plugin are available at + https://github.com/parallels/packer-plugin-parallels. This plugin is is no longer + being bundled in the Packer binary release. Existing references to the + plugin will continue to work but users are advised to update the + `required_plugins` block to use the new plugin source address. + [GH-12476](https://github.com/hashicorp/packer/pull/12476) + ``` + required_plugins { + parallels = { + source = "github.com/parallels/parallels" + version = "~> 1" + } + } + ``` + +### IMPROVEMENTS: + +* The `hcl2_upgrade` subcommand will now add `required_plugins` to the template + generated from JSON for all our officially supported plugins. + [GH-12504](https://github.com/hashicorp/packer/pull/12504) ## 1.9.1 (June 1, 2023) From e3c20e3dc5cb085affe015e14881bfe0aa028e03 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 19 Jul 2023 17:10:21 -0400 Subject: [PATCH 030/156] CHANGELOG: prepare for 1.9.3 --- CHANGELOG.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54fd88302ef..9c693c7fd3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.9.3 (Upcoming) + ## 1.9.2 (July 19, 2023) ### NOTES: @@ -5,15 +7,13 @@ * Vendored plugins within Packer have not been updated. Plugin releases occur on a regular basis to address issues and feature requests. Please note that in an upcoming version of Packer, we will remove the last - bundled plugins from Packer. - Users are encouraged to use `packer init` for HCL2 templates or + bundled plugins from Packer. Users are encouraged to use `packer init` for HCL2 templates or `packer plugins install` with legacy JSON templates for installing external plugins. * Packer will now warn when using bundled plugins. This feature will be removed in a future version of the tool, so this warning is meant to bring awareness of the - upcoming change, and to help users update their environment/templates to be - ready for this. + upcoming change, and help users update their templates. [GH-12495](https://github.com/hashicorp/packer/pull/12495) ### BUG FIXES: @@ -37,7 +37,7 @@ * packer-plugin-parallels: The Parallels plugin has been handed over to the Parallels team. New releases for this plugin are available at - https://github.com/parallels/packer-plugin-parallels. This plugin is is no longer + https://github.com/parallels/packer-plugin-parallels. This plugin is no longer being bundled in the Packer binary release. Existing references to the plugin will continue to work but users are advised to update the `required_plugins` block to use the new plugin source address. @@ -53,8 +53,8 @@ ### IMPROVEMENTS: -* The `hcl2_upgrade` subcommand will now add `required_plugins` to the template - generated from JSON for all our officially supported plugins. +* The `hcl2_upgrade` sub-command will now add `required_plugins` to the template + generated from JSON for [official plugins](https://developer.hashicorp.com/packer/plugins#tiers-and-namespaces). [GH-12504](https://github.com/hashicorp/packer/pull/12504) ## 1.9.1 (June 1, 2023) From 02f1d5058718e4494a729ca280d4828f7bd07530 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 21:37:27 +0000 Subject: [PATCH 031/156] build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 in /website Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index b18174e0193..c96a4c2977f 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -13700,9 +13700,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -24337,9 +24337,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true }, "wrap-ansi": { From e9e4534321dfc00bd2fe561c5b1cf4c5f8d94323 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Jul 2023 00:16:20 +0000 Subject: [PATCH 032/156] build(deps): bump tough-cookie from 4.0.0 to 4.1.3 in /website Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3. - [Release notes](https://github.com/salesforce/tough-cookie/releases) - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md) - [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3) --- updated-dependencies: - dependency-name: tough-cookie dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/package-lock.json | 80 ++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 14 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index c96a4c2977f..fa295779654 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -9851,6 +9851,13 @@ "node": ">=6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true, + "peer": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -10314,6 +10321,13 @@ "dev": true, "peer": true }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true, + "peer": true + }, "node_modules/resolve": { "version": "1.22.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", @@ -12429,24 +12443,25 @@ } }, "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "peer": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { "node": ">=6" } }, "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, "peer": true, "engines": { @@ -13058,6 +13073,17 @@ "dev": true, "peer": true }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "peer": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/url-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/url-regex/-/url-regex-5.0.0.tgz", @@ -21357,6 +21383,13 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true, + "peer": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -21703,6 +21736,13 @@ "dev": true, "peer": true }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true, + "peer": true + }, "resolve": { "version": "1.22.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", @@ -23372,21 +23412,22 @@ } }, "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "peer": true, "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "dependencies": { "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, "peer": true } @@ -23846,6 +23887,17 @@ "dev": true, "peer": true }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "peer": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "url-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/url-regex/-/url-regex-5.0.0.tgz", From 739b2acd203f9a506744c5dd9df42a2190171ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 19 Jul 2023 23:35:26 +0200 Subject: [PATCH 033/156] docs: fix typo (#12493) --- .../templates/hcl_templates/functions/collection/lookup.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx b/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx index a936d02a70c..0eb686063f1 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx @@ -6,7 +6,7 @@ description: The lookup function retrieves an element value from a map given its # `lookup` Function `lookup` retrieves the value of a single element from a map, given its key. -If the given key does not exist, a the given default value is returned instead. +If the given key does not exist, the given default value is returned instead. ```hcl lookup(map, key, default) From 13ed8d90b3b4ac18461add0a00826d093406ebd0 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 20 Jul 2023 07:37:04 -0400 Subject: [PATCH 034/156] Update github-script action REST calls Breaking changed introduced in actions/github-script@v6. https://github.com/actions/github-script#breaking-changes-in-v5 --- .github/workflows/nightly-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 72a1ee3503b..e63c05ea30d 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -43,7 +43,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | try { - await github.git.deleteRef({ + await github.rest.git.deleteRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "tags/nightly" @@ -51,7 +51,7 @@ jobs: } catch (e) { console.log("Warning: The nightly tag doesn't exist yet, so there's nothing to do. Trace: " + e) } - await github.git.createRef({ + await github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "refs/tags/nightly", From 682f2e7b6c15a046ff6619c4788904e5031fd6b8 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 21 Jul 2023 17:37:50 -0400 Subject: [PATCH 035/156] .github/workflows: Replace untrusted GHA in repo workflows (#12530) The GHA action used for adding comments or labels to issues untrusted by TSCCR have been replaced with an approved set of actions. The updated workflows use actions/github-script for adding comments or labels to an issue. Related to: https://github.com/hashicorp/security-tsccr/pull/608 --- .github/workflows/issues-opened.yml | 35 ++++++++++++++++++----------- .github/workflows/jira.yml | 16 ++++++++----- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/.github/workflows/issues-opened.yml b/.github/workflows/issues-opened.yml index 86adfacef1f..7cc3f4cc5fe 100644 --- a/.github/workflows/issues-opened.yml +++ b/.github/workflows/issues-opened.yml @@ -23,24 +23,33 @@ jobs: name: Redirect to discuss permissions: contents: read - issues: write # for actions-ecosystem/action-create-comment to create comments + issues: write # for actions/github-script to create comments and add labels if: contains(github.event.issue.labels.*.name, 'question') runs-on: ubuntu-latest steps: - - uses: actions-ecosystem/action-create-comment@v1.0.2 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - body: | - Hi 👋 thanks for reaching out. + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: | + Hi 👋 thanks for reaching out. - For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility. - As the GitHub issue tracker is only watched by a small subset of maintainers and is really reserved for bugs and enhancements, you'll have a better chance of finding someone who can help you in the forum. - We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response. - If no activity is taken on this question within 30 days it will be automatically closed. + For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility. + As the GitHub issue tracker is only watched by a small subset of maintainers and is really reserved for bugs and enhancements, you'll have a better chance of finding someone who can help you in the forum. + We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response. + If no activity is taken on this question within 30 days it will be automatically closed. - If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue. - - uses: actions-ecosystem/action-add-labels@v1.1.3 # TSCCR: no entry for repository "actions-ecosystem/action-add-labels" + If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue. + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - labels: needs-reply + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['needs-reply'] + }) diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index a0fe240edb6..bdb6b8a5ce2 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -11,7 +11,7 @@ jobs: sync: name: Sync to JIRA permissions: - issues: write # for actions-ecosytem/action-create-comment + issues: write # for actions/github-script to create comments runs-on: ubuntu-latest steps: - name: Login @@ -74,13 +74,17 @@ jobs: - name: Add tracking comment if: steps.create-ticket.outputs.issue != '' && steps.set-ticket-type.outputs.type != 'Invalid' - uses: actions-ecosystem/action-create-comment@v1.0.0 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - body: | - This issue has been synced to JIRA for planning. + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: | + This issue has been synced to JIRA for planning. - JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}}) + JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}}) From 2401add228605115f20aea60023ecbf9cd2360ad Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 24 Jul 2023 11:52:57 -0400 Subject: [PATCH 036/156] Fix body attribute for github-script comment --- .github/workflows/issues-opened.yml | 4 ++-- .github/workflows/jira.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/issues-opened.yml b/.github/workflows/issues-opened.yml index 7cc3f4cc5fe..c899e9993b3 100644 --- a/.github/workflows/issues-opened.yml +++ b/.github/workflows/issues-opened.yml @@ -34,7 +34,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: | + body: ` Hi 👋 thanks for reaching out. For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility. @@ -42,7 +42,7 @@ jobs: We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response. If no activity is taken on this question within 30 days it will be automatically closed. - If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue. + If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue.` - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: script: | diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index bdb6b8a5ce2..70ae2c562c1 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -81,10 +81,10 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: | + body: ` This issue has been synced to JIRA for planning. - JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}}) + JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}})` From a1957a1deff6b71f0905e6a4f1f8b565bc79dd3f Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:03:29 +0000 Subject: [PATCH 037/156] [COMPLIANCE] Add Copyright and License Headers --- acctest/plugin/bundled_plugin_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acctest/plugin/bundled_plugin_test.go b/acctest/plugin/bundled_plugin_test.go index e9308a59869..9f21dfac626 100644 --- a/acctest/plugin/bundled_plugin_test.go +++ b/acctest/plugin/bundled_plugin_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package plugin import ( From 74b5c2aa56e4cccd227f96a3cd36f66261f86b76 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 30 May 2023 13:56:00 -0400 Subject: [PATCH 038/156] issue-comment-created: Add guard for labels The action currently fails when trying to remove the stale or waiting-reply labels from issues that do not actually contain the labels in question. This update adds a guard clause to only run the action on issues containing at least one of the labels. --- .github/workflows/issue-comment-created.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/issue-comment-created.yml b/.github/workflows/issue-comment-created.yml index e28ac0d0939..a5c112d2a15 100644 --- a/.github/workflows/issue-comment-created.yml +++ b/.github/workflows/issue-comment-created.yml @@ -12,6 +12,7 @@ jobs: permissions: contents: read # for actions/checkout to fetch code issues: write # for actions-ecosystem/action-remove-labels to remove issue labels + if: ${{contains(github.event.issue.labels.*.name, 'waiting-reply') || contains(github.event.issue.labels.*.name, 'stale')}} runs-on: ubuntu-latest steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 From 55decee2427dc438213688db46d507b5f1caa981 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 24 Jul 2023 14:01:28 -0400 Subject: [PATCH 039/156] .github: fix issues-opened.yml workflow This commit fixes a bug with the first script, as the object passed to the REST API is not closed properly. --- .github/workflows/issues-opened.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issues-opened.yml b/.github/workflows/issues-opened.yml index c899e9993b3..565b89af048 100644 --- a/.github/workflows/issues-opened.yml +++ b/.github/workflows/issues-opened.yml @@ -43,6 +43,8 @@ jobs: If no activity is taken on this question within 30 days it will be automatically closed. If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue.` + }) + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: script: | @@ -51,5 +53,5 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, labels: ['needs-reply'] - }) + }) From 38101a64c9650798cd60ea873227a5828bf1525a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 19 Jul 2023 12:42:37 -0400 Subject: [PATCH 040/156] hcp: Add support for project level service principals HCP supports two types of service principals: Organization-level and project-level. When a user tries to publish to an active HCP Packer registry using a plsp the client fails when configuring the client due to a API permission error; namely plsp do not have the permissions to query an org for a list of projects. Setting the HCP_PROJECT_ID does not resolve the issue because the call to ListProjects is still executed. This changes updates the client configuration params to obtain both the HCP Organization and Project IDs that will be used for connecting to the HCP Packer registry. With this change if a user provides a project Id via the HCP_PROJECT_ID environment variable no call to ListProjects will be made. Instead the value will be take as is and used to create the connection. A user connecting with a project level service principals must provide a valid HCP_PROJECT_ID in order to connect. --- internal/hcp/api/client.go | 118 +++++++++++++++++++++----------- internal/hcp/api/client_test.go | 4 +- internal/hcp/env/env.go | 4 ++ internal/hcp/env/variables.go | 1 + 4 files changed, 84 insertions(+), 43 deletions(-) diff --git a/internal/hcp/api/client.go b/internal/hcp/api/client.go index 21a07156cc2..89d4a39b489 100644 --- a/internal/hcp/api/client.go +++ b/internal/hcp/api/client.go @@ -7,6 +7,7 @@ package api import ( "fmt" "log" + "net/http" "os" "time" @@ -44,39 +45,67 @@ func NewClient() (*Client, error) { } } - cl, err := httpclient.New(httpclient.Config{ + hcpClientCfg := httpclient.Config{ SourceChannel: fmt.Sprintf("packer/%s", version.PackerVersion.FormattedVersion()), - }) - if err != nil { + } + if err := hcpClientCfg.Canonicalize(); err != nil { return nil, &ClientError{ StatusCode: InvalidClientConfig, Err: err, } } + cl, err := httpclient.New(hcpClientCfg) + if err != nil { + return nil, &ClientError{ + StatusCode: InvalidClientConfig, + Err: err, + } + } client := &Client{ Packer: packerSvc.New(cl, nil), Organization: organizationSvc.New(cl, nil), Project: projectSvc.New(cl, nil), } + //if both HCP_ORGANIZATION_ID and HCP_PROJECT_ID are set via env variables the hcpConfig may have all we need already. + if hcpClientCfg.Profile().OrganizationID != "" && hcpClientCfg.Profile().ProjectID != "" { + client.OrganizationID = hcpClientCfg.Profile().OrganizationID + client.ProjectID = hcpClientCfg.Profile().ProjectID - if err := client.loadOrganizationID(); err != nil { - return nil, &ClientError{ - StatusCode: InvalidClientConfig, - Err: err, - } + return client, nil } - if err := client.loadProjectID(); err != nil { - return nil, &ClientError{ - StatusCode: InvalidClientConfig, - Err: err, + + if client.OrganizationID == "" { + err := client.loadOrganizationID() + if err != nil { + return nil, &ClientError{ + StatusCode: InvalidClientConfig, + Err: err, + } } } + if client.ProjectID == "" { + err := client.loadProjectID() + if err != nil { + return nil, &ClientError{ + StatusCode: InvalidClientConfig, + Err: err, + } + } + } return client, nil } func (c *Client) loadOrganizationID() error { + if c.OrganizationID != "" { + return nil + } + + if env.HasOrganizationID() { + c.OrganizationID = os.Getenv(env.HCPOrganizationID) + return nil + } // Get the organization ID. listOrgParams := organizationSvc.NewOrganizationServiceListParams() listOrgResp, err := c.Organization.OrganizationServiceList(listOrgParams, nil) @@ -92,55 +121,62 @@ func (c *Client) loadOrganizationID() error { } func (c *Client) loadProjectID() error { + if c.ProjectID != "" { + return nil + } + if env.HasProjectID() { + c.ProjectID = os.Getenv(env.HCPProjectID) + return nil + } // Get the project using the organization ID. listProjParams := projectSvc.NewProjectServiceListParams() listProjParams.ScopeID = &c.OrganizationID scopeType := string(rmmodels.HashicorpCloudResourcemanagerResourceIDResourceTypeORGANIZATION) listProjParams.ScopeType = &scopeType listProjResp, err := c.Project.ProjectServiceList(listProjParams, nil) - if err != nil { - return fmt.Errorf("unable to fetch project id: %v", err) - } - - if env.HasProjectID() { - proj, err := findProjectByID(os.Getenv(env.HCPProjectID), listProjResp.Payload.Projects) - if err != nil { - return err - } - c.ProjectID = proj.ID - } else { - if len(listProjResp.Payload.Projects) > 1 { - log.Printf("[WARNING] Multiple HCP projects found, will pick the oldest one by default\n" + - "To specify which project to use, set the HCP_PROJECT_ID environment variable to the one you want to use.") + if err != nil { + //For permission errors our service principle may not have the perms + // to see all projects for an Org; this is the case for project-level service principles. + serviceErr, ok := err.(*projectSvc.ProjectServiceListDefault) + if !ok { + return fmt.Errorf("unable to fetch project list: %v", err) } - - proj, err := findOldestProject(listProjResp.Payload.Projects) - if err != nil { - return err + if serviceErr.Code() == http.StatusForbidden { + return fmt.Errorf("unable to fetch project\n\n"+ + "If the provided credentials are tied to a specific project trying setting the %s environment variable to one you want to use.", env.HCPProjectID) } + } - c.ProjectID = proj.ID + if len(listProjResp.Payload.Projects) > 1 { + log.Printf("[WARNING] Multiple HCP projects found, will pick the oldest one by default\n"+ + "To specify which project to use, set the %s environment variable to the one you want to use.", env.HCPProjectID) } + proj, err := getOldestProject(listProjResp.Payload.Projects) + if err != nil { + return err + } + c.ProjectID = proj.ID return nil } -func findOldestProject(projs []*models.HashicorpCloudResourcemanagerProject) (*models.HashicorpCloudResourcemanagerProject, error) { - if len(projs) == 0 { +// getOldestProject retrieves the oldest project from a list based on its created_at time. +func getOldestProject(projects []*models.HashicorpCloudResourcemanagerProject) (*models.HashicorpCloudResourcemanagerProject, error) { + if len(projects) == 0 { return nil, fmt.Errorf("no project found") } - proj := projs[0] - for i := 1; i < len(projs); i++ { - nxtProj := projs[i] - - if time.Time(nxtProj.CreatedAt).Before(time.Time(proj.CreatedAt)) { - proj = nxtProj + oldestTime := time.Now() + var oldestProj *models.HashicorpCloudResourcemanagerProject + for _, proj := range projects { + projTime := time.Time(proj.CreatedAt) + if projTime.Before(oldestTime) { + oldestProj = proj + oldestTime = projTime } } - - return proj, nil + return oldestProj, nil } func findProjectByID(projID string, projs []*models.HashicorpCloudResourcemanagerProject) (*models.HashicorpCloudResourcemanagerProject, error) { diff --git a/internal/hcp/api/client_test.go b/internal/hcp/api/client_test.go index b1cdbff61c2..466b390b828 100644 --- a/internal/hcp/api/client_test.go +++ b/internal/hcp/api/client_test.go @@ -94,7 +94,7 @@ func TestFindProjectID(t *testing.T) { } } -func TestFindOldestProject(t *testing.T) { +func TestGetOldestProject(t *testing.T) { testcases := []struct { Name string ProjectList []*models.HashicorpCloudResourcemanagerProject @@ -151,7 +151,7 @@ func TestFindOldestProject(t *testing.T) { for _, tt := range testcases { t.Run(tt.Name, func(t *testing.T) { - proj, err := findOldestProject(tt.ProjectList) + proj, err := getOldestProject(tt.ProjectList) if (err != nil) != tt.ExpectErr { t.Errorf("test findProjectByID, expected %t, got %t", tt.ExpectErr, diff --git a/internal/hcp/env/env.go b/internal/hcp/env/env.go index 0cf459015e8..0186be1671f 100644 --- a/internal/hcp/env/env.go +++ b/internal/hcp/env/env.go @@ -13,6 +13,10 @@ func HasProjectID() bool { return hasEnvVar(HCPProjectID) } +func HasOrganizationID() bool { + return hasEnvVar(HCPOrganizationID) +} + func HasClientID() bool { return hasEnvVar(HCPClientID) } diff --git a/internal/hcp/env/variables.go b/internal/hcp/env/variables.go index 71258c13be3..8c74b600d47 100644 --- a/internal/hcp/env/variables.go +++ b/internal/hcp/env/variables.go @@ -7,6 +7,7 @@ const ( HCPClientID = "HCP_CLIENT_ID" HCPClientSecret = "HCP_CLIENT_SECRET" HCPProjectID = "HCP_PROJECT_ID" + HCPOrganizationID = "HCP_ORGANIZATION_ID" HCPPackerRegistry = "HCP_PACKER_REGISTRY" HCPPackerBucket = "HCP_PACKER_BUCKET_NAME" HCPPackerBuildFingerprint = "HCP_PACKER_BUILD_FINGERPRINT" From 60c66fdf9fa0f30986f5b857f4fc69f6a21834dc Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 20 Jul 2023 16:03:43 -0400 Subject: [PATCH 041/156] Add additional validation for manually set project ids When setting a project id via the HCP_PROJECT_ID env the client will try to validate the project by checking that it has an associated registry. If the project is invalid or not a valid UUID an error will be displayed to the user * Add comment to clarify usage of SDK loaded env. variables --- internal/hcp/api/client.go | 48 ++++++++++++------- internal/hcp/api/client_test.go | 83 --------------------------------- 2 files changed, 31 insertions(+), 100 deletions(-) diff --git a/internal/hcp/api/client.go b/internal/hcp/api/client.go index 89d4a39b489..f28999d57b6 100644 --- a/internal/hcp/api/client.go +++ b/internal/hcp/api/client.go @@ -11,6 +11,7 @@ import ( "os" "time" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" packerSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" organizationSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/client/organization_service" projectSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/client/project_service" @@ -67,7 +68,12 @@ func NewClient() (*Client, error) { Organization: organizationSvc.New(cl, nil), Project: projectSvc.New(cl, nil), } - //if both HCP_ORGANIZATION_ID and HCP_PROJECT_ID are set via env variables the hcpConfig may have all we need already. + // A client.Config.hcpConfig is set when calling Canonicalize on basic HCP httpclient, as on line 52. + // If a user sets HCP_* env. variables they will be loaded into the client via the SDK and used for any client calls. + // For HCP_ORGANIZATION_ID and HCP_PROJECT_ID if they are both set via env. variables the call to hcpClientCfg.Connicalize() + // will automatically loaded them using the FromEnv configOption. + // + // If both values are set we should have all that we need to continue so we can returned the configured client. if hcpClientCfg.Profile().OrganizationID != "" && hcpClientCfg.Profile().ProjectID != "" { client.OrganizationID = hcpClientCfg.Profile().OrganizationID client.ProjectID = hcpClientCfg.Profile().ProjectID @@ -94,14 +100,11 @@ func NewClient() (*Client, error) { } } } + return client, nil } func (c *Client) loadOrganizationID() error { - if c.OrganizationID != "" { - return nil - } - if env.HasOrganizationID() { c.OrganizationID = os.Getenv(env.HCPOrganizationID) return nil @@ -121,11 +124,12 @@ func (c *Client) loadOrganizationID() error { } func (c *Client) loadProjectID() error { - if c.ProjectID != "" { - return nil - } if env.HasProjectID() { c.ProjectID = os.Getenv(env.HCPProjectID) + err := c.ValidateRegistryForProject() + if err != nil { + return fmt.Errorf("project validation for id %q responded in error: %v", c.ProjectID, err) + } return nil } // Get the project using the organization ID. @@ -136,15 +140,15 @@ func (c *Client) loadProjectID() error { listProjResp, err := c.Project.ProjectServiceList(listProjParams, nil) if err != nil { - //For permission errors our service principle may not have the perms - // to see all projects for an Org; this is the case for project-level service principles. + //For permission errors, our service principal may not have the ability + // to see all projects for an Org; this is the case for project-level service principals. serviceErr, ok := err.(*projectSvc.ProjectServiceListDefault) if !ok { return fmt.Errorf("unable to fetch project list: %v", err) } if serviceErr.Code() == http.StatusForbidden { return fmt.Errorf("unable to fetch project\n\n"+ - "If the provided credentials are tied to a specific project trying setting the %s environment variable to one you want to use.", env.HCPProjectID) + "If the provided credentials are tied to a specific project try setting the %s environment variable to one you want to use.", env.HCPProjectID) } } @@ -179,12 +183,22 @@ func getOldestProject(projects []*models.HashicorpCloudResourcemanagerProject) ( return oldestProj, nil } -func findProjectByID(projID string, projs []*models.HashicorpCloudResourcemanagerProject) (*models.HashicorpCloudResourcemanagerProject, error) { - for _, proj := range projs { - if proj.ID == projID { - return proj, nil - } +// ValidateRegistryForProject validates that there is an active registry associated to the configured organization and project ids. +// A successful validation will result in a nil response. All other response represent an invalid registry error request or a registry not found error. +func (client *Client) ValidateRegistryForProject() error { + params := packer_service.NewPackerServiceGetRegistryParams() + params.LocationOrganizationID = client.OrganizationID + params.LocationProjectID = client.ProjectID + + resp, err := client.Packer.PackerServiceGetRegistry(params, nil) + if err != nil { + return err } - return nil, fmt.Errorf("No project %q found", projID) + if resp.GetPayload().Registry == nil { + return fmt.Errorf("No active HCP Packer registry was found for the organization %q and project %q", client.OrganizationID, client.ProjectID) + } + + return nil + } diff --git a/internal/hcp/api/client_test.go b/internal/hcp/api/client_test.go index 466b390b828..16d321beb77 100644 --- a/internal/hcp/api/client_test.go +++ b/internal/hcp/api/client_test.go @@ -11,89 +11,6 @@ import ( "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" ) -func TestFindProjectID(t *testing.T) { - testcases := []struct { - Name string - ProjectID string - ProjectList []*models.HashicorpCloudResourcemanagerProject - ExpectProjectID string - ExpectErr bool - }{ - { - "Only one project, project exists, success", - "test-project-exists", - []*models.HashicorpCloudResourcemanagerProject{ - { - ID: "test-project-exists", - }, - }, - "test-project-exists", - false, - }, - { - "Multiple projects, project exists, success", - "test-project-exists", - []*models.HashicorpCloudResourcemanagerProject{ - { - ID: "other-project-exists", - }, - { - ID: "test-project-exists", - }, - }, - "test-project-exists", - false, - }, - { - "One project, no id match, fail", - "test-project-exists", - []*models.HashicorpCloudResourcemanagerProject{ - { - ID: "other-project-exists", - }, - }, - "", - true, - }, - { - "Multiple projects, no id match, fail", - "test-project-exists", - []*models.HashicorpCloudResourcemanagerProject{ - { - ID: "other-project-exists", - }, - { - ID: "yet-another-project-exists", - }, - }, - "", - true, - }, - { - "No projects, no id match, fail", - "test-project-exists", - []*models.HashicorpCloudResourcemanagerProject{}, - "", - true, - }, - } - - for _, tt := range testcases { - t.Run(tt.Name, func(t *testing.T) { - proj, err := findProjectByID(tt.ProjectID, tt.ProjectList) - if (err != nil) != tt.ExpectErr { - t.Errorf("test findProjectByID, expected %t, got %t", - tt.ExpectErr, - err != nil) - } - - if proj != nil && proj.ID != tt.ExpectProjectID { - t.Errorf("expected to select project %q, got %q", tt.ExpectProjectID, proj.ID) - } - }) - } -} - func TestGetOldestProject(t *testing.T) { testcases := []struct { Name string From d0198c8a1714d23b64e82bcf716397c692f7c4d2 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 24 Jul 2023 15:16:29 -0400 Subject: [PATCH 042/156] packer: track bundled plugins usage on telemetry --- command/meta.go | 2 ++ packer/telemetry.go | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/command/meta.go b/command/meta.go index 1579d152237..fb3d9efb2a7 100644 --- a/command/meta.go +++ b/command/meta.go @@ -196,6 +196,8 @@ func (m *Meta) DetectBundledPlugins(handler packer.Handler) hcl.Diagnostics { return nil } + packer.CheckpointReporter.SetBundledUsage() + buf := &strings.Builder{} buf.WriteString("This template relies on the use of plugins bundled into the Packer binary.\n") buf.WriteString("The practice of bundling external plugins into Packer will be removed in an upcoming version.\n\n") diff --git a/packer/telemetry.go b/packer/telemetry.go index d4e20696649..b1f0347b2ba 100644 --- a/packer/telemetry.go +++ b/packer/telemetry.go @@ -26,7 +26,7 @@ const ( JSONTemplate PackerTemplateType = "JSON" ) -const TelemetryVersion string = "beta/packer/6" +const TelemetryVersion string = "beta/packer/7" const TelemetryPanicVersion string = "beta/packer_panic/4" var CheckpointReporter *CheckpointTelemetry @@ -37,6 +37,7 @@ type PackerReport struct { Error string `json:"error"` Command string `json:"command"` TemplateType PackerTemplateType `json:"template_type"` + UseBundled bool `json:"use_bundled"` } type CheckpointTelemetry struct { @@ -44,6 +45,7 @@ type CheckpointTelemetry struct { signatureFile string startTime time.Time templateType PackerTemplateType + useBundled bool } func NewCheckpointReporter(disableSignature bool) *CheckpointTelemetry { @@ -128,6 +130,11 @@ func (c *CheckpointTelemetry) SetTemplateType(t PackerTemplateType) { c.templateType = t } +// SetBundledUsage marks the template as using bundled plugins +func (c *CheckpointTelemetry) SetBundledUsage() { + c.useBundled = true +} + func (c *CheckpointTelemetry) Finalize(command string, errCode int, err error) error { if c == nil { return nil @@ -145,6 +152,7 @@ func (c *CheckpointTelemetry) Finalize(command string, errCode int, err error) e extra.Error = err.Error() } + extra.UseBundled = c.useBundled extra.TemplateType = c.templateType params.Payload = extra // b, _ := json.MarshalIndent(params, "", " ") From 3512a175a6d35cf3311a81a1f1f750bf8281d7d5 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 24 Jul 2023 11:41:04 -0400 Subject: [PATCH 043/156] command: change wording for init's postitional arg `packer init' is meant to be invoked on a template file or a directory. This was described in the command-line help message as `[template.pkr.hcl|folder]'. Because this is encapsulated between square brackets, this could be taken as an option instead of a positional, mandatory argument. This commit changes the wording to adopt a similar convention as `packer build', so the two are consistent in how they are invoked, and to avoid mistaking this argument as optional. --- command/init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/init.go b/command/init.go index 761627134d6..b95eb86992b 100644 --- a/command/init.go +++ b/command/init.go @@ -180,7 +180,7 @@ packer { func (*InitCommand) Help() string { helpText := ` -Usage: packer init [options] [config.pkr.hcl|folder/] +Usage: packer init [options] TEMPLATE Install all the missing plugins required in a Packer config. Note that Packer does not have a state. From 392232933ff1ef66025d3fd82ac3e353fbaf0356 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 24 Jul 2023 11:43:31 -0400 Subject: [PATCH 044/156] website: add usage notice to init The `packer init' command's wording was not clear, so it was changed in a preceding commit, and this commit aims to add more details on how the command is meant to be used, along with a simple example. --- website/content/docs/commands/init.mdx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/website/content/docs/commands/init.mdx b/website/content/docs/commands/init.mdx index 52b72eb8151..e6209d2c15e 100644 --- a/website/content/docs/commands/init.mdx +++ b/website/content/docs/commands/init.mdx @@ -19,6 +19,26 @@ the first command that should be executed when working with a new or existing template. This command is always safe to run multiple times. Though subsequent runs may give errors, this command will never delete anything. +You should invoke `packer init` on either an HCL2 template, or a directory that contains +at least a valid HCL2 template, and eventually other related dependencies like varfiles +for example. + +Example: + +```sh +$ ls . +template.pkr.hcl varfile.pkrvars.pkr.hcl + +$ packer init template.pkr.hcl # You can invoke packer init on a single template in this case + # This works if the template is self-contained, but may fail if + # the template is meant to be built as a bundle of partials. + +$ packer init . # Alternatively, you can invoke packer init on a directory instead, + # which behaves the same in a configuration like this one, but if + # the target is a collection ofHCL2 templates, this is the + # preferred way to invoke it. +``` + Packer does not currently have the notion of a state like Terraform has. In other words, currently `packer init` is only in charge of installing Packer plugins. From 5c9ab19d8fa8467aa2c64d227579c070047ecab2 Mon Sep 17 00:00:00 2001 From: "hashicorp-tsccr[bot]" Date: Thu, 27 Jul 2023 12:40:14 +0000 Subject: [PATCH 045/156] Result of tsccr-helper -log-level=info -pin-all-workflows . --- .github/workflows/issue-migrator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-migrator.yml b/.github/workflows/issue-migrator.yml index 58eed27f22a..719cfa44f2f 100644 --- a/.github/workflows/issue-migrator.yml +++ b/.github/workflows/issue-migrator.yml @@ -12,7 +12,7 @@ jobs: if: startsWith(github.event.label.name, 'remote-plugin/') runs-on: ubuntu-latest steps: - - uses: bflad/action-migrate-issue@main # TSCCR: no entry for repository "bflad/action-migrate-issue" + - uses: bflad/action-migrate-issue@2e049d822b08e67d25b938343227051518f14d9a # v1.0.2 with: source-issue-comment: | This issue has been migrated to {target-issue-url} due to the [Packer Plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). From d1aa103ebc80bcc2863a7bc61c49245847143b94 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 27 Jul 2023 17:12:17 -0400 Subject: [PATCH 046/156] workflows/jira: Fix syntax error for createComment --- .github/workflows/jira.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index 70ae2c562c1..a3fa8cd7ea8 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -68,9 +68,7 @@ jobs: summary: "${{ github.event.repository.name }}: ${{ github.event.issue.title }}" description: "${{ github.event.issue.body }}\n\n_Created from GitHub by ${{ github.actor }}._" # The field customfield_10089 refers to the Issue Link field in JIRA. - fields: '{ "customfield_10089": "${{ github.event.issue.html_url }}", - "components": [{ "name": "OSS" }], - "labels": ${{ steps.set-ticket-labels.outputs.labels }} }' + fields: '{ "customfield_10089": "${{ github.event.issue.html_url }}", "components": [{ "name": "OSS" }], "labels": ${{ steps.set-ticket-labels.outputs.labels }} }' - name: Add tracking comment if: steps.create-ticket.outputs.issue != '' && steps.set-ticket-type.outputs.type != 'Invalid' @@ -83,8 +81,6 @@ jobs: repo: context.repo.repo, body: ` This issue has been synced to JIRA for planning. - JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}})` - - + }) From d3d33714e6834de18a8a71c44874171ec4093503 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 27 Jul 2023 15:58:29 -0400 Subject: [PATCH 047/156] Update plugin loading for current directory Starting with Go 1.19 the loading of binaries from the current working directory was deemed as a possible security problem. Thus the use of exec.Command or exec.LookPath no longer resolves an executable within the current working directory. This change updates the discover logic to return absolute paths for any discovered plugin, which is called directly when passed to exec.Command or exec.LookPath. By doing this Packer is able to load a custom plugin sitting in the current working directory as it did in version prior to v1.9.2. --- packer/plugin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packer/plugin.go b/packer/plugin.go index a4321d90fd0..1a6a0ab845c 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -239,7 +239,11 @@ func (c *PluginConfig) discoverSingle(glob string) (map[string]string, error) { pluginName = strings.SplitN(pluginName, "_", 2)[0] log.Printf("[INFO] Discovered potential plugin: %s = %s", pluginName, match) - res[pluginName] = match + pluginPath, err := filepath.Abs(match) + if err != nil { + pluginPath = match + } + res[pluginName] = pluginPath } return res, nil From a96584fb5613106cd106087f7f841fd57ff98cff Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 27 Jul 2023 16:04:34 -0400 Subject: [PATCH 048/156] Update plugin discover logic When copying a plugin's checksum file (packer-plugin-*_SHA256SUM) installed by `packer plugins install` or `packer init` into a separate directory the file may be copied with the executable bit turned out. If unchanged after the copy, Packer would discover the checksum file as a possible plugin match and error when trying to execute describe on the plugin look a like. This change adds a checksum file test to the plugin matching logic. If the discovered plugin name is a checksum it is excluded from the discovered plugin list. --- packer/plugin.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packer/plugin.go b/packer/plugin.go index 1a6a0ab845c..69f0b631c7d 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -20,6 +20,11 @@ import ( plugingetter "github.com/hashicorp/packer/packer/plugin-getter" ) +var defaultChecksummer = plugingetter.Checksummer{ + Type: "sha256", + Hash: sha256.New(), +} + // PluginConfig helps load and use packer plugins type PluginConfig struct { KnownPluginFolders []string @@ -227,6 +232,14 @@ func (c *PluginConfig) discoverSingle(glob string) (map[string]string, error) { continue } + if strings.Contains(strings.ToUpper(file), defaultChecksummer.FileExt()) { + log.Printf( + "[TRACE] Ignoring plugin match %s, which looks to be a checksum file", + match) + continue + + } + // If the filename has a ".", trim up to there if idx := strings.Index(file, ".exe"); idx >= 0 { file = file[:idx] @@ -383,7 +396,7 @@ func (c *PluginConfig) discoverInstalledComponents(path string) error { APIVersionMajor: pluginsdk.APIVersionMajor, APIVersionMinor: pluginsdk.APIVersionMinor, Checksummers: []plugingetter.Checksummer{ - {Type: "sha256", Hash: sha256.New()}, + defaultChecksummer, }, } From 848039dcdb2a150b0271e044407327e7ec8ec347 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 28 Jul 2023 12:48:02 -0400 Subject: [PATCH 049/156] Update plugin discover testing * Add test case for loading plugin in CWD * Add test case to validate checksume files are ignored * Update Discover to include CWD "." in PluginFolders if KnowPluginFolders is unset --- packer/plugin.go | 3 +- packer/plugin_discover_test.go | 424 +++++++++++++++++++-------------- 2 files changed, 244 insertions(+), 183 deletions(-) diff --git a/packer/plugin.go b/packer/plugin.go index 69f0b631c7d..dd3e6d31719 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -85,7 +85,8 @@ func (c *PluginConfig) Discover() error { } if len(c.KnownPluginFolders) == 0 { - c.KnownPluginFolders = PluginFolders() + //PluginFolders should match the call in github.com/hahicorp/packer/main.go#loadConfig + c.KnownPluginFolders = PluginFolders(".") } // TODO after JSON is deprecated remove support for legacy component plugins. diff --git a/packer/plugin_discover_test.go b/packer/plugin_discover_test.go index 91e8ba6b318..fec52607d83 100644 --- a/packer/plugin_discover_test.go +++ b/packer/plugin_discover_test.go @@ -154,6 +154,233 @@ func TestDiscoverDatasource(t *testing.T) { } } +func TestMultiPlugin_describe(t *testing.T) { + createMockPlugins(t, mockPlugins) + pluginDir := os.Getenv("PACKER_PLUGIN_PATH") + defer os.RemoveAll(pluginDir) + c := PluginConfig{} + err := c.Discover() + if err != nil { + t.Fatalf("error discovering plugins; %s", err.Error()) + } + + for mockPluginName, plugin := range mockPlugins { + for mockBuilderName := range plugin.Builders { + expectedBuilderName := mockPluginName + "-" + mockBuilderName + + if !c.Builders.Has(expectedBuilderName) { + t.Fatalf("expected to find builder %q", expectedBuilderName) + } + } + for mockProvisionerName := range plugin.Provisioners { + expectedProvisionerName := mockPluginName + "-" + mockProvisionerName + if !c.Provisioners.Has(expectedProvisionerName) { + t.Fatalf("expected to find builder %q", expectedProvisionerName) + } + } + for mockPostProcessorName := range plugin.PostProcessors { + expectedPostProcessorName := mockPluginName + "-" + mockPostProcessorName + if !c.PostProcessors.Has(expectedPostProcessorName) { + t.Fatalf("expected to find post-processor %q", expectedPostProcessorName) + } + } + for mockDatasourceName := range plugin.Datasources { + expectedDatasourceName := mockPluginName + "-" + mockDatasourceName + if !c.DataSources.Has(expectedDatasourceName) { + t.Fatalf("expected to find datasource %q", expectedDatasourceName) + } + } + } +} + +func TestMultiPlugin_describe_installed(t *testing.T) { + createMockInstalledPlugins(t, mockInstalledPlugins, createMockChecksumFile) + pluginDir := os.Getenv("PACKER_PLUGIN_PATH") + defer os.RemoveAll(pluginDir) + + c := PluginConfig{} + err := c.Discover() + if err != nil { + t.Fatalf("error discovering plugins; %s", err.Error()) + } + + for mockPluginName, plugin := range mockInstalledPlugins { + mockPluginName = strings.Split(mockPluginName, "_")[0] + for mockBuilderName := range plugin.Builders { + expectedBuilderName := mockPluginName + "-" + mockBuilderName + if !c.Builders.Has(expectedBuilderName) { + t.Fatalf("expected to find builder %q", expectedBuilderName) + } + } + for mockProvisionerName := range plugin.Provisioners { + expectedProvisionerName := mockPluginName + "-" + mockProvisionerName + if !c.Provisioners.Has(expectedProvisionerName) { + t.Fatalf("expected to find builder %q", expectedProvisionerName) + } + } + for mockPostProcessorName := range plugin.PostProcessors { + expectedPostProcessorName := mockPluginName + "-" + mockPostProcessorName + if !c.PostProcessors.Has(expectedPostProcessorName) { + t.Fatalf("expected to find post-processor %q", expectedPostProcessorName) + } + } + for mockDatasourceName := range plugin.Datasources { + expectedDatasourceName := mockPluginName + "-" + mockDatasourceName + if !c.DataSources.Has(expectedDatasourceName) { + t.Fatalf("expected to find datasource %q", expectedDatasourceName) + } + } + } +} + +func TestMultiPlugin_describe_installed_for_invalid(t *testing.T) { + tc := []struct { + desc string + installedPluginsMock map[string]pluginsdk.Set + createMockFn func(*testing.T, map[string]pluginsdk.Set) + }{ + { + desc: "Incorrectly named plugins", + installedPluginsMock: invalidInstalledPluginsMock, + createMockFn: func(t *testing.T, mocks map[string]pluginsdk.Set) { + createMockInstalledPlugins(t, mocks, createMockChecksumFile) + }, + }, + { + desc: "Plugins missing checksums", + installedPluginsMock: mockInstalledPlugins, + createMockFn: func(t *testing.T, mocks map[string]pluginsdk.Set) { + createMockInstalledPlugins(t, mocks) + }, + }, + } + + for _, tt := range tc { + t.Run(tt.desc, func(t *testing.T) { + tt.createMockFn(t, tt.installedPluginsMock) + pluginDir := os.Getenv("PACKER_PLUGIN_PATH") + defer os.RemoveAll(pluginDir) + + c := PluginConfig{} + err := c.Discover() + if err != nil { + t.Fatalf("error discovering plugins; %s", err.Error()) + } + if c.Builders.Has("feather") { + t.Fatalf("expected to not find builder %q", "feather") + } + for mockPluginName, plugin := range tt.installedPluginsMock { + mockPluginName = strings.Split(mockPluginName, "_")[0] + for mockBuilderName := range plugin.Builders { + expectedBuilderName := mockPluginName + "-" + mockBuilderName + if c.Builders.Has(expectedBuilderName) { + t.Fatalf("expected to not find builder %q", expectedBuilderName) + } + } + for mockProvisionerName := range plugin.Provisioners { + expectedProvisionerName := mockPluginName + "-" + mockProvisionerName + if c.Provisioners.Has(expectedProvisionerName) { + t.Fatalf("expected to not find builder %q", expectedProvisionerName) + } + } + for mockPostProcessorName := range plugin.PostProcessors { + expectedPostProcessorName := mockPluginName + "-" + mockPostProcessorName + if c.PostProcessors.Has(expectedPostProcessorName) { + t.Fatalf("expected to not find post-processor %q", expectedPostProcessorName) + } + } + for mockDatasourceName := range plugin.Datasources { + expectedDatasourceName := mockPluginName + "-" + mockDatasourceName + if c.DataSources.Has(expectedDatasourceName) { + t.Fatalf("expected to not find datasource %q", expectedDatasourceName) + } + } + } + }) + } +} + +func TestMultiPlugin_defaultName(t *testing.T) { + createMockPlugins(t, defaultNameMock) + pluginDir := os.Getenv("PACKER_PLUGIN_PATH") + defer os.RemoveAll(pluginDir) + + c := PluginConfig{} + err := c.Discover() + if err != nil { + t.Fatalf("error discovering plugins; %s ; mocks are %#v", err.Error(), defaultNameMock) + } + + expectedBuilderNames := []string{"foo-bar", "foo-baz", "foo"} + for _, mockBuilderName := range expectedBuilderNames { + if !c.Builders.Has(mockBuilderName) { + t.Fatalf("expected to find builder %q; builders is %#v", mockBuilderName, c.Builders) + } + } +} + +// no T.Parallel using os.Chdir +func TestMultiPlugin_CWD(t *testing.T) { + createMockPlugins(t, defaultNameMock) + pluginDir := os.Getenv("PACKER_PLUGIN_PATH") + defer os.RemoveAll(pluginDir) + // Unset PACKER_PLUGIN_PATH to test CWD loading + os.Unsetenv("PACKER_PLUGIN_PATH") + if err := os.Chdir(pluginDir); err != nil { + t.Fatalf("failed to change directory to test loading from CWD: %s", err) + } + c := PluginConfig{} + err := c.Discover() + if err != nil { + t.Fatalf("error discovering plugins; %s ; mocks are %#v", err.Error(), defaultNameMock) + } + expectedBuilderNames := []string{"foo-bar", "foo-baz", "foo"} + for _, mockBuilderName := range expectedBuilderNames { + if !c.Builders.Has(mockBuilderName) { + t.Fatalf("expected to find builder %q; builders is %#v", mockBuilderName, c.Builders) + } + } +} + +func TestMultiPlugin_IgnoreChecksumFile(t *testing.T) { + createMockPlugins(t, defaultNameMock) + pluginDir := os.Getenv("PACKER_PLUGIN_PATH") + defer os.RemoveAll(pluginDir) + + csFile, err := generateMockChecksumFile(filepath.Join(pluginDir, "packer-plugin-foo")) + if err != nil { + t.Fatal(err.Error()) + } + // Copy plugin contents into checksum file to validate that it is not only skipped but that it never gets loaded + if err := os.Rename(filepath.Join(pluginDir, "packer-plugin-foo"), csFile); err != nil { + t.Fatalf("failed to rename plugin bin file to checkfum file needed for test: %s", err) + } + + c := PluginConfig{} + err = c.Discover() + if err != nil { + t.Fatalf("error discovering plugins; %s ; mocks are %#v", err.Error(), defaultNameMock) + } + expectedBuilderNames := []string{"foo-bar", "foo-baz", "foo"} + for _, mockBuilderName := range expectedBuilderNames { + if c.Builders.Has(mockBuilderName) { + t.Fatalf("expected to not find builder %q; builders is %#v", mockBuilderName, c.Builders) + } + } +} + +func TestMultiPlugin_defaultName_each_plugin_type(t *testing.T) { + createMockPlugins(t, doubleDefaultMock) + pluginDir := os.Getenv("PACKER_PLUGIN_PATH") + defer os.RemoveAll(pluginDir) + + c := PluginConfig{} + err := c.Discover() + if err != nil { + t.Fatal("Should not have error because pluginsdk.DEFAULT_NAME is used twice but only once per plugin type.") + } +} + func generateFakePlugins(dirname string, pluginNames []string) (string, []string, func(), error) { dir, err := os.MkdirTemp("", dirname) if err != nil { @@ -296,6 +523,15 @@ func createMockPlugins(t *testing.T, plugins map[string]pluginsdk.Set) { } func createMockChecksumFile(t testing.TB, filePath string) { + t.Helper() + cs, err := generateMockChecksumFile(filePath) + if err != nil { + t.Fatalf(err.Error()) + } + t.Logf("created fake plugin checksum file %s", cs) +} + +func generateMockChecksumFile(filePath string) (string, error) { cs := plugingetter.Checksummer{ Type: "sha256", Hash: sha256.New(), @@ -303,19 +539,20 @@ func createMockChecksumFile(t testing.TB, filePath string) { f, err := os.Open(filePath) if err != nil { - t.Fatalf("failed to open fake plugin binary: %v", err) + return "", fmt.Errorf("failed to open fake plugin binary: %v", err) } defer f.Close() sum, err := cs.Sum(f) if err != nil { - t.Fatalf("failed to checksum fake plugin binary: %v", err) + return "", fmt.Errorf("failed to checksum fake plugin binary: %v", err) } - t.Logf("creating fake plugin checksum file %s with contents %x", filePath+cs.FileExt(), string(sum)) - if err := os.WriteFile(filePath+cs.FileExt(), []byte(fmt.Sprintf("%x", sum)), os.ModePerm); err != nil { - t.Fatalf("failed to write checksum fake plugin binary: %v", err) + sumfile := filePath + cs.FileExt() + if err := os.WriteFile(sumfile, []byte(fmt.Sprintf("%x", sum)), os.ModePerm); err != nil { + return "", fmt.Errorf("failed to write checksum fake plugin binary: %v", err) } + return sumfile, nil } func createMockInstalledPlugins(t *testing.T, plugins map[string]pluginsdk.Set, opts ...func(tb testing.TB, filePath string)) { @@ -461,180 +698,3 @@ var ( }, } ) - -func Test_multiplugin_describe(t *testing.T) { - createMockPlugins(t, mockPlugins) - pluginDir := os.Getenv("PACKER_PLUGIN_PATH") - defer os.RemoveAll(pluginDir) - c := PluginConfig{} - err := c.Discover() - if err != nil { - t.Fatalf("error discovering plugins; %s", err.Error()) - } - - for mockPluginName, plugin := range mockPlugins { - for mockBuilderName := range plugin.Builders { - expectedBuilderName := mockPluginName + "-" + mockBuilderName - - if !c.Builders.Has(expectedBuilderName) { - t.Fatalf("expected to find builder %q", expectedBuilderName) - } - } - for mockProvisionerName := range plugin.Provisioners { - expectedProvisionerName := mockPluginName + "-" + mockProvisionerName - if !c.Provisioners.Has(expectedProvisionerName) { - t.Fatalf("expected to find builder %q", expectedProvisionerName) - } - } - for mockPostProcessorName := range plugin.PostProcessors { - expectedPostProcessorName := mockPluginName + "-" + mockPostProcessorName - if !c.PostProcessors.Has(expectedPostProcessorName) { - t.Fatalf("expected to find post-processor %q", expectedPostProcessorName) - } - } - for mockDatasourceName := range plugin.Datasources { - expectedDatasourceName := mockPluginName + "-" + mockDatasourceName - if !c.DataSources.Has(expectedDatasourceName) { - t.Fatalf("expected to find datasource %q", expectedDatasourceName) - } - } - } -} - -func Test_multiplugin_describe_installed(t *testing.T) { - createMockInstalledPlugins(t, mockInstalledPlugins, createMockChecksumFile) - pluginDir := os.Getenv("PACKER_PLUGIN_PATH") - defer os.RemoveAll(pluginDir) - - c := PluginConfig{} - err := c.Discover() - if err != nil { - t.Fatalf("error discovering plugins; %s", err.Error()) - } - - for mockPluginName, plugin := range mockInstalledPlugins { - mockPluginName = strings.Split(mockPluginName, "_")[0] - for mockBuilderName := range plugin.Builders { - expectedBuilderName := mockPluginName + "-" + mockBuilderName - if !c.Builders.Has(expectedBuilderName) { - t.Fatalf("expected to find builder %q", expectedBuilderName) - } - } - for mockProvisionerName := range plugin.Provisioners { - expectedProvisionerName := mockPluginName + "-" + mockProvisionerName - if !c.Provisioners.Has(expectedProvisionerName) { - t.Fatalf("expected to find builder %q", expectedProvisionerName) - } - } - for mockPostProcessorName := range plugin.PostProcessors { - expectedPostProcessorName := mockPluginName + "-" + mockPostProcessorName - if !c.PostProcessors.Has(expectedPostProcessorName) { - t.Fatalf("expected to find post-processor %q", expectedPostProcessorName) - } - } - for mockDatasourceName := range plugin.Datasources { - expectedDatasourceName := mockPluginName + "-" + mockDatasourceName - if !c.DataSources.Has(expectedDatasourceName) { - t.Fatalf("expected to find datasource %q", expectedDatasourceName) - } - } - } -} - -func Test_multiplugin_describe_installed_for_invalid(t *testing.T) { - tc := []struct { - desc string - installedPluginsMock map[string]pluginsdk.Set - createMockFn func(*testing.T, map[string]pluginsdk.Set) - }{ - { - desc: "Incorrectly named plugins", - installedPluginsMock: invalidInstalledPluginsMock, - createMockFn: func(t *testing.T, mocks map[string]pluginsdk.Set) { - createMockInstalledPlugins(t, mocks, createMockChecksumFile) - }, - }, - { - desc: "Plugins missing checksums", - installedPluginsMock: mockInstalledPlugins, - createMockFn: func(t *testing.T, mocks map[string]pluginsdk.Set) { - createMockInstalledPlugins(t, mocks) - }, - }, - } - - for _, tt := range tc { - t.Run(tt.desc, func(t *testing.T) { - tt.createMockFn(t, tt.installedPluginsMock) - pluginDir := os.Getenv("PACKER_PLUGIN_PATH") - defer os.RemoveAll(pluginDir) - - c := PluginConfig{} - err := c.Discover() - if err != nil { - t.Fatalf("error discovering plugins; %s", err.Error()) - } - if c.Builders.Has("feather") { - t.Fatalf("expected to not find builder %q", "feather") - } - for mockPluginName, plugin := range tt.installedPluginsMock { - mockPluginName = strings.Split(mockPluginName, "_")[0] - for mockBuilderName := range plugin.Builders { - expectedBuilderName := mockPluginName + "-" + mockBuilderName - if c.Builders.Has(expectedBuilderName) { - t.Fatalf("expected to not find builder %q", expectedBuilderName) - } - } - for mockProvisionerName := range plugin.Provisioners { - expectedProvisionerName := mockPluginName + "-" + mockProvisionerName - if c.Provisioners.Has(expectedProvisionerName) { - t.Fatalf("expected to not find builder %q", expectedProvisionerName) - } - } - for mockPostProcessorName := range plugin.PostProcessors { - expectedPostProcessorName := mockPluginName + "-" + mockPostProcessorName - if c.PostProcessors.Has(expectedPostProcessorName) { - t.Fatalf("expected to not find post-processor %q", expectedPostProcessorName) - } - } - for mockDatasourceName := range plugin.Datasources { - expectedDatasourceName := mockPluginName + "-" + mockDatasourceName - if c.DataSources.Has(expectedDatasourceName) { - t.Fatalf("expected to not find datasource %q", expectedDatasourceName) - } - } - } - }) - } -} - -func Test_multiplugin_defaultName(t *testing.T) { - createMockPlugins(t, defaultNameMock) - pluginDir := os.Getenv("PACKER_PLUGIN_PATH") - defer os.RemoveAll(pluginDir) - - c := PluginConfig{} - err := c.Discover() - if err != nil { - t.Fatalf("error discovering plugins; %s ; mocks are %#v", err.Error(), defaultNameMock) - } - - expectedBuilderNames := []string{"foo-bar", "foo-baz", "foo"} - for _, mockBuilderName := range expectedBuilderNames { - if !c.Builders.Has(mockBuilderName) { - t.Fatalf("expected to find builder %q; builders is %#v", mockBuilderName, c.Builders) - } - } -} - -func Test_only_one_multiplugin_defaultName_each_plugin_type(t *testing.T) { - createMockPlugins(t, doubleDefaultMock) - pluginDir := os.Getenv("PACKER_PLUGIN_PATH") - defer os.RemoveAll(pluginDir) - - c := PluginConfig{} - err := c.Discover() - if err != nil { - t.Fatal("Should not have error because pluginsdk.DEFAULT_NAME is used twice but only once per plugin type.") - } -} From 99c79ecbd6b0fa25ead81a0693429b1b4c764263 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 2 Aug 2023 15:34:06 -0400 Subject: [PATCH 050/156] Add build tags to skip amd64 tests on darwin/arm64 (#12549) --- command/init_test.go | 2 ++ command/plugins_install_test.go | 2 ++ command/plugins_remove_test.go | 2 ++ 3 files changed, 6 insertions(+) diff --git a/command/init_test.go b/command/init_test.go index 7f35d3f4cc5..8a10cbb0c73 100644 --- a/command/init_test.go +++ b/command/init_test.go @@ -1,6 +1,8 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 +//go:build amd64 && (darwin || windows || linux) + package command import ( diff --git a/command/plugins_install_test.go b/command/plugins_install_test.go index 577d8b3f776..7f34cb5dddd 100644 --- a/command/plugins_install_test.go +++ b/command/plugins_install_test.go @@ -1,6 +1,8 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 +//go:build amd64 && (darwin || windows || linux) + package command import ( diff --git a/command/plugins_remove_test.go b/command/plugins_remove_test.go index 41104db7146..83b2463bc02 100644 --- a/command/plugins_remove_test.go +++ b/command/plugins_remove_test.go @@ -1,6 +1,8 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 +//go:build amd64 && (darwin || windows || linux) + package command import ( From b29abbcd8c9364a721fab8be6aac331e26d4b744 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 20 Jul 2023 15:53:52 -0400 Subject: [PATCH 051/156] Dockerfile: remove trailing whitespaces --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75acdcd3450..5724076b480 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,13 @@ # SPDX-License-Identifier: MPL-2.0 # ======================================================================== -# +# # This Dockerfile contains multiple targets. # Use 'docker build --target= .' to build one. # e.g. `docker build --target=release-light .` # -# All non-dev targets have a PRODUCT_VERSION argument that must be provided -# via --build-arg=PRODUCT_VERSION= when building. +# All non-dev targets have a PRODUCT_VERSION argument that must be provided +# via --build-arg=PRODUCT_VERSION= when building. # e.g. --build-arg PRODUCT_VERSION=1.11.2 # # For local dev and testing purposes, please build and use the `dev` docker image. @@ -28,7 +28,7 @@ COPY bin/packer /bin/packer ENTRYPOINT ["/bin/packer"] -# Official docker image that includes binaries from releases.hashicorp.com. +# Official docker image that includes binaries from releases.hashicorp.com. # This downloads the release from releases.hashicorp.com and therefore requires that # the release is published before building the Docker image. FROM docker.mirror.hashicorp.services/alpine:latest as official @@ -79,7 +79,7 @@ ENTRYPOINT ["/bin/packer"] # Light docker image which can be used to run the binary from a container. -# This image builds from the locally generated binary in ./bin/, and from CI-built binaries within CI. +# This image builds from the locally generated binary in ./bin/, and from CI-built binaries within CI. # To generate the local binary, run `make dev`. # This image is published to DockerHub under the `light`, `light-$VERSION`, and `latest` tags. FROM docker.mirror.hashicorp.services/alpine:latest as release-light From ffe277677063c1d5e3711e693ad3baeb80f43c7d Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 21 Jul 2023 11:38:29 -0400 Subject: [PATCH 052/156] README: fix link to CONTRIBUTING Since the main branch is not called master anymore, and the anchor was renamed, we fix both these changes in the link to that page from the README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af75e1ed95b..c6a6703d72a 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ key points. First, [download a pre-built Packer binary](https://www.packer.io/downloads.html) for your operating system or [compile Packer -yourself](https://github.com/hashicorp/packer/blob/master/.github/CONTRIBUTING.md#setting-up-go-to-work-on-packer). +yourself](https://github.com/hashicorp/packer/blob/main/.github/CONTRIBUTING.md#setting-up-go). After Packer is installed, create your first template, which tells Packer what platforms to build images for and how you want to build them. In our From 838736982c6248bd47c631f01f16e8f57ee716d6 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 21 Jul 2023 11:39:25 -0400 Subject: [PATCH 053/156] Dockerfile: add release-full target In addition to the `release-light' target, we add a `release_full' target to the Dockerfile, so that we can ship an image of Packer with the official plugins pre-bundled in their latest version. --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5724076b480..d50c96ebcf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,6 +104,24 @@ COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/ ENTRYPOINT ["/bin/packer"] +# Full docker image which can be used to run the binary from a container. +# This image is essentially the same as the `release-light` one, but embeds +# the official plugins in it. +FROM release-light as release-full + +# Install the latest version of the official plugins +RUN /bin/packer plugins install "github.com/hashicorp/amazon" && \ + /bin/packer plugins install "github.com/hashicorp/ansible" && \ + /bin/packer plugins install "github.com/hashicorp/azure" && \ + /bin/packer plugins install "github.com/hashicorp/docker" && \ + /bin/packer plugins install "github.com/hashicorp/googlecompute" && \ + /bin/packer plugins install "github.com/hashicorp/qemu" && \ + /bin/packer plugins install "github.com/hashicorp/vagrant" && \ + /bin/packer plugins install "github.com/hashicorp/virtualbox" && \ + /bin/packer plugins install "github.com/hashicorp/vmware" && \ + /bin/packer plugins install "github.com/hashicorp/vsphere" + +ENTRYPOINT ["/bin/packer"] # Set default target to 'dev'. FROM dev From c6da7777150b7751b8f4a968180dfe71305093d7 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 21 Jul 2023 11:43:39 -0400 Subject: [PATCH 054/156] workflows: add docker-full to build workflow --- .github/workflows/build.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b713ef62393..a756fc56013 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -222,7 +222,7 @@ jobs: instructions: |- go build -o "$BIN_PATH" -ldflags="$LD_FLAGS" -tags netcgo -trimpath -buildvcs=false - build-docker: + build-docker-light: name: Docker light ${{ matrix.arch }} build needs: - set-product-version @@ -251,3 +251,31 @@ jobs: dev_tags: | docker.io/hashicorppreview/${{ env.REPO_NAME }}:${{ env.version }} docker.io/hashicorppreview/${{ env.REPO_NAME }}:${{ env.version }}-${{ github.sha }} + + build-docker-full: + name: Docker full ${{ matrix.arch }} build + needs: + - set-product-version + - build-linux + runs-on: ubuntu-latest + strategy: + matrix: + arch: [ "arm", "arm64", "386", "amd64" ] + env: + version: ${{ needs.set-product-version.outputs.product-version }} + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Docker Build (Action) + uses: hashicorp/actions-docker-build@v1 + with: + version: ${{ env.version }} + target: release-full + arch: ${{ matrix.arch }} + tags: | + docker.io/hashicorp/${{ env.REPO_NAME }}:full + docker.io/hashicorp/${{ env.REPO_NAME }}:full-${{ env.version }} + public.ecr.aws/hashicorp/${{ env.REPO_NAME }}:full + public.ecr.aws/hashicorp/${{ env.REPO_NAME }}:full-${{ env.version }} + dev_tags: | + docker.io/hashicorppreview/${{ env.REPO_NAME }}:full-${{ env.version }} + docker.io/hashicorppreview/${{ env.REPO_NAME }}:full-${{ env.version }}-${{ github.sha }} From 55854f55377872adddb9d017a800fe33a8a0fb0e Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 25 Jul 2023 11:40:46 -0400 Subject: [PATCH 055/156] Makefile: only build dev version of binary/docker The Docker images release-light and release-full are not to be built locally from a dev build, but from a release, and the commands to build those images are only referenced in CI, so we don't need to ship them as part of the makefile. In addition, those images are not straightforward to build from the Makefile, as they require quite a few things from the environment, as well as the binary installed in a specific location, which is never setup by the rest of the Makefile. Therefore, we opted to simplify the Makefile so that it only builds docker-dev for local use. --- Dockerfile | 51 --------------------------------------------------- Makefile | 35 ++++++++--------------------------- 2 files changed, 8 insertions(+), 78 deletions(-) diff --git a/Dockerfile b/Dockerfile index d50c96ebcf0..1b5ae54e942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,57 +27,6 @@ COPY bin/packer /bin/packer ENTRYPOINT ["/bin/packer"] - -# Official docker image that includes binaries from releases.hashicorp.com. -# This downloads the release from releases.hashicorp.com and therefore requires that -# the release is published before building the Docker image. -FROM docker.mirror.hashicorp.services/alpine:latest as official - -# This is the release of Packer to pull in. -ARG PRODUCT_VERSION - -LABEL name="Packer" \ - maintainer="HashiCorp Packer Team " \ - vendor="HashiCorp" \ - version=$PRODUCT_VERSION \ - release=$PRODUCT_VERSION \ - summary="Packer is a tool for creating identical machine images for multiple platforms from a single source configuration." \ - description="Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. Please submit issues to https://github.com/hashicorp/packer/issues" - -# This is the location of the releases. -ENV HASHICORP_RELEASES=https://releases.hashicorp.com - -RUN set -eux && \ - apk add --no-cache git bash wget openssl gnupg xorriso && \ - gpg --keyserver keyserver.ubuntu.com --recv-keys C874011F0AB405110D02105534365D9472D7468F && \ - mkdir -p /tmp/build && \ - cd /tmp/build && \ - apkArch="$(apk --print-arch)" && \ - case "${apkArch}" in \ - aarch64) packerArch='arm64' ;; \ - armhf) packerArch='arm' ;; \ - x86) packerArch='386' ;; \ - x86_64) packerArch='amd64' ;; \ - *) echo >&2 "error: unsupported architecture: ${apkArch} (see ${HASHICORP_RELEASES}/packer/${PRODUCT_VERSION}/)" && exit 1 ;; \ - esac && \ - wget ${HASHICORP_RELEASES}/packer/${PRODUCT_VERSION}/packer_${PRODUCT_VERSION}_linux_${packerArch}.zip && \ - wget ${HASHICORP_RELEASES}/packer/${PRODUCT_VERSION}/packer_${PRODUCT_VERSION}_SHA256SUMS && \ - wget ${HASHICORP_RELEASES}/packer/${PRODUCT_VERSION}/packer_${PRODUCT_VERSION}_SHA256SUMS.sig && \ - gpg --batch --verify packer_${PRODUCT_VERSION}_SHA256SUMS.sig packer_${PRODUCT_VERSION}_SHA256SUMS && \ - grep packer_${PRODUCT_VERSION}_linux_${packerArch}.zip packer_${PRODUCT_VERSION}_SHA256SUMS | sha256sum -c && \ - unzip -d /tmp/build packer_${PRODUCT_VERSION}_linux_${packerArch}.zip && \ - cp /tmp/build/packer /bin/packer && \ - cd /tmp && \ - rm -rf /tmp/build && \ - gpgconf --kill all && \ - apk del gnupg openssl && \ - rm -rf /root/.gnupg && \ - # Tiny smoke test to ensure the binary we downloaded runs - packer version - -ENTRYPOINT ["/bin/packer"] - - # Light docker image which can be used to run the binary from a container. # This image builds from the locally generated binary in ./bin/, and from CI-built binaries within CI. # To generate the local binary, run `make dev`. diff --git a/Makefile b/Makefile index 01d62f0053c..ed46303684f 100644 --- a/Makefile +++ b/Makefile @@ -71,41 +71,22 @@ dev: ## Build and install a development build # Docker build variables and targets REGISTRY_NAME?=docker.io/hashicorp IMAGE_NAME=packer -VERSION?=1.7.10 -IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION) -IMAGE_TAG_DEV=$(REGISTRY_NAME)/$(IMAGE_NAME):latest-$(shell git rev-parse --short HEAD) - -docker: docker-official -docker-light: docker-official - -# Builds from the releases.hashicorp.com official binary -docker-official: - docker build \ - --tag $(IMAGE_TAG) \ - --tag hashicorp/packer:latest \ - --target=official \ - --build-arg VERSION=$(VERSION) \ - . +IMAGE_TAG_DEV=$(REGISTRY_NAME)/$(IMAGE_NAME):latest-$(GIT_COMMIT) -# Builds multiarch from the releases.hashicorp.com official binary -docker-multiarch-official: - docker buildx build \ - --tag $(IMAGE_TAG) \ - --tag hashicorp/packer:latest \ - --target=official \ - --build-arg VERSION=$(VERSION) \ - --platform linux/amd64,linux/arm64 \ - . +docker: docker-dev # Builds from the locally generated binary in ./bin/ # To generate the local binary, run `make dev` -docker-dev: export GOOS=linux -docker-dev: export GOARCH=amd64 -docker-dev: dev +docker-dev: + @GOOS=linux \ + GOARCH=amd64 \ + CGO_ENABLED=0 \ + go build -ldflags '$(GOLDFLAGS)' -o bin/packer . @docker build \ --tag $(IMAGE_TAG_DEV) \ --target=dev \ . + @rm -f bin/packer # Clean up the Linux/amd64 binary to avoid conficts on other OS/archs lint: install-lint-deps ## Lint Go code @if [ ! -z $(PKG_NAME) ]; then \ From 376f0e9991c63d742dd8c93a89a7aec5e4dd838e Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 3 Aug 2023 09:39:47 -0400 Subject: [PATCH 056/156] docker: remove trailing spaces for Docker README --- .release/docker/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.release/docker/README.md b/.release/docker/README.md index 4fdf9272958..ac1181da263 100644 --- a/.release/docker/README.md +++ b/.release/docker/README.md @@ -1,6 +1,6 @@ # Packer Docker Container -The root of this repository contains the officially supported HashiCorp Dockerfile to build the hashicorp/packer docker image. The `dev` docker image should be built for local dev and testing, while the production docker image, `release`, is built in CI and makes use of CI-built binaries. The `official` docker image is built using the official binaries from releases.hashicorp.com. +The root of this repository contains the officially supported HashiCorp Dockerfile to build the hashicorp/packer docker image. The `dev` docker image should be built for local dev and testing, while the production docker image, `release`, is built in CI and makes use of CI-built binaries. The `official` docker image is built using the official binaries from releases.hashicorp.com. ## Build @@ -17,14 +17,14 @@ development or release modes: This repository automatically builds containers for using the [`packer`](https://packer.io) command line program. It contains two distinct varieties of build, an `official` version, aka `light`, which just contains the binary. -It also contains a `dev` version, aka `full`, which compiles the binary from source +It also contains a `dev` version, aka `full`, which compiles the binary from source inside the container before exposing it for use. ##### `official` The `official` version of this container will copy the current stable version of the binary, taken from releases.hashicorp.com, into the container. It will also -set it for use as the default entrypoint. This will be the best option for most uses, +set it for use as the default entrypoint. This will be the best option for most uses, especially if you are just looking to run the binary from a container. This image is tagged as both `official` and `light`. The `latest` tag on DockerHub also points to this version. @@ -64,8 +64,8 @@ docker run \ ~> **Note**: packer init is available from Packer v1.7.0 and later -The command will mount the working directory (`pwd`) to `workspace`, which is the working directory (`-w`) inside the container. -Any plugin installed with `packer init` will be installed under the directory specified under the `PACKER_PLUGIN_PATH` environment variable. `PACKER_PLUGIN_PATH` must be set to a path inside the volume mount so that plugins can become available at `packer build`. +The command will mount the working directory (`pwd`) to `workspace`, which is the working directory (`-w`) inside the container. +Any plugin installed with `packer init` will be installed under the directory specified under the `PACKER_PLUGIN_PATH` environment variable. `PACKER_PLUGIN_PATH` must be set to a path inside the volume mount so that plugins can become available at `packer build`. Running `packer build` ```shell From 168e464ee455e91d952eca4a634b598a0c656c8d Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 3 Aug 2023 10:06:01 -0400 Subject: [PATCH 057/156] docker: add full image to docker README --- .release/docker/README.md | 43 +++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/.release/docker/README.md b/.release/docker/README.md index ac1181da263..f733efbeaf9 100644 --- a/.release/docker/README.md +++ b/.release/docker/README.md @@ -1,37 +1,46 @@ # Packer Docker Container -The root of this repository contains the officially supported HashiCorp Dockerfile to build the hashicorp/packer docker image. The `dev` docker image should be built for local dev and testing, while the production docker image, `release`, is built in CI and makes use of CI-built binaries. The `official` docker image is built using the official binaries from releases.hashicorp.com. +The root of this repository contains the officially supported HashiCorp Dockerfile to build the hashicorp/packer docker image. The `dev` docker image should be built for local dev and testing, while the production docker image, `release`, is built in CI and makes use of CI-built binaries. The `light` and `full` docker images are built using the official binaries from releases.hashicorp.com. ## Build -See the Makefile targets in the root of this repository for building Packer images in either -development or release modes: - - - `make docker-dev` - - `make docker-official` - - `make docker-multiarch-official` - - `make docker` +Refer to the Makefile of this repository, especially the `docker` and `docker-dev` targets to build a local version of the dev image based on the sources available. ### Usage This repository automatically builds containers for using the -[`packer`](https://packer.io) command line program. It contains two distinct -varieties of build, an `official` version, aka `light`, which just contains the binary. -It also contains a `dev` version, aka `full`, which compiles the binary from source +[`packer`](https://developer.hashicorp.com/packer) command line program. It contains three distinct +varieties of build: a `light` version, which just contains the binary, +a `full` build, which contains the Packer binary with pre-installed plugins, +and a `dev` version, which compiles the binary from source inside the container before exposing it for use. -##### `official` +##### `light` -The `official` version of this container will copy the current stable version of +The `light` version of this container will copy the current stable version of the binary, taken from releases.hashicorp.com, into the container. It will also set it for use as the default entrypoint. This will be the best option for most uses, -especially if you are just looking to run the binary from a container. This image -is tagged as both `official` and `light`. +especially if you are just looking to run the binary from a container. The `latest` tag on DockerHub also points to this version. You can use this version with the following: ```shell -docker run hashicorp/packer:official +docker run hashicorp/packer:light +``` + +##### `full` + +The `full` version of the container builds upon `light` and pre-installs +the plugins officially maintained by HashiCorp. + +You can use this version with the following: +```shell +docker run hashicorp/packer:full +``` + +You can view the list of pre-installed plugins with the following: +```shell +docker run hashicorp/packer:full plugins installed ``` ##### `dev` @@ -41,7 +50,7 @@ the current ref of this [repository](https://github.com/hashicorp/packer). Using official `golang` image](https://hub.docker.com/_/golang/) as a base, this container will copy the source from the current branch, build the binary, and expose it for running. Because all build artifacts are included, it should be quite a bit larger than -the `official` image. This version of the container is most useful for development or +the `light` image. This version of the container is most useful for development or debugging. You can use this version with the following: From 9ccec0d4d501d02dd6f6e521c9b0d7efd3e07872 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 7 Aug 2023 20:54:19 -0400 Subject: [PATCH 058/156] Removed repetitive statement from HCP debug logs (#12552) * Remove repetitive log statement The log being removed is duplicated each time evalContext is called, which seems like an unneeded debug log. --- hcl2template/types.packer_config.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 84d1fe8de7d..003db57753c 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -123,8 +123,6 @@ func (cfg *PackerConfig) EvalContext(ctx BlockContext, variables map[string]cty. iterID, ok := cfg.HCPVars["iterationID"] if ok { - log.Printf("iterationID set: %q", iterID) - ectx.Variables[packerAccessor] = cty.ObjectVal(map[string]cty.Value{ "version": cty.StringVal(cfg.CorePackerVersionString), "iterationID": iterID, From 4d0a51c1892ea91f5eb2d5f56fabe66d729b31d2 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 8 Aug 2023 09:24:53 -0400 Subject: [PATCH 059/156] go.mod: bump golang.org/x/net to v0.13.0 The version of the golang.org/x/net we used (v0.8.0), is vulnerable to a rendering issue, potentially escaping text that should not be, which can enable other attacks then. Packer itself is not vulnerable to the CVE as we don't render web pages, but security checks do point it as an issue, so we fix it by updating the dependencies. CVE refrerence: GO-2023-1988 --- go.mod | 10 +++++----- go.sum | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index fa48d7d58da..ab2d8edd000 100644 --- a/go.mod +++ b/go.mod @@ -45,14 +45,14 @@ require ( github.com/ulikunitz/xz v0.5.10 github.com/zclconf/go-cty v1.10.0 github.com/zclconf/go-cty-yaml v1.0.1 - golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect + golang.org/x/crypto v0.11.0 // indirect golang.org/x/mod v0.8.0 - golang.org/x/net v0.8.0 + golang.org/x/net v0.13.0 golang.org/x/oauth2 v0.1.0 golang.org/x/sync v0.1.0 - golang.org/x/sys v0.7.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/tools v0.6.0 google.golang.org/api v0.101.0 // indirect google.golang.org/grpc v1.50.1 diff --git a/go.sum b/go.sum index 96c6e63f953..81a0347bf5c 100644 --- a/go.sum +++ b/go.sum @@ -793,8 +793,9 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= @@ -842,8 +843,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= @@ -903,21 +904,22 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= From 19055df3ec612ab556aa48e8eac2cb2d401fbab5 Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:53:29 -0700 Subject: [PATCH 060/156] [COMPLIANCE] License changes (#12568) * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at https://hashi.co/license-faq, and details of the license at www.hashicorp.com/bsl. * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/labeler-issue-triage.yml | 2 +- .golangci.yml | 2 +- .release/ci.hcl | 2 +- .release/release-metadata.hcl | 2 +- .release/security-scan.hcl | 2 +- Dockerfile | 2 +- LICENSE | 436 +++--------------- acctest/plugin/bundled_plugin_test.go | 2 +- acctest/plugin/component_acc_test.go | 2 +- acctest/plugin/plugin_acc_test.go | 2 +- acctest/testing.go | 2 +- acctest/testing_test.go | 2 +- background_check.go | 2 +- background_check_openbsd.go | 2 +- builder/file/artifact.go | 2 +- builder/file/artifact_test.go | 2 +- builder/file/builder.go | 2 +- builder/file/builder_test.go | 2 +- builder/file/config.go | 2 +- builder/file/config_test.go | 2 +- builder/file/version/version.go | 2 +- builder/null/artifact_export.go | 2 +- builder/null/artifact_export_test.go | 2 +- builder/null/builder.go | 2 +- builder/null/builder_test.go | 2 +- builder/null/config.go | 2 +- builder/null/config_test.go | 2 +- builder/null/ssh.go | 2 +- builder/null/version/version.go | 2 +- checkpoint.go | 2 +- cmd/generate-fixer-deprecations/main.go | 2 +- cmd/ssh-keygen/main.go | 2 +- command/build.go | 2 +- command/build_cancellation_test.go | 2 +- command/build_cleanup_script_test.go | 2 +- command/build_parallel_test.go | 2 +- command/build_test.go | 2 +- command/build_timeout_test.go | 2 +- command/build_windows_test.go | 2 +- command/cli.go | 2 +- command/command_test.go | 2 +- command/config_file_unix.go | 2 +- command/config_file_windows.go | 2 +- command/console.go | 2 +- command/console_test.go | 2 +- command/enumflag/flag.go | 2 +- command/exec_test.go | 2 +- command/fix.go | 2 +- command/fix_test.go | 2 +- command/flag-kv/flag.go | 2 +- command/flag-kv/flag_json.go | 2 +- command/flag-kv/flag_json_test.go | 2 +- command/flag-kv/flag_strings.go | 2 +- command/flag-kv/flag_strings_test.go | 2 +- command/flag-kv/flag_test.go | 2 +- command/flag-slice/flag.go | 2 +- command/flag-slice/flag_test.go | 2 +- command/fmt.go | 2 +- command/fmt_test.go | 2 +- command/hcl2_upgrade.go | 2 +- command/hcl2_upgrade_test.go | 2 +- command/init.go | 2 +- command/init_test.go | 2 +- command/inspect.go | 2 +- command/inspect_test.go | 2 +- command/meta.go | 2 +- command/plugins.go | 2 +- command/plugins_install.go | 2 +- command/plugins_install_test.go | 2 +- command/plugins_installed.go | 2 +- command/plugins_remove.go | 2 +- command/plugins_remove_test.go | 2 +- command/plugins_required.go | 2 +- command/signal.go | 2 +- command/test_utils.go | 2 +- command/utils.go | 2 +- command/utils_test.go | 2 +- command/validate.go | 2 +- command/validate_test.go | 2 +- command/vendored_plugins.go | 2 +- command/version.go | 2 +- command/version_test.go | 2 +- commands.go | 2 +- config.go | 2 +- config_test.go | 2 +- datasource/hcp-packer-image/data.go | 2 +- datasource/hcp-packer-iteration/data.go | 2 +- .../hcp-packer-iteration/data_acc_test.go | 2 +- datasource/http/data.go | 2 +- datasource/http/data_acc_test.go | 2 +- datasource/null/data.go | 2 +- fix/fixer.go | 2 +- fix/fixer_amazon_enhanced_networking.go | 2 +- fix/fixer_amazon_enhanced_networking_test.go | 2 +- fix/fixer_amazon_private_ip.go | 2 +- fix/fixer_amazon_private_ip_test.go | 2 +- fix/fixer_amazon_shutdown_behavior.go | 2 +- fix/fixer_amazon_shutdown_behavior_test.go | 2 +- fix/fixer_amazon_spot_price_product.go | 2 +- ...r_amazon_temporary_security_group_cidrs.go | 2 +- ...zon_temporary_security_group_cidrs_test.go | 2 +- fix/fixer_azure_exclude_from_latest.go | 2 +- fix/fixer_azure_exclude_from_latest_test.go | 2 +- fix/fixer_clean_image_name.go | 2 +- fix/fixer_clean_image_name_test.go | 2 +- fix/fixer_comm_config.go | 2 +- fix/fixer_comm_config_test.go | 2 +- fix/fixer_createtime.go | 2 +- fix/fixer_createtime_test.go | 2 +- fix/fixer_docker_email.go | 2 +- fix/fixer_galaxy_command.go | 2 +- fix/fixer_galaxy_command_test.go | 2 +- fix/fixer_hyperv_cpu_and_ram_naming.go | 2 +- fix/fixer_hyperv_deprecations.go | 2 +- fix/fixer_hyperv_deprecations_test.go | 2 +- fix/fixer_hyperv_vmxc_typo.go | 2 +- fix/fixer_hyperv_vmxc_typo_test.go | 2 +- fix/fixer_iso_checksum_type_and_url.go | 2 +- fix/fixer_iso_checksum_type_and_url_test.go | 2 +- fix/fixer_iso_md5.go | 2 +- fix/fixer_iso_md5_test.go | 2 +- fix/fixer_parallels_deprecations.go | 2 +- fix/fixer_parallels_deprecations_test.go | 2 +- fix/fixer_parallels_headless.go | 2 +- fix/fixer_parallels_headless_test.go | 2 +- fix/fixer_powershell_escapes.go | 2 +- fix/fixer_pp_docker_tag_tags.go | 2 +- fix/fixer_pp_docker_tag_tags_test.go | 2 +- fix/fixer_pp_manifest_filename.go | 2 +- fix/fixer_pp_manifest_filename_test.go | 2 +- fix/fixer_pp_vagrant_override.go | 2 +- fix/fixer_pp_vagrant_override_test.go | 2 +- fix/fixer_proxmox_type.go | 2 +- fix/fixer_proxmox_type_test.go | 2 +- fix/fixer_qemu_disk_size.go | 2 +- fix/fixer_qemu_disk_size_test.go | 2 +- fix/fixer_qemu_host_port.go | 2 +- fix/fixer_qemu_host_port_test.go | 2 +- fix/fixer_scaleway_access_key.go | 2 +- fix/fixer_scaleway_access_key_test.go | 2 +- fix/fixer_ssh_timeout.go | 2 +- fix/fixer_ssh_timeout_test.go | 2 +- fix/fixer_sshdisableagent.go | 2 +- fix/fixer_sshdisableagent_test.go | 2 +- fix/fixer_sshkeypath.go | 2 +- fix/fixer_sshkeypath_test.go | 2 +- fix/fixer_test.go | 2 +- fix/fixer_virtualbox_gaattach.go | 2 +- fix/fixer_virtualbox_gaattach_test.go | 2 +- fix/fixer_virtualbox_rename.go | 2 +- fix/fixer_virtualbox_rename_test.go | 2 +- fix/fixer_vmware_compaction.go | 2 +- fix/fixer_vmware_compaction_test.go | 2 +- fix/fixer_vmware_rename.go | 2 +- fix/fixer_vmware_rename_test.go | 2 +- fix/fixer_vsphere_network_storage.go | 2 +- fix/fixer_vsphere_network_storage_test.go | 2 +- fix/helpers.go | 2 +- hcl2template/addrs/doc.go | 2 +- hcl2template/addrs/input_variable.go | 2 +- hcl2template/addrs/parse_ref.go | 2 +- hcl2template/addrs/plugin.go | 2 +- hcl2template/addrs/plugin_test.go | 2 +- hcl2template/addrs/referenceable.go | 2 +- hcl2template/common_test.go | 2 +- hcl2template/components.go | 2 +- hcl2template/decode.go | 2 +- hcl2template/docs.go | 2 +- hcl2template/formatter.go | 2 +- hcl2template/formatter_test.go | 2 +- hcl2template/function/Consul.go | 2 +- hcl2template/function/aws_secretetkey.go | 2 +- hcl2template/function/datetime.go | 2 +- hcl2template/function/datetime_test.go | 2 +- hcl2template/function/env.go | 2 +- hcl2template/function/index.go | 2 +- hcl2template/function/index_test.go | 2 +- hcl2template/function/length.go | 2 +- hcl2template/function/length_test.go | 2 +- hcl2template/function/templatefile.go | 2 +- hcl2template/function/templatefile_test.go | 2 +- hcl2template/function/vault.go | 2 +- hcl2template/functions.go | 2 +- hcl2template/internal/mock.go | 2 +- hcl2template/parser.go | 2 +- hcl2template/plugin.go | 2 +- hcl2template/repl/format.go | 2 +- hcl2template/repl/repl.go | 2 +- hcl2template/shim/mock.go | 2 +- hcl2template/shim/values.go | 2 +- hcl2template/shim/values_test.go | 2 +- hcl2template/types.build.from.go | 2 +- hcl2template/types.build.go | 2 +- .../types.build.hcp_packer_registry.go | 2 +- .../types.build.hcp_packer_registry_test.go | 2 +- hcl2template/types.build.post-processor.go | 2 +- hcl2template/types.build.provisioners.go | 2 +- hcl2template/types.build.provisioners_test.go | 2 +- hcl2template/types.build_test.go | 2 +- hcl2template/types.datasource.go | 2 +- hcl2template/types.datasource_test.go | 2 +- hcl2template/types.hcl_post-processor.go | 2 +- hcl2template/types.hcl_provisioner.go | 2 +- hcl2template/types.hcl_ref.go | 2 +- hcl2template/types.packer_config.go | 2 +- hcl2template/types.packer_config_test.go | 2 +- hcl2template/types.required_plugins.go | 2 +- hcl2template/types.required_plugins_test.go | 2 +- hcl2template/types.source.go | 2 +- hcl2template/types.source_test.go | 2 +- hcl2template/types.variables.go | 2 +- hcl2template/types.variables_test.go | 2 +- hcl2template/utils.go | 2 +- hcl2template/version.go | 2 +- hcl2template/version_required.go | 2 +- helper/wrappedreadline/wrappedreadline.go | 2 +- .../wrappedreadline_solaris.go | 2 +- .../wrappedreadline/wrappedreadline_unix.go | 2 +- .../wrappedreadline_windows.go | 2 +- helper/wrappedstreams/streams.go | 2 +- helper/wrappedstreams/streams_other.go | 2 +- helper/wrappedstreams/streams_windows.go | 2 +- internal/hcp/api/client.go | 2 +- internal/hcp/api/client_test.go | 2 +- internal/hcp/api/errors.go | 2 +- internal/hcp/api/mock_service.go | 2 +- internal/hcp/api/service.go | 2 +- internal/hcp/env/env.go | 2 +- internal/hcp/env/env_test.go | 2 +- internal/hcp/env/variables.go | 2 +- internal/hcp/registry/artifact.go | 2 +- internal/hcp/registry/errors.go | 2 +- internal/hcp/registry/hcl.go | 2 +- internal/hcp/registry/hcp.go | 2 +- internal/hcp/registry/json.go | 2 +- internal/hcp/registry/null_registry.go | 2 +- internal/hcp/registry/registry.go | 2 +- internal/hcp/registry/types.bucket.go | 2 +- .../hcp/registry/types.bucket_service_test.go | 2 +- internal/hcp/registry/types.bucket_test.go | 2 +- internal/hcp/registry/types.builds.go | 2 +- internal/hcp/registry/types.iterations.go | 2 +- .../hcp/registry/types.iterations_test.go | 2 +- log.go | 2 +- main.go | 2 +- main_test.go | 2 +- packer/build.go | 2 +- packer/build_test.go | 2 +- packer/builder_test.go | 2 +- packer/client_test.go | 2 +- packer/cmd_builder.go | 2 +- packer/cmd_builder_test.go | 2 +- packer/cmd_datasource.go | 2 +- packer/cmd_datasource_test.go | 2 +- packer/cmd_hook.go | 2 +- packer/cmd_hook_test.go | 2 +- packer/cmd_post_processor.go | 2 +- packer/cmd_post_processor_test.go | 2 +- packer/cmd_provisioner.go | 2 +- packer/cmd_provisioner_test.go | 2 +- packer/core.go | 2 +- packer/core_test.go | 2 +- packer/maps.go | 2 +- packer/packer_test.go | 2 +- packer/plugin-getter/checksum.go | 2 +- packer/plugin-getter/docs.go | 2 +- packer/plugin-getter/github/docs.go | 2 +- packer/plugin-getter/github/getter.go | 2 +- packer/plugin-getter/plugins.go | 2 +- packer/plugin-getter/plugins_test.go | 2 +- packer/plugin.go | 2 +- packer/plugin_client.go | 2 +- packer/plugin_discover_test.go | 2 +- packer/plugin_folders.go | 2 +- packer/plugin_test.go | 2 +- packer/post_processor_mock.go | 2 +- packer/progressbar.go | 2 +- packer/progressbar_solaris.go | 2 +- packer/progressbar_test.go | 2 +- packer/provisioner.go | 2 +- packer/provisioner_test.go | 2 +- packer/provisioner_timeout.go | 2 +- packer/run_interfaces.go | 2 +- packer/telemetry.go | 2 +- packer/telemetry_test.go | 2 +- packer/testing.go | 2 +- packer/ui.go | 2 +- packer/ui_test.go | 2 +- panic.go | 2 +- post-processor/artifice/artifact.go | 2 +- post-processor/artifice/post-processor.go | 2 +- post-processor/artifice/version/version.go | 2 +- post-processor/checksum/artifact.go | 2 +- post-processor/checksum/post-processor.go | 2 +- .../checksum/post-processor_test.go | 2 +- post-processor/checksum/version/version.go | 2 +- post-processor/compress/artifact.go | 2 +- post-processor/compress/artifact_test.go | 2 +- post-processor/compress/benchmark.go | 2 +- post-processor/compress/post-processor.go | 2 +- .../compress/post-processor_test.go | 2 +- post-processor/compress/tar_fix.go | 2 +- post-processor/compress/tar_fix_go110.go | 2 +- post-processor/compress/version/version.go | 2 +- post-processor/manifest/artifact.go | 2 +- post-processor/manifest/post-processor.go | 2 +- post-processor/manifest/version/version.go | 2 +- post-processor/shell-local/post-processor.go | 2 +- .../shell-local/post-processor_test.go | 2 +- post-processor/shell-local/version/version.go | 2 +- provisioner/breakpoint/provisioner.go | 2 +- provisioner/breakpoint/version/version.go | 2 +- provisioner/file/provisioner.go | 2 +- provisioner/file/provisioner_test.go | 2 +- provisioner/file/version/version.go | 2 +- provisioner/powershell/execution_policy.go | 2 +- .../powershell/execution_policy_test.go | 2 +- provisioner/powershell/provisioner.go | 2 +- .../powershell/provisioner_acc_test.go | 2 +- provisioner/powershell/provisioner_test.go | 2 +- provisioner/powershell/version/version.go | 2 +- provisioner/shell-local/provisioner.go | 2 +- .../shell-local/provisioner_acc_test.go | 2 +- provisioner/shell-local/provisioner_test.go | 2 +- provisioner/shell-local/version/version.go | 2 +- provisioner/shell/provisioner.go | 2 +- provisioner/shell/provisioner_acc_test.go | 2 +- provisioner/shell/provisioner_test.go | 2 +- provisioner/shell/unix_reader.go | 2 +- provisioner/shell/unix_reader_test.go | 2 +- provisioner/shell/version/version.go | 2 +- provisioner/sleep/provisioner.go | 2 +- provisioner/sleep/provisioner_test.go | 2 +- provisioner/sleep/version/version.go | 2 +- provisioner/windows-restart/provisioner.go | 2 +- .../windows-restart/provisioner_test.go | 2 +- .../windows-restart/version/version.go | 2 +- provisioner/windows-shell/provisioner.go | 2 +- provisioner/windows-shell/provisioner_test.go | 2 +- provisioner/windows-shell/version/version.go | 2 +- scripts/build.ps1 | 2 +- scripts/build.sh | 2 +- scripts/codesign_example.sh | 2 +- scripts/dist.sh | 2 +- scripts/generate-plugins.go | 2 +- scripts/off_gopath.sh | 2 +- scripts/prepare_changelog.sh | 2 +- scripts/sign.sh | 2 +- scripts/sort-md-list.py | 2 +- scripts/upgrade_plugins.sh | 2 +- scripts/vagrant-freebsd-priv-config.sh | 2 +- scripts/vagrant-freebsd-unpriv-bootstrap.sh | 2 +- scripts/vagrant-linux-priv-config.sh | 2 +- scripts/vagrant-linux-priv-go.sh | 2 +- scripts/vagrant-linux-unpriv-bootstrap.sh | 2 +- tty.go | 2 +- tty_solaris.go | 2 +- version/version.go | 2 +- 359 files changed, 419 insertions(+), 733 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index eae8012b936..b79897d5954 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 blank_issues_enabled: false contact_links: diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index 1737a33b92c..6d9ef6d547c 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 bug: - 'panic:' diff --git a/.golangci.yml b/.golangci.yml index ccd990c0040..656b0373ac5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 issues: # List of regexps of issue texts to exclude, empty list by default. diff --git a/.release/ci.hcl b/.release/ci.hcl index 6ca7eb0de23..14dab1591d9 100644 --- a/.release/ci.hcl +++ b/.release/ci.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 schema = "1" diff --git a/.release/release-metadata.hcl b/.release/release-metadata.hcl index 0fb2456679e..05d0b9f3a81 100644 --- a/.release/release-metadata.hcl +++ b/.release/release-metadata.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 url_docker_registry_dockerhub = "https://hub.docker.com/r/hashicorp/packer" url_docker_registry_ecr = "https://gallery.ecr.aws/hashicorp/packer" diff --git a/.release/security-scan.hcl b/.release/security-scan.hcl index 7d3258126bc..12ef1d53388 100644 --- a/.release/security-scan.hcl +++ b/.release/security-scan.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 container { dependencies = false diff --git a/Dockerfile b/Dockerfile index 1b5ae54e942..12c38fde6af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 # ======================================================================== # diff --git a/LICENSE b/LICENSE index c96665ef71f..2ecf202e305 100644 --- a/LICENSE +++ b/LICENSE @@ -1,375 +1,61 @@ -Copyright (c) 2013 HashiCorp, Inc. - -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. +License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved. +“Business Source License” is a trademark of MariaDB Corporation Ab. + +Parameters + +Licensor: HashiCorp, Inc. +Licensed Work: The Licensed Work is (c) 2023 HashiCorp, Inc. +Additional Use Grant: You may make production use of the Licensed Work, + provided such use does not include offering the Licensed Work + to third parties on a hosted or embedded basis which is + competitive with HashiCorp's products. +Change Date: Four years from the date the Licensed Work is published. +Change License: MPL 2.0 + +For information about alternative licensing arrangements for the Licensed Work, +please contact licensing@hashicorp.com. + +Notice + +Business Source License 1.1 + +Terms + +The Licensor hereby grants you the right to copy, modify, create derivative +works, redistribute, and make non-production use of the Licensed Work. The +Licensor may make an Additional Use Grant, above, permitting limited production use. + +Effective on the Change Date, or the fourth anniversary of the first publicly +available distribution of a specific version of the Licensed Work under this +License, whichever comes first, the Licensor hereby grants you rights under +the terms of the Change License, and the rights granted in the paragraph +above terminate. + +If your use of the Licensed Work does not comply with the requirements +currently in effect as described in this License, you must purchase a +commercial license from the Licensor, its affiliated entities, or authorized +resellers, or you must refrain from using the Licensed Work. + +All copies of the original and modified Licensed Work, and derivative works +of the Licensed Work, are subject to this License. This License applies +separately for each version of the Licensed Work and the Change Date may vary +for each version of the Licensed Work released by Licensor. + +You must conspicuously display this License on each original or modified copy +of the Licensed Work. If you receive the Licensed Work in original or +modified form from a third party, the terms and conditions set forth in this +License apply to your use of that work. + +Any use of the Licensed Work in violation of this License will automatically +terminate your rights under this License for the current and all other +versions of the Licensed Work. + +This License does not grant you any right in any trademark or logo of +Licensor or its affiliates (provided that you may use a trademark or logo of +Licensor as expressly required by this License). + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON +AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND +TITLE. diff --git a/acctest/plugin/bundled_plugin_test.go b/acctest/plugin/bundled_plugin_test.go index 9f21dfac626..c6652610955 100644 --- a/acctest/plugin/bundled_plugin_test.go +++ b/acctest/plugin/bundled_plugin_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package plugin diff --git a/acctest/plugin/component_acc_test.go b/acctest/plugin/component_acc_test.go index ff77adf636f..110d8d3765a 100644 --- a/acctest/plugin/component_acc_test.go +++ b/acctest/plugin/component_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // component_acc_test.go should contain acceptance tests for plugin components // to make sure all component types can be discovered and started. diff --git a/acctest/plugin/plugin_acc_test.go b/acctest/plugin/plugin_acc_test.go index 9e69afe3774..137fb394db4 100644 --- a/acctest/plugin/plugin_acc_test.go +++ b/acctest/plugin/plugin_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // plugin_acc_test.go should contain acceptance tests for features related to // installing, discovering and running plugins. diff --git a/acctest/testing.go b/acctest/testing.go index e716ec97b39..dbd877fb3d3 100644 --- a/acctest/testing.go +++ b/acctest/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package acctest diff --git a/acctest/testing_test.go b/acctest/testing_test.go index 71247d4cef7..85364bd1154 100644 --- a/acctest/testing_test.go +++ b/acctest/testing_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package acctest diff --git a/background_check.go b/background_check.go index 3eaf7ee2348..30a0a65e2d5 100644 --- a/background_check.go +++ b/background_check.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build !openbsd // +build !openbsd diff --git a/background_check_openbsd.go b/background_check_openbsd.go index ff2ef4b0ef2..0fc5574ba9c 100644 --- a/background_check_openbsd.go +++ b/background_check_openbsd.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/builder/file/artifact.go b/builder/file/artifact.go index 9b9ed8ef949..4c33f6d45a3 100644 --- a/builder/file/artifact.go +++ b/builder/file/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package file diff --git a/builder/file/artifact_test.go b/builder/file/artifact_test.go index ea799e12f5f..02df6c2ae4e 100644 --- a/builder/file/artifact_test.go +++ b/builder/file/artifact_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package file diff --git a/builder/file/builder.go b/builder/file/builder.go index e6df9b54008..e9d9d8f9ebd 100644 --- a/builder/file/builder.go +++ b/builder/file/builder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package file diff --git a/builder/file/builder_test.go b/builder/file/builder_test.go index dfa87277e2b..80fc326bdf4 100644 --- a/builder/file/builder_test.go +++ b/builder/file/builder_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package file diff --git a/builder/file/config.go b/builder/file/config.go index 017355ee6c7..244490a36da 100644 --- a/builder/file/config.go +++ b/builder/file/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/builder/file/config_test.go b/builder/file/config_test.go index 60d3553a1f9..b6692495b9d 100644 --- a/builder/file/config_test.go +++ b/builder/file/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package file diff --git a/builder/file/version/version.go b/builder/file/version/version.go index 3cb6b9ec19e..2136829ae88 100644 --- a/builder/file/version/version.go +++ b/builder/file/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/builder/null/artifact_export.go b/builder/null/artifact_export.go index ae6e46f2756..8b12610f81b 100644 --- a/builder/null/artifact_export.go +++ b/builder/null/artifact_export.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package null diff --git a/builder/null/artifact_export_test.go b/builder/null/artifact_export_test.go index ffa668865ec..265b8d36781 100644 --- a/builder/null/artifact_export_test.go +++ b/builder/null/artifact_export_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package null diff --git a/builder/null/builder.go b/builder/null/builder.go index 9b660bd24f9..a9a53dbd7e8 100644 --- a/builder/null/builder.go +++ b/builder/null/builder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package null diff --git a/builder/null/builder_test.go b/builder/null/builder_test.go index b50d1484ff9..fdb52031d7a 100644 --- a/builder/null/builder_test.go +++ b/builder/null/builder_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package null diff --git a/builder/null/config.go b/builder/null/config.go index b240d57d98d..24ee61ed6fb 100644 --- a/builder/null/config.go +++ b/builder/null/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/builder/null/config_test.go b/builder/null/config_test.go index 1123d470e09..67d35f66972 100644 --- a/builder/null/config_test.go +++ b/builder/null/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package null diff --git a/builder/null/ssh.go b/builder/null/ssh.go index f79bdd1eed4..fbffbb13a3c 100644 --- a/builder/null/ssh.go +++ b/builder/null/ssh.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package null diff --git a/builder/null/version/version.go b/builder/null/version/version.go index f3b8cb444e1..27e53e312d1 100644 --- a/builder/null/version/version.go +++ b/builder/null/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/checkpoint.go b/checkpoint.go index 5ca534ea8d4..380cdd6bf29 100644 --- a/checkpoint.go +++ b/checkpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/cmd/generate-fixer-deprecations/main.go b/cmd/generate-fixer-deprecations/main.go index a3e76547428..4316a1605a0 100644 --- a/cmd/generate-fixer-deprecations/main.go +++ b/cmd/generate-fixer-deprecations/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/cmd/ssh-keygen/main.go b/cmd/ssh-keygen/main.go index a15797ea811..f47eca5791f 100644 --- a/cmd/ssh-keygen/main.go +++ b/cmd/ssh-keygen/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/command/build.go b/command/build.go index 842938adcb9..c77687c3586 100644 --- a/command/build.go +++ b/command/build.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/build_cancellation_test.go b/command/build_cancellation_test.go index 348b1d9180e..0ada639074a 100644 --- a/command/build_cancellation_test.go +++ b/command/build_cancellation_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/build_cleanup_script_test.go b/command/build_cleanup_script_test.go index 82f7fdd94e4..35639a4f4a9 100644 --- a/command/build_cleanup_script_test.go +++ b/command/build_cleanup_script_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/build_parallel_test.go b/command/build_parallel_test.go index 959134fd539..4758505241b 100644 --- a/command/build_parallel_test.go +++ b/command/build_parallel_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/build_test.go b/command/build_test.go index 8dac9b8e0aa..00685e98dc7 100644 --- a/command/build_test.go +++ b/command/build_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/build_timeout_test.go b/command/build_timeout_test.go index 9896894ec2b..d97485b3490 100644 --- a/command/build_timeout_test.go +++ b/command/build_timeout_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/build_windows_test.go b/command/build_windows_test.go index 5c99cd95786..b18f4e3153a 100644 --- a/command/build_windows_test.go +++ b/command/build_windows_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/cli.go b/command/cli.go index de47a735c22..4ad80440f0e 100644 --- a/command/cli.go +++ b/command/cli.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/command_test.go b/command/command_test.go index 4666a4109b8..fcbec5fb0a7 100644 --- a/command/command_test.go +++ b/command/command_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/config_file_unix.go b/command/config_file_unix.go index 31a8db0ee44..ec3932f9e0b 100644 --- a/command/config_file_unix.go +++ b/command/config_file_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris diff --git a/command/config_file_windows.go b/command/config_file_windows.go index 52cdf420c7c..ede0a618687 100644 --- a/command/config_file_windows.go +++ b/command/config_file_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build windows // +build windows diff --git a/command/console.go b/command/console.go index 54281fdd6ed..f942ec4bd4f 100644 --- a/command/console.go +++ b/command/console.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/console_test.go b/command/console_test.go index b8c4989ff99..7b4bbc7d7b8 100644 --- a/command/console_test.go +++ b/command/console_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/enumflag/flag.go b/command/enumflag/flag.go index cbb58769190..c50e70b0714 100644 --- a/command/enumflag/flag.go +++ b/command/enumflag/flag.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package enumflag diff --git a/command/exec_test.go b/command/exec_test.go index cfdbda66c3a..c4bf24ab157 100644 --- a/command/exec_test.go +++ b/command/exec_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/fix.go b/command/fix.go index 893c788ef8d..708be59717d 100644 --- a/command/fix.go +++ b/command/fix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/fix_test.go b/command/fix_test.go index d092a8091c4..1c916b56b2a 100644 --- a/command/fix_test.go +++ b/command/fix_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/flag-kv/flag.go b/command/flag-kv/flag.go index 96cda3120ce..4361545ab2f 100644 --- a/command/flag-kv/flag.go +++ b/command/flag-kv/flag.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package kvflag diff --git a/command/flag-kv/flag_json.go b/command/flag-kv/flag_json.go index 25d34ef5de5..290bb4aa837 100644 --- a/command/flag-kv/flag_json.go +++ b/command/flag-kv/flag_json.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package kvflag diff --git a/command/flag-kv/flag_json_test.go b/command/flag-kv/flag_json_test.go index ab8a67e0ba3..d22f3545fd5 100644 --- a/command/flag-kv/flag_json_test.go +++ b/command/flag-kv/flag_json_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package kvflag diff --git a/command/flag-kv/flag_strings.go b/command/flag-kv/flag_strings.go index d639bde6abb..f99122ec971 100644 --- a/command/flag-kv/flag_strings.go +++ b/command/flag-kv/flag_strings.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package kvflag diff --git a/command/flag-kv/flag_strings_test.go b/command/flag-kv/flag_strings_test.go index 070e95c0d48..721265d1e52 100644 --- a/command/flag-kv/flag_strings_test.go +++ b/command/flag-kv/flag_strings_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package kvflag diff --git a/command/flag-kv/flag_test.go b/command/flag-kv/flag_test.go index 28644119578..5aed4ef33db 100644 --- a/command/flag-kv/flag_test.go +++ b/command/flag-kv/flag_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package kvflag diff --git a/command/flag-slice/flag.go b/command/flag-slice/flag.go index b75580ec227..7f8b9db269c 100644 --- a/command/flag-slice/flag.go +++ b/command/flag-slice/flag.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package sliceflag diff --git a/command/flag-slice/flag_test.go b/command/flag-slice/flag_test.go index d70b270b53b..fd225889284 100644 --- a/command/flag-slice/flag_test.go +++ b/command/flag-slice/flag_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package sliceflag diff --git a/command/fmt.go b/command/fmt.go index 9cfaa46b8d4..095a6fc8c69 100644 --- a/command/fmt.go +++ b/command/fmt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/fmt_test.go b/command/fmt_test.go index b642cdef5ad..8fd058b379b 100644 --- a/command/fmt_test.go +++ b/command/fmt_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index 08b7d2ad745..7802d409875 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/hcl2_upgrade_test.go b/command/hcl2_upgrade_test.go index afa8575aa8e..f0ffc7676f2 100644 --- a/command/hcl2_upgrade_test.go +++ b/command/hcl2_upgrade_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/init.go b/command/init.go index b95eb86992b..5a066d96276 100644 --- a/command/init.go +++ b/command/init.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/init_test.go b/command/init_test.go index 8a10cbb0c73..07246d50081 100644 --- a/command/init_test.go +++ b/command/init_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build amd64 && (darwin || windows || linux) diff --git a/command/inspect.go b/command/inspect.go index 827d61f70b1..7a77ab76bb8 100644 --- a/command/inspect.go +++ b/command/inspect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/inspect_test.go b/command/inspect_test.go index 0d87ee71a71..f417b4cdc09 100644 --- a/command/inspect_test.go +++ b/command/inspect_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/meta.go b/command/meta.go index fb3d9efb2a7..1989027499b 100644 --- a/command/meta.go +++ b/command/meta.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/plugins.go b/command/plugins.go index 0b415d8f5c0..6bc286dd19c 100644 --- a/command/plugins.go +++ b/command/plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/plugins_install.go b/command/plugins_install.go index d40bb46bd80..7082f134a8f 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/plugins_install_test.go b/command/plugins_install_test.go index 7f34cb5dddd..105b9b00067 100644 --- a/command/plugins_install_test.go +++ b/command/plugins_install_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build amd64 && (darwin || windows || linux) diff --git a/command/plugins_installed.go b/command/plugins_installed.go index 58b4381a985..114c25b55a9 100644 --- a/command/plugins_installed.go +++ b/command/plugins_installed.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/plugins_remove.go b/command/plugins_remove.go index 32d77749c08..ac8c0882b8f 100644 --- a/command/plugins_remove.go +++ b/command/plugins_remove.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/plugins_remove_test.go b/command/plugins_remove_test.go index 83b2463bc02..61273487632 100644 --- a/command/plugins_remove_test.go +++ b/command/plugins_remove_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build amd64 && (darwin || windows || linux) diff --git a/command/plugins_required.go b/command/plugins_required.go index d484322291c..04f86b3628c 100644 --- a/command/plugins_required.go +++ b/command/plugins_required.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/signal.go b/command/signal.go index 5980192baf4..a47ac58aa22 100644 --- a/command/signal.go +++ b/command/signal.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/test_utils.go b/command/test_utils.go index 41e02dbcb7b..852343085cc 100644 --- a/command/test_utils.go +++ b/command/test_utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/utils.go b/command/utils.go index 9fee02d419c..359a96b9726 100644 --- a/command/utils.go +++ b/command/utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/utils_test.go b/command/utils_test.go index 426ea653eea..6af1f2c4881 100644 --- a/command/utils_test.go +++ b/command/utils_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/validate.go b/command/validate.go index 2b7e2107b0d..60199bdbf71 100644 --- a/command/validate.go +++ b/command/validate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/validate_test.go b/command/validate_test.go index 5b51f378158..5b9da04d78b 100644 --- a/command/validate_test.go +++ b/command/validate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/vendored_plugins.go b/command/vendored_plugins.go index d6e5f836338..d412db98bf6 100644 --- a/command/vendored_plugins.go +++ b/command/vendored_plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/version.go b/command/version.go index 3a6db86d712..976221efed5 100644 --- a/command/version.go +++ b/command/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/command/version_test.go b/command/version_test.go index cd2b67e5c6d..60f97f4f38e 100644 --- a/command/version_test.go +++ b/command/version_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package command diff --git a/commands.go b/commands.go index 01e3bf56e73..9b2d3ebdf35 100644 --- a/commands.go +++ b/commands.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/config.go b/config.go index af679dd8e0b..6688d6a74a5 100644 --- a/config.go +++ b/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/config_test.go b/config_test.go index 772fea4fe3b..1a583a8c3a7 100644 --- a/config_test.go +++ b/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/datasource/hcp-packer-image/data.go b/datasource/hcp-packer-image/data.go index 3e473e145e4..aba7a6d19bf 100644 --- a/datasource/hcp-packer-image/data.go +++ b/datasource/hcp-packer-image/data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type DatasourceOutput,Config diff --git a/datasource/hcp-packer-iteration/data.go b/datasource/hcp-packer-iteration/data.go index 7a7be3e4979..ff0bbd46f34 100644 --- a/datasource/hcp-packer-iteration/data.go +++ b/datasource/hcp-packer-iteration/data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type DatasourceOutput,Config diff --git a/datasource/hcp-packer-iteration/data_acc_test.go b/datasource/hcp-packer-iteration/data_acc_test.go index bf91e870d7e..82e3b78e5f7 100644 --- a/datasource/hcp-packer-iteration/data_acc_test.go +++ b/datasource/hcp-packer-iteration/data_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcp_packer_iteration diff --git a/datasource/http/data.go b/datasource/http/data.go index ec7a1b3e55c..ef77adca2ba 100644 --- a/datasource/http/data.go +++ b/datasource/http/data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type DatasourceOutput,Config diff --git a/datasource/http/data_acc_test.go b/datasource/http/data_acc_test.go index ffad0219048..c5a92718e67 100644 --- a/datasource/http/data_acc_test.go +++ b/datasource/http/data_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package http diff --git a/datasource/null/data.go b/datasource/null/data.go index 308e06217d7..90c8064aefd 100644 --- a/datasource/null/data.go +++ b/datasource/null/data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type DatasourceOutput,Config diff --git a/fix/fixer.go b/fix/fixer.go index 3de4bc1f814..3fd30cacf11 100644 --- a/fix/fixer.go +++ b/fix/fixer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_enhanced_networking.go b/fix/fixer_amazon_enhanced_networking.go index 708d2f5bc30..f5c0aa15ed0 100644 --- a/fix/fixer_amazon_enhanced_networking.go +++ b/fix/fixer_amazon_enhanced_networking.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_enhanced_networking_test.go b/fix/fixer_amazon_enhanced_networking_test.go index 4abdcc5f4d1..c92293d96dd 100644 --- a/fix/fixer_amazon_enhanced_networking_test.go +++ b/fix/fixer_amazon_enhanced_networking_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_private_ip.go b/fix/fixer_amazon_private_ip.go index ee18770b40a..f2ca9a26948 100644 --- a/fix/fixer_amazon_private_ip.go +++ b/fix/fixer_amazon_private_ip.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_private_ip_test.go b/fix/fixer_amazon_private_ip_test.go index 554e2e7ee3b..7d78e396b7b 100644 --- a/fix/fixer_amazon_private_ip_test.go +++ b/fix/fixer_amazon_private_ip_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_shutdown_behavior.go b/fix/fixer_amazon_shutdown_behavior.go index c7e2db0d315..b779fc10766 100644 --- a/fix/fixer_amazon_shutdown_behavior.go +++ b/fix/fixer_amazon_shutdown_behavior.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_shutdown_behavior_test.go b/fix/fixer_amazon_shutdown_behavior_test.go index 87058ea9054..5af1f59c5cd 100644 --- a/fix/fixer_amazon_shutdown_behavior_test.go +++ b/fix/fixer_amazon_shutdown_behavior_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_spot_price_product.go b/fix/fixer_amazon_spot_price_product.go index b701e1d9f59..7c49afeb9ce 100644 --- a/fix/fixer_amazon_spot_price_product.go +++ b/fix/fixer_amazon_spot_price_product.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_temporary_security_group_cidrs.go b/fix/fixer_amazon_temporary_security_group_cidrs.go index ffd75eb364d..bd9a9b019b8 100644 --- a/fix/fixer_amazon_temporary_security_group_cidrs.go +++ b/fix/fixer_amazon_temporary_security_group_cidrs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_amazon_temporary_security_group_cidrs_test.go b/fix/fixer_amazon_temporary_security_group_cidrs_test.go index 2ed9f4bb261..28dac694904 100644 --- a/fix/fixer_amazon_temporary_security_group_cidrs_test.go +++ b/fix/fixer_amazon_temporary_security_group_cidrs_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_azure_exclude_from_latest.go b/fix/fixer_azure_exclude_from_latest.go index 210b59f46ac..b85f1da6d67 100644 --- a/fix/fixer_azure_exclude_from_latest.go +++ b/fix/fixer_azure_exclude_from_latest.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_azure_exclude_from_latest_test.go b/fix/fixer_azure_exclude_from_latest_test.go index a3cd70d538d..e7e16e9bde8 100644 --- a/fix/fixer_azure_exclude_from_latest_test.go +++ b/fix/fixer_azure_exclude_from_latest_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_clean_image_name.go b/fix/fixer_clean_image_name.go index 423d2e34035..981e2e36f41 100644 --- a/fix/fixer_clean_image_name.go +++ b/fix/fixer_clean_image_name.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_clean_image_name_test.go b/fix/fixer_clean_image_name_test.go index 385e6f113df..7a95ac2a0f1 100644 --- a/fix/fixer_clean_image_name_test.go +++ b/fix/fixer_clean_image_name_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_comm_config.go b/fix/fixer_comm_config.go index 6f2c49af8e7..3d02fcdac33 100644 --- a/fix/fixer_comm_config.go +++ b/fix/fixer_comm_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_comm_config_test.go b/fix/fixer_comm_config_test.go index 52beb052de1..c0e22bb7e06 100644 --- a/fix/fixer_comm_config_test.go +++ b/fix/fixer_comm_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_createtime.go b/fix/fixer_createtime.go index 0412c4d9afb..345ec750242 100644 --- a/fix/fixer_createtime.go +++ b/fix/fixer_createtime.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_createtime_test.go b/fix/fixer_createtime_test.go index a7350966812..9c78b525ac0 100644 --- a/fix/fixer_createtime_test.go +++ b/fix/fixer_createtime_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_docker_email.go b/fix/fixer_docker_email.go index 3a5883f2b9b..6a644210cef 100644 --- a/fix/fixer_docker_email.go +++ b/fix/fixer_docker_email.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_galaxy_command.go b/fix/fixer_galaxy_command.go index f5988d9bc27..df36558275b 100644 --- a/fix/fixer_galaxy_command.go +++ b/fix/fixer_galaxy_command.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_galaxy_command_test.go b/fix/fixer_galaxy_command_test.go index ee067b174fa..125039240c8 100644 --- a/fix/fixer_galaxy_command_test.go +++ b/fix/fixer_galaxy_command_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_hyperv_cpu_and_ram_naming.go b/fix/fixer_hyperv_cpu_and_ram_naming.go index 4983b5cb4fc..3c655bb2ecd 100644 --- a/fix/fixer_hyperv_cpu_and_ram_naming.go +++ b/fix/fixer_hyperv_cpu_and_ram_naming.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_hyperv_deprecations.go b/fix/fixer_hyperv_deprecations.go index 12714d9d71b..191a8f0d8df 100644 --- a/fix/fixer_hyperv_deprecations.go +++ b/fix/fixer_hyperv_deprecations.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_hyperv_deprecations_test.go b/fix/fixer_hyperv_deprecations_test.go index 00154e2b9a4..1f9672d42ed 100644 --- a/fix/fixer_hyperv_deprecations_test.go +++ b/fix/fixer_hyperv_deprecations_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_hyperv_vmxc_typo.go b/fix/fixer_hyperv_vmxc_typo.go index f9c5d63d969..c2c57fe8071 100644 --- a/fix/fixer_hyperv_vmxc_typo.go +++ b/fix/fixer_hyperv_vmxc_typo.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_hyperv_vmxc_typo_test.go b/fix/fixer_hyperv_vmxc_typo_test.go index 1f7ac625a0b..c88a1d40d8b 100644 --- a/fix/fixer_hyperv_vmxc_typo_test.go +++ b/fix/fixer_hyperv_vmxc_typo_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_iso_checksum_type_and_url.go b/fix/fixer_iso_checksum_type_and_url.go index fc50055ac7e..df61844fa61 100644 --- a/fix/fixer_iso_checksum_type_and_url.go +++ b/fix/fixer_iso_checksum_type_and_url.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_iso_checksum_type_and_url_test.go b/fix/fixer_iso_checksum_type_and_url_test.go index f3492dc50cb..556ab966391 100644 --- a/fix/fixer_iso_checksum_type_and_url_test.go +++ b/fix/fixer_iso_checksum_type_and_url_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_iso_md5.go b/fix/fixer_iso_md5.go index 074a0b2bab3..3d6acb86aa5 100644 --- a/fix/fixer_iso_md5.go +++ b/fix/fixer_iso_md5.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_iso_md5_test.go b/fix/fixer_iso_md5_test.go index fc396507977..106fff6096c 100644 --- a/fix/fixer_iso_md5_test.go +++ b/fix/fixer_iso_md5_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_parallels_deprecations.go b/fix/fixer_parallels_deprecations.go index 36ad9a708eb..b287f58f003 100644 --- a/fix/fixer_parallels_deprecations.go +++ b/fix/fixer_parallels_deprecations.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_parallels_deprecations_test.go b/fix/fixer_parallels_deprecations_test.go index a5fd425385d..584129693d5 100644 --- a/fix/fixer_parallels_deprecations_test.go +++ b/fix/fixer_parallels_deprecations_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_parallels_headless.go b/fix/fixer_parallels_headless.go index 164deff3ea0..cd645df1181 100644 --- a/fix/fixer_parallels_headless.go +++ b/fix/fixer_parallels_headless.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_parallels_headless_test.go b/fix/fixer_parallels_headless_test.go index bc3efbcc0e7..62f5654bb27 100644 --- a/fix/fixer_parallels_headless_test.go +++ b/fix/fixer_parallels_headless_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_powershell_escapes.go b/fix/fixer_powershell_escapes.go index d33d046d628..a96bc35fd99 100644 --- a/fix/fixer_powershell_escapes.go +++ b/fix/fixer_powershell_escapes.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_pp_docker_tag_tags.go b/fix/fixer_pp_docker_tag_tags.go index 49e33ebee91..e21a9c26dfb 100644 --- a/fix/fixer_pp_docker_tag_tags.go +++ b/fix/fixer_pp_docker_tag_tags.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_pp_docker_tag_tags_test.go b/fix/fixer_pp_docker_tag_tags_test.go index 908c0768efb..97b600bbc3a 100644 --- a/fix/fixer_pp_docker_tag_tags_test.go +++ b/fix/fixer_pp_docker_tag_tags_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_pp_manifest_filename.go b/fix/fixer_pp_manifest_filename.go index 9f66bc7ad2e..a9447d74050 100644 --- a/fix/fixer_pp_manifest_filename.go +++ b/fix/fixer_pp_manifest_filename.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_pp_manifest_filename_test.go b/fix/fixer_pp_manifest_filename_test.go index ab86324e906..95eaeae68a3 100644 --- a/fix/fixer_pp_manifest_filename_test.go +++ b/fix/fixer_pp_manifest_filename_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_pp_vagrant_override.go b/fix/fixer_pp_vagrant_override.go index eee262212c8..c70ab1f5929 100644 --- a/fix/fixer_pp_vagrant_override.go +++ b/fix/fixer_pp_vagrant_override.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_pp_vagrant_override_test.go b/fix/fixer_pp_vagrant_override_test.go index 1ba56eb6821..29f7edba658 100644 --- a/fix/fixer_pp_vagrant_override_test.go +++ b/fix/fixer_pp_vagrant_override_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_proxmox_type.go b/fix/fixer_proxmox_type.go index 602e82a9435..5c08a35631b 100644 --- a/fix/fixer_proxmox_type.go +++ b/fix/fixer_proxmox_type.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_proxmox_type_test.go b/fix/fixer_proxmox_type_test.go index e0ea378d572..53b9d855c8e 100644 --- a/fix/fixer_proxmox_type_test.go +++ b/fix/fixer_proxmox_type_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_qemu_disk_size.go b/fix/fixer_qemu_disk_size.go index 7cd53800393..5fd4184e571 100644 --- a/fix/fixer_qemu_disk_size.go +++ b/fix/fixer_qemu_disk_size.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_qemu_disk_size_test.go b/fix/fixer_qemu_disk_size_test.go index 3d141a5195c..a05e6f75239 100644 --- a/fix/fixer_qemu_disk_size_test.go +++ b/fix/fixer_qemu_disk_size_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_qemu_host_port.go b/fix/fixer_qemu_host_port.go index 4cd96b53ac1..1b92b04b316 100644 --- a/fix/fixer_qemu_host_port.go +++ b/fix/fixer_qemu_host_port.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_qemu_host_port_test.go b/fix/fixer_qemu_host_port_test.go index 64aaeddcbb7..7a9bf529c00 100644 --- a/fix/fixer_qemu_host_port_test.go +++ b/fix/fixer_qemu_host_port_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_scaleway_access_key.go b/fix/fixer_scaleway_access_key.go index c7e45484fab..cf9e173928a 100644 --- a/fix/fixer_scaleway_access_key.go +++ b/fix/fixer_scaleway_access_key.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_scaleway_access_key_test.go b/fix/fixer_scaleway_access_key_test.go index 365bb467533..a91f1886cad 100644 --- a/fix/fixer_scaleway_access_key_test.go +++ b/fix/fixer_scaleway_access_key_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_ssh_timeout.go b/fix/fixer_ssh_timeout.go index fc675199912..d73b47d66e8 100644 --- a/fix/fixer_ssh_timeout.go +++ b/fix/fixer_ssh_timeout.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_ssh_timeout_test.go b/fix/fixer_ssh_timeout_test.go index 558a94d9e23..0c89b7cf7b3 100644 --- a/fix/fixer_ssh_timeout_test.go +++ b/fix/fixer_ssh_timeout_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_sshdisableagent.go b/fix/fixer_sshdisableagent.go index 1ed262f225c..aa36504f010 100644 --- a/fix/fixer_sshdisableagent.go +++ b/fix/fixer_sshdisableagent.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_sshdisableagent_test.go b/fix/fixer_sshdisableagent_test.go index 9fc67bd763e..1c5ecc38c87 100644 --- a/fix/fixer_sshdisableagent_test.go +++ b/fix/fixer_sshdisableagent_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_sshkeypath.go b/fix/fixer_sshkeypath.go index 48bc8eee198..6c2f8ee0367 100644 --- a/fix/fixer_sshkeypath.go +++ b/fix/fixer_sshkeypath.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_sshkeypath_test.go b/fix/fixer_sshkeypath_test.go index c95917902a1..561db0ef788 100644 --- a/fix/fixer_sshkeypath_test.go +++ b/fix/fixer_sshkeypath_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_test.go b/fix/fixer_test.go index 091084ac794..2b09611521b 100644 --- a/fix/fixer_test.go +++ b/fix/fixer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_virtualbox_gaattach.go b/fix/fixer_virtualbox_gaattach.go index 23e8c7fdff2..5fc0834c72b 100644 --- a/fix/fixer_virtualbox_gaattach.go +++ b/fix/fixer_virtualbox_gaattach.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_virtualbox_gaattach_test.go b/fix/fixer_virtualbox_gaattach_test.go index 83fa00b59e7..62aa5b159a8 100644 --- a/fix/fixer_virtualbox_gaattach_test.go +++ b/fix/fixer_virtualbox_gaattach_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_virtualbox_rename.go b/fix/fixer_virtualbox_rename.go index a3723f2ed27..86d53fd1ff4 100644 --- a/fix/fixer_virtualbox_rename.go +++ b/fix/fixer_virtualbox_rename.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_virtualbox_rename_test.go b/fix/fixer_virtualbox_rename_test.go index fc570f3095b..932975bd0a6 100644 --- a/fix/fixer_virtualbox_rename_test.go +++ b/fix/fixer_virtualbox_rename_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_vmware_compaction.go b/fix/fixer_vmware_compaction.go index 906ff4d197d..cc833186dd1 100644 --- a/fix/fixer_vmware_compaction.go +++ b/fix/fixer_vmware_compaction.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_vmware_compaction_test.go b/fix/fixer_vmware_compaction_test.go index bd107705544..eb5494a3159 100644 --- a/fix/fixer_vmware_compaction_test.go +++ b/fix/fixer_vmware_compaction_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_vmware_rename.go b/fix/fixer_vmware_rename.go index 5e7db8a6ed8..c81e01b8577 100644 --- a/fix/fixer_vmware_rename.go +++ b/fix/fixer_vmware_rename.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_vmware_rename_test.go b/fix/fixer_vmware_rename_test.go index 6d8710cfb74..4c2cb095dc3 100644 --- a/fix/fixer_vmware_rename_test.go +++ b/fix/fixer_vmware_rename_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_vsphere_network_storage.go b/fix/fixer_vsphere_network_storage.go index 87723a9e9fc..f82bc20463e 100644 --- a/fix/fixer_vsphere_network_storage.go +++ b/fix/fixer_vsphere_network_storage.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/fixer_vsphere_network_storage_test.go b/fix/fixer_vsphere_network_storage_test.go index 54ebb8015e1..59e4bbf1c62 100644 --- a/fix/fixer_vsphere_network_storage_test.go +++ b/fix/fixer_vsphere_network_storage_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/fix/helpers.go b/fix/helpers.go index f3812674e3c..d4d01b22123 100644 --- a/fix/helpers.go +++ b/fix/helpers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package fix diff --git a/hcl2template/addrs/doc.go b/hcl2template/addrs/doc.go index 9768f453d12..783284822ba 100644 --- a/hcl2template/addrs/doc.go +++ b/hcl2template/addrs/doc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Package addrs contains types that represent "addresses", which are // references to specific objects within a Packer configuration. diff --git a/hcl2template/addrs/input_variable.go b/hcl2template/addrs/input_variable.go index e2821e7e5b1..9ffbf6fb0a4 100644 --- a/hcl2template/addrs/input_variable.go +++ b/hcl2template/addrs/input_variable.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package addrs diff --git a/hcl2template/addrs/parse_ref.go b/hcl2template/addrs/parse_ref.go index 866ced8f459..3f6c7320179 100644 --- a/hcl2template/addrs/parse_ref.go +++ b/hcl2template/addrs/parse_ref.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package addrs diff --git a/hcl2template/addrs/plugin.go b/hcl2template/addrs/plugin.go index 8b4891044fc..9db29b31717 100644 --- a/hcl2template/addrs/plugin.go +++ b/hcl2template/addrs/plugin.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package addrs diff --git a/hcl2template/addrs/plugin_test.go b/hcl2template/addrs/plugin_test.go index 491d2221a1c..e99a72416b8 100644 --- a/hcl2template/addrs/plugin_test.go +++ b/hcl2template/addrs/plugin_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package addrs diff --git a/hcl2template/addrs/referenceable.go b/hcl2template/addrs/referenceable.go index 9b54c5bac49..2b11d6008bc 100644 --- a/hcl2template/addrs/referenceable.go +++ b/hcl2template/addrs/referenceable.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package addrs diff --git a/hcl2template/common_test.go b/hcl2template/common_test.go index cb37a7bf996..831ce5d3596 100644 --- a/hcl2template/common_test.go +++ b/hcl2template/common_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/components.go b/hcl2template/components.go index 956a753f38b..e83f8b3768d 100644 --- a/hcl2template/components.go +++ b/hcl2template/components.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/decode.go b/hcl2template/decode.go index 137e54eec05..1dcd34c55ce 100644 --- a/hcl2template/decode.go +++ b/hcl2template/decode.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/docs.go b/hcl2template/docs.go index 2b19f42b029..cf970f2e8e1 100644 --- a/hcl2template/docs.go +++ b/hcl2template/docs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Package hcl2template defines code to parse hcl2 template files. // diff --git a/hcl2template/formatter.go b/hcl2template/formatter.go index 7e1cab56aa3..5505cde4052 100644 --- a/hcl2template/formatter.go +++ b/hcl2template/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/formatter_test.go b/hcl2template/formatter_test.go index 42051c0a8d3..07febb6f439 100644 --- a/hcl2template/formatter_test.go +++ b/hcl2template/formatter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/function/Consul.go b/hcl2template/function/Consul.go index 4f51ca41d15..e1e51b2299b 100644 --- a/hcl2template/function/Consul.go +++ b/hcl2template/function/Consul.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/aws_secretetkey.go b/hcl2template/function/aws_secretetkey.go index 50b4fe9ee53..4684c9bf2d2 100644 --- a/hcl2template/function/aws_secretetkey.go +++ b/hcl2template/function/aws_secretetkey.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/datetime.go b/hcl2template/function/datetime.go index 1d807e407d3..066db18db39 100644 --- a/hcl2template/function/datetime.go +++ b/hcl2template/function/datetime.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/datetime_test.go b/hcl2template/function/datetime_test.go index 686564803cc..416b6fa23f3 100644 --- a/hcl2template/function/datetime_test.go +++ b/hcl2template/function/datetime_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/env.go b/hcl2template/function/env.go index aeb632aba75..34c09a8b921 100644 --- a/hcl2template/function/env.go +++ b/hcl2template/function/env.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/index.go b/hcl2template/function/index.go index 3c5f73ccda9..cb4f0c51921 100644 --- a/hcl2template/function/index.go +++ b/hcl2template/function/index.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/index_test.go b/hcl2template/function/index_test.go index d70511ad516..0a46da34ce8 100644 --- a/hcl2template/function/index_test.go +++ b/hcl2template/function/index_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/length.go b/hcl2template/function/length.go index 90ab7997ec9..23b5969af10 100644 --- a/hcl2template/function/length.go +++ b/hcl2template/function/length.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/length_test.go b/hcl2template/function/length_test.go index 2c6f10c49d6..0a68c126c51 100644 --- a/hcl2template/function/length_test.go +++ b/hcl2template/function/length_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/templatefile.go b/hcl2template/function/templatefile.go index eee0092197c..0b927cf834a 100644 --- a/hcl2template/function/templatefile.go +++ b/hcl2template/function/templatefile.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/templatefile_test.go b/hcl2template/function/templatefile_test.go index a4536b59ca5..f12967dd3c5 100644 --- a/hcl2template/function/templatefile_test.go +++ b/hcl2template/function/templatefile_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/function/vault.go b/hcl2template/function/vault.go index 4aa49da6753..3b9c092442e 100644 --- a/hcl2template/function/vault.go +++ b/hcl2template/function/vault.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package function diff --git a/hcl2template/functions.go b/hcl2template/functions.go index cc144940cf6..c74754bdf90 100644 --- a/hcl2template/functions.go +++ b/hcl2template/functions.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/internal/mock.go b/hcl2template/internal/mock.go index 86d5b0e0e06..4d3adb14ae5 100644 --- a/hcl2template/internal/mock.go +++ b/hcl2template/internal/mock.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type MockConfig,NestedMockConfig,MockTag diff --git a/hcl2template/parser.go b/hcl2template/parser.go index a724bb807bd..43b43bcd6f0 100644 --- a/hcl2template/parser.go +++ b/hcl2template/parser.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/plugin.go b/hcl2template/plugin.go index 4a5c0186647..92b9cf2f30b 100644 --- a/hcl2template/plugin.go +++ b/hcl2template/plugin.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/repl/format.go b/hcl2template/repl/format.go index 8e596e4be9d..8d99a4392d0 100644 --- a/hcl2template/repl/format.go +++ b/hcl2template/repl/format.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package repl diff --git a/hcl2template/repl/repl.go b/hcl2template/repl/repl.go index 7a698f87f5b..eb13353eed0 100644 --- a/hcl2template/repl/repl.go +++ b/hcl2template/repl/repl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Package repl provides the structs and functions necessary to run REPL for // HCL2. The REPL allows experimentation of HCL2 interpolations without having diff --git a/hcl2template/shim/mock.go b/hcl2template/shim/mock.go index adeda84dd39..40fdbca4d32 100644 --- a/hcl2template/shim/mock.go +++ b/hcl2template/shim/mock.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type MockConfig,NestedMockConfig,MockTag diff --git a/hcl2template/shim/values.go b/hcl2template/shim/values.go index 88580f1f2c1..096c8c23d56 100644 --- a/hcl2template/shim/values.go +++ b/hcl2template/shim/values.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2shim diff --git a/hcl2template/shim/values_test.go b/hcl2template/shim/values_test.go index 46e154002cd..4449e711bc9 100644 --- a/hcl2template/shim/values_test.go +++ b/hcl2template/shim/values_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2shim diff --git a/hcl2template/types.build.from.go b/hcl2template/types.build.from.go index 9661fa167b0..fb1544ef53a 100644 --- a/hcl2template/types.build.from.go +++ b/hcl2template/types.build.from.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.build.go b/hcl2template/types.build.go index 2ab6aa718fe..648305ee202 100644 --- a/hcl2template/types.build.go +++ b/hcl2template/types.build.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.build.hcp_packer_registry.go b/hcl2template/types.build.hcp_packer_registry.go index 6d1b99f2ec9..b64b3ff4e55 100644 --- a/hcl2template/types.build.hcp_packer_registry.go +++ b/hcl2template/types.build.hcp_packer_registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.build.hcp_packer_registry_test.go b/hcl2template/types.build.hcp_packer_registry_test.go index 18c8ca3fa34..3ada389c29d 100644 --- a/hcl2template/types.build.hcp_packer_registry_test.go +++ b/hcl2template/types.build.hcp_packer_registry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.build.post-processor.go b/hcl2template/types.build.post-processor.go index 1216f32ebfd..8844eadff11 100644 --- a/hcl2template/types.build.post-processor.go +++ b/hcl2template/types.build.post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.build.provisioners.go b/hcl2template/types.build.provisioners.go index 8459f1be921..b08eca59f63 100644 --- a/hcl2template/types.build.provisioners.go +++ b/hcl2template/types.build.provisioners.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.build.provisioners_test.go b/hcl2template/types.build.provisioners_test.go index e19570dff29..284651f2cbd 100644 --- a/hcl2template/types.build.provisioners_test.go +++ b/hcl2template/types.build.provisioners_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.build_test.go b/hcl2template/types.build_test.go index 376646c6376..8647821dd18 100644 --- a/hcl2template/types.build_test.go +++ b/hcl2template/types.build_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.datasource.go b/hcl2template/types.datasource.go index 9ae5e995ecc..8ac2c160827 100644 --- a/hcl2template/types.datasource.go +++ b/hcl2template/types.datasource.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.datasource_test.go b/hcl2template/types.datasource_test.go index b22f438d64b..d12fcafd076 100644 --- a/hcl2template/types.datasource_test.go +++ b/hcl2template/types.datasource_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.hcl_post-processor.go b/hcl2template/types.hcl_post-processor.go index 26974aacedf..b9d200758de 100644 --- a/hcl2template/types.hcl_post-processor.go +++ b/hcl2template/types.hcl_post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.hcl_provisioner.go b/hcl2template/types.hcl_provisioner.go index 022a2fd58d1..b607a0092a2 100644 --- a/hcl2template/types.hcl_provisioner.go +++ b/hcl2template/types.hcl_provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.hcl_ref.go b/hcl2template/types.hcl_ref.go index 091a2043610..f3e6176dbf1 100644 --- a/hcl2template/types.hcl_ref.go +++ b/hcl2template/types.hcl_ref.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 003db57753c..819107e86b3 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.packer_config_test.go b/hcl2template/types.packer_config_test.go index d8881c18415..5eae6a2f21f 100644 --- a/hcl2template/types.packer_config_test.go +++ b/hcl2template/types.packer_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.required_plugins.go b/hcl2template/types.required_plugins.go index 01c090428f8..94dfd4669b3 100644 --- a/hcl2template/types.required_plugins.go +++ b/hcl2template/types.required_plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.required_plugins_test.go b/hcl2template/types.required_plugins_test.go index 3a1fabd4bf7..5e2b4a90c96 100644 --- a/hcl2template/types.required_plugins_test.go +++ b/hcl2template/types.required_plugins_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.source.go b/hcl2template/types.source.go index 1ea939d015f..46b9caac98e 100644 --- a/hcl2template/types.source.go +++ b/hcl2template/types.source.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.source_test.go b/hcl2template/types.source_test.go index efdddea5abe..47caeec5a75 100644 --- a/hcl2template/types.source_test.go +++ b/hcl2template/types.source_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.variables.go b/hcl2template/types.variables.go index 9111ced9a44..33df28a84ee 100644 --- a/hcl2template/types.variables.go +++ b/hcl2template/types.variables.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/types.variables_test.go b/hcl2template/types.variables_test.go index d0691a0910c..a19b80bd990 100644 --- a/hcl2template/types.variables_test.go +++ b/hcl2template/types.variables_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/utils.go b/hcl2template/utils.go index b74093b23fe..dc2399a1034 100644 --- a/hcl2template/utils.go +++ b/hcl2template/utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/version.go b/hcl2template/version.go index 920cff51031..f6f584a69a5 100644 --- a/hcl2template/version.go +++ b/hcl2template/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/hcl2template/version_required.go b/hcl2template/version_required.go index c418eda550a..f8c67228bfb 100644 --- a/hcl2template/version_required.go +++ b/hcl2template/version_required.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package hcl2template diff --git a/helper/wrappedreadline/wrappedreadline.go b/helper/wrappedreadline/wrappedreadline.go index 6641cb8960b..9d4bd7fcf25 100644 --- a/helper/wrappedreadline/wrappedreadline.go +++ b/helper/wrappedreadline/wrappedreadline.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // STOLEN SHAMELESSLY FROM THE TERRAFORM REPO BECAUSE VENDORING OUT // WRAPPEDREADLINE AND WRAPPEDSTREAMS FELT LIKE TOO MUCH WORK. diff --git a/helper/wrappedreadline/wrappedreadline_solaris.go b/helper/wrappedreadline/wrappedreadline_solaris.go index fb2a9388e00..55eac364548 100644 --- a/helper/wrappedreadline/wrappedreadline_solaris.go +++ b/helper/wrappedreadline/wrappedreadline_solaris.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package wrappedreadline diff --git a/helper/wrappedreadline/wrappedreadline_unix.go b/helper/wrappedreadline/wrappedreadline_unix.go index ff621e7da9e..7d01bb3a99e 100644 --- a/helper/wrappedreadline/wrappedreadline_unix.go +++ b/helper/wrappedreadline/wrappedreadline_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build darwin || dragonfly || freebsd || (linux && !appengine) || netbsd || openbsd // +build darwin dragonfly freebsd linux,!appengine netbsd openbsd diff --git a/helper/wrappedreadline/wrappedreadline_windows.go b/helper/wrappedreadline/wrappedreadline_windows.go index d3d361579f1..88d04a06ab8 100644 --- a/helper/wrappedreadline/wrappedreadline_windows.go +++ b/helper/wrappedreadline/wrappedreadline_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build windows // +build windows diff --git a/helper/wrappedstreams/streams.go b/helper/wrappedstreams/streams.go index 80d1e66b259..1b18abf1958 100644 --- a/helper/wrappedstreams/streams.go +++ b/helper/wrappedstreams/streams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // STOLEN SHAMELESSLY FROM THE TERRAFORM REPO BECAUSE VENDORING OUT // WRAPPEDREADLINE AND WRAPPEDSTREAMS FELT LIKE TOO MUCH WORK. diff --git a/helper/wrappedstreams/streams_other.go b/helper/wrappedstreams/streams_other.go index 34ecf76d06a..98045b535da 100644 --- a/helper/wrappedstreams/streams_other.go +++ b/helper/wrappedstreams/streams_other.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build !windows // +build !windows diff --git a/helper/wrappedstreams/streams_windows.go b/helper/wrappedstreams/streams_windows.go index 18489fdc268..5a0d01de4fc 100644 --- a/helper/wrappedstreams/streams_windows.go +++ b/helper/wrappedstreams/streams_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build windows // +build windows diff --git a/internal/hcp/api/client.go b/internal/hcp/api/client.go index f28999d57b6..5c8c851ae40 100644 --- a/internal/hcp/api/client.go +++ b/internal/hcp/api/client.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Package api provides access to the HCP Packer Registry API. package api diff --git a/internal/hcp/api/client_test.go b/internal/hcp/api/client_test.go index 16d321beb77..bb952375bf9 100644 --- a/internal/hcp/api/client_test.go +++ b/internal/hcp/api/client_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package api diff --git a/internal/hcp/api/errors.go b/internal/hcp/api/errors.go index 32a5708cc14..cff55fc9e09 100644 --- a/internal/hcp/api/errors.go +++ b/internal/hcp/api/errors.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package api diff --git a/internal/hcp/api/mock_service.go b/internal/hcp/api/mock_service.go index 9a126346e06..f9b427cbf29 100644 --- a/internal/hcp/api/mock_service.go +++ b/internal/hcp/api/mock_service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package api diff --git a/internal/hcp/api/service.go b/internal/hcp/api/service.go index a0ee9f8ce4c..df56bdbd58c 100644 --- a/internal/hcp/api/service.go +++ b/internal/hcp/api/service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package api diff --git a/internal/hcp/env/env.go b/internal/hcp/env/env.go index 0186be1671f..972fd68f77e 100644 --- a/internal/hcp/env/env.go +++ b/internal/hcp/env/env.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Package env provides HCP Packer environment variables. package env diff --git a/internal/hcp/env/env_test.go b/internal/hcp/env/env_test.go index 1de73f5913d..a773b41c928 100644 --- a/internal/hcp/env/env_test.go +++ b/internal/hcp/env/env_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package env diff --git a/internal/hcp/env/variables.go b/internal/hcp/env/variables.go index 8c74b600d47..a8c1a493e13 100644 --- a/internal/hcp/env/variables.go +++ b/internal/hcp/env/variables.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package env diff --git a/internal/hcp/registry/artifact.go b/internal/hcp/registry/artifact.go index a0b0049cc9f..7257d302f3d 100644 --- a/internal/hcp/registry/artifact.go +++ b/internal/hcp/registry/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/errors.go b/internal/hcp/registry/errors.go index a93f960f996..8bc458d241b 100644 --- a/internal/hcp/registry/errors.go +++ b/internal/hcp/registry/errors.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/hcl.go b/internal/hcp/registry/hcl.go index 64c57a51761..531fd648c7e 100644 --- a/internal/hcp/registry/hcl.go +++ b/internal/hcp/registry/hcl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/hcp.go b/internal/hcp/registry/hcp.go index 838350b7641..c0d12726e2d 100644 --- a/internal/hcp/registry/hcp.go +++ b/internal/hcp/registry/hcp.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/json.go b/internal/hcp/registry/json.go index bb0bba14674..92aa6db904c 100644 --- a/internal/hcp/registry/json.go +++ b/internal/hcp/registry/json.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/null_registry.go b/internal/hcp/registry/null_registry.go index 5aee3e6bcd1..f7dbcdf0970 100644 --- a/internal/hcp/registry/null_registry.go +++ b/internal/hcp/registry/null_registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/registry.go b/internal/hcp/registry/registry.go index b095e14ea2f..35485a8993e 100644 --- a/internal/hcp/registry/registry.go +++ b/internal/hcp/registry/registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Package registry provides access to the HCP registry. package registry diff --git a/internal/hcp/registry/types.bucket.go b/internal/hcp/registry/types.bucket.go index 7e548643a65..d4239f45005 100644 --- a/internal/hcp/registry/types.bucket.go +++ b/internal/hcp/registry/types.bucket.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/types.bucket_service_test.go b/internal/hcp/registry/types.bucket_service_test.go index 5fa28ac4e93..6503b95fb02 100644 --- a/internal/hcp/registry/types.bucket_service_test.go +++ b/internal/hcp/registry/types.bucket_service_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/types.bucket_test.go b/internal/hcp/registry/types.bucket_test.go index 30f73dec51c..9c1467ad714 100644 --- a/internal/hcp/registry/types.bucket_test.go +++ b/internal/hcp/registry/types.bucket_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/types.builds.go b/internal/hcp/registry/types.builds.go index 9245a9d3141..991ef563a00 100644 --- a/internal/hcp/registry/types.builds.go +++ b/internal/hcp/registry/types.builds.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/types.iterations.go b/internal/hcp/registry/types.iterations.go index b9ffc232243..c186a2a256d 100644 --- a/internal/hcp/registry/types.iterations.go +++ b/internal/hcp/registry/types.iterations.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/internal/hcp/registry/types.iterations_test.go b/internal/hcp/registry/types.iterations_test.go index fe7132d6b36..27e87b5798f 100644 --- a/internal/hcp/registry/types.iterations_test.go +++ b/internal/hcp/registry/types.iterations_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package registry diff --git a/log.go b/log.go index 2c15a700a16..72744bc3dd5 100644 --- a/log.go +++ b/log.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/main.go b/main.go index 728f56860af..0d39d70d579 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // This is the main package for the `packer` application. diff --git a/main_test.go b/main_test.go index 69be0aca87e..b71319e9dea 100644 --- a/main_test.go +++ b/main_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/packer/build.go b/packer/build.go index 3309bb194d5..e51e71d00c9 100644 --- a/packer/build.go +++ b/packer/build.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/build_test.go b/packer/build_test.go index 86531d8ca4b..c15eec5b570 100644 --- a/packer/build_test.go +++ b/packer/build_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/builder_test.go b/packer/builder_test.go index 1276552788b..85b7eaf5f08 100644 --- a/packer/builder_test.go +++ b/packer/builder_test.go @@ -1,4 +1,4 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/client_test.go b/packer/client_test.go index f9a1483ff87..f0dc074e997 100644 --- a/packer/client_test.go +++ b/packer/client_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_builder.go b/packer/cmd_builder.go index 99a0bc6f913..8b472d1fb24 100644 --- a/packer/cmd_builder.go +++ b/packer/cmd_builder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_builder_test.go b/packer/cmd_builder_test.go index dfc5d15fb99..a47bcea31b8 100644 --- a/packer/cmd_builder_test.go +++ b/packer/cmd_builder_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_datasource.go b/packer/cmd_datasource.go index 4e8b32561ed..0e2d6b79892 100644 --- a/packer/cmd_datasource.go +++ b/packer/cmd_datasource.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_datasource_test.go b/packer/cmd_datasource_test.go index c174c8ee02b..1616b218cf7 100644 --- a/packer/cmd_datasource_test.go +++ b/packer/cmd_datasource_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_hook.go b/packer/cmd_hook.go index ace3d2c032d..f3973a98a0d 100644 --- a/packer/cmd_hook.go +++ b/packer/cmd_hook.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_hook_test.go b/packer/cmd_hook_test.go index f2a1f4d9246..ed149c5af7c 100644 --- a/packer/cmd_hook_test.go +++ b/packer/cmd_hook_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_post_processor.go b/packer/cmd_post_processor.go index c686a3937ef..139c9133390 100644 --- a/packer/cmd_post_processor.go +++ b/packer/cmd_post_processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_post_processor_test.go b/packer/cmd_post_processor_test.go index ce70a8bf125..3c69d899f6b 100644 --- a/packer/cmd_post_processor_test.go +++ b/packer/cmd_post_processor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_provisioner.go b/packer/cmd_provisioner.go index 965ad89587f..335b7bd97ec 100644 --- a/packer/cmd_provisioner.go +++ b/packer/cmd_provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/cmd_provisioner_test.go b/packer/cmd_provisioner_test.go index 5bb86942ace..6c2005b9354 100644 --- a/packer/cmd_provisioner_test.go +++ b/packer/cmd_provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/core.go b/packer/core.go index b711af080bc..732f026360f 100644 --- a/packer/core.go +++ b/packer/core.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/core_test.go b/packer/core_test.go index e46f62e6b0e..b1694cbf86c 100644 --- a/packer/core_test.go +++ b/packer/core_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/maps.go b/packer/maps.go index 6fec5c67950..1d99802dfef 100644 --- a/packer/maps.go +++ b/packer/maps.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/packer_test.go b/packer/packer_test.go index bc75903397b..2f52c5e76d2 100644 --- a/packer/packer_test.go +++ b/packer/packer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/plugin-getter/checksum.go b/packer/plugin-getter/checksum.go index 507a17e6537..d7193ba3b7f 100644 --- a/packer/plugin-getter/checksum.go +++ b/packer/plugin-getter/checksum.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package plugingetter diff --git a/packer/plugin-getter/docs.go b/packer/plugin-getter/docs.go index 6c8cfba37cf..216a7781d2f 100644 --- a/packer/plugin-getter/docs.go +++ b/packer/plugin-getter/docs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Package plugingetter defines means to download and install plugins. package plugingetter diff --git a/packer/plugin-getter/github/docs.go b/packer/plugin-getter/github/docs.go index 9c189dfd3a3..50fa13e30ae 100644 --- a/packer/plugin-getter/github/docs.go +++ b/packer/plugin-getter/github/docs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Package github defines a Github getter. diff --git a/packer/plugin-getter/github/getter.go b/packer/plugin-getter/github/getter.go index c094a33e332..bde61e51641 100644 --- a/packer/plugin-getter/github/getter.go +++ b/packer/plugin-getter/github/getter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package github diff --git a/packer/plugin-getter/plugins.go b/packer/plugin-getter/plugins.go index 09acf7052c8..b16edcfade0 100644 --- a/packer/plugin-getter/plugins.go +++ b/packer/plugin-getter/plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package plugingetter diff --git a/packer/plugin-getter/plugins_test.go b/packer/plugin-getter/plugins_test.go index 3105fb1e667..7a1439de210 100644 --- a/packer/plugin-getter/plugins_test.go +++ b/packer/plugin-getter/plugins_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package plugingetter diff --git a/packer/plugin.go b/packer/plugin.go index dd3e6d31719..c88f54f86b3 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/plugin_client.go b/packer/plugin_client.go index f1d127497be..b788f68f7fb 100644 --- a/packer/plugin_client.go +++ b/packer/plugin_client.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/plugin_discover_test.go b/packer/plugin_discover_test.go index fec52607d83..901c3d42f1d 100644 --- a/packer/plugin_discover_test.go +++ b/packer/plugin_discover_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/plugin_folders.go b/packer/plugin_folders.go index 52d63aac4cc..e1d4dbea4a2 100644 --- a/packer/plugin_folders.go +++ b/packer/plugin_folders.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/plugin_test.go b/packer/plugin_test.go index 099d9cf6c8a..a912ca07a38 100644 --- a/packer/plugin_test.go +++ b/packer/plugin_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/post_processor_mock.go b/packer/post_processor_mock.go index b6156e28ceb..5a9bfc85ae2 100644 --- a/packer/post_processor_mock.go +++ b/packer/post_processor_mock.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type MockPostProcessor package packer diff --git a/packer/progressbar.go b/packer/progressbar.go index c7e68f7c2ba..0a9225047c3 100644 --- a/packer/progressbar.go +++ b/packer/progressbar.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build !solaris // +build !solaris diff --git a/packer/progressbar_solaris.go b/packer/progressbar_solaris.go index cfc0266f27a..7aa199339a7 100644 --- a/packer/progressbar_solaris.go +++ b/packer/progressbar_solaris.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/progressbar_test.go b/packer/progressbar_test.go index a50049cf908..96ff65d687b 100644 --- a/packer/progressbar_test.go +++ b/packer/progressbar_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/provisioner.go b/packer/provisioner.go index 66d61d9fb98..c7761adeb5f 100644 --- a/packer/provisioner.go +++ b/packer/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/provisioner_test.go b/packer/provisioner_test.go index d5e191038c9..bc646e5ca10 100644 --- a/packer/provisioner_test.go +++ b/packer/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/provisioner_timeout.go b/packer/provisioner_timeout.go index c7407130cb4..f1183744cdb 100644 --- a/packer/provisioner_timeout.go +++ b/packer/provisioner_timeout.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/run_interfaces.go b/packer/run_interfaces.go index 253998c20a4..07829e629e1 100644 --- a/packer/run_interfaces.go +++ b/packer/run_interfaces.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/telemetry.go b/packer/telemetry.go index b1f0347b2ba..9a7f569139e 100644 --- a/packer/telemetry.go +++ b/packer/telemetry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/telemetry_test.go b/packer/telemetry_test.go index 4d1dee3e7f5..ab304a55023 100644 --- a/packer/telemetry_test.go +++ b/packer/telemetry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/testing.go b/packer/testing.go index 0b2449593c2..faa3c58283e 100644 --- a/packer/testing.go +++ b/packer/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/ui.go b/packer/ui.go index dac5689205c..c01e9591a54 100644 --- a/packer/ui.go +++ b/packer/ui.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/packer/ui_test.go b/packer/ui_test.go index 1d15cb4ea0f..44fa93c7f07 100644 --- a/packer/ui_test.go +++ b/packer/ui_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package packer diff --git a/panic.go b/panic.go index 6f609645345..6fdfc59af24 100644 --- a/panic.go +++ b/panic.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/post-processor/artifice/artifact.go b/post-processor/artifice/artifact.go index 4f481b2be29..859b05e6199 100644 --- a/post-processor/artifice/artifact.go +++ b/post-processor/artifice/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package artifice diff --git a/post-processor/artifice/post-processor.go b/post-processor/artifice/post-processor.go index 334d8531b6b..d1a4f422268 100644 --- a/post-processor/artifice/post-processor.go +++ b/post-processor/artifice/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/post-processor/artifice/version/version.go b/post-processor/artifice/version/version.go index b426efb501a..b329b365688 100644 --- a/post-processor/artifice/version/version.go +++ b/post-processor/artifice/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/post-processor/checksum/artifact.go b/post-processor/checksum/artifact.go index eb1eeeeec26..5468460d53a 100644 --- a/post-processor/checksum/artifact.go +++ b/post-processor/checksum/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package checksum diff --git a/post-processor/checksum/post-processor.go b/post-processor/checksum/post-processor.go index 28b107cd8e6..efd51b6a169 100644 --- a/post-processor/checksum/post-processor.go +++ b/post-processor/checksum/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/post-processor/checksum/post-processor_test.go b/post-processor/checksum/post-processor_test.go index 97ab201f7f8..62c2f2ae3e1 100644 --- a/post-processor/checksum/post-processor_test.go +++ b/post-processor/checksum/post-processor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package checksum diff --git a/post-processor/checksum/version/version.go b/post-processor/checksum/version/version.go index 74332d82388..9e1eeb239d9 100644 --- a/post-processor/checksum/version/version.go +++ b/post-processor/checksum/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/post-processor/compress/artifact.go b/post-processor/compress/artifact.go index 20c7ef7d0b3..c56b2905daf 100644 --- a/post-processor/compress/artifact.go +++ b/post-processor/compress/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package compress diff --git a/post-processor/compress/artifact_test.go b/post-processor/compress/artifact_test.go index d0c1da8caeb..a30a803edf6 100644 --- a/post-processor/compress/artifact_test.go +++ b/post-processor/compress/artifact_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package compress diff --git a/post-processor/compress/benchmark.go b/post-processor/compress/benchmark.go index f853c85104f..5d06b7d6448 100644 --- a/post-processor/compress/benchmark.go +++ b/post-processor/compress/benchmark.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build ignore // +build ignore diff --git a/post-processor/compress/post-processor.go b/post-processor/compress/post-processor.go index 9d2a32e57d5..88b345a97d8 100644 --- a/post-processor/compress/post-processor.go +++ b/post-processor/compress/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/post-processor/compress/post-processor_test.go b/post-processor/compress/post-processor_test.go index f91a1178f2f..e85b2041062 100644 --- a/post-processor/compress/post-processor_test.go +++ b/post-processor/compress/post-processor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package compress diff --git a/post-processor/compress/tar_fix.go b/post-processor/compress/tar_fix.go index ad58cb18fa9..0402f4e7075 100644 --- a/post-processor/compress/tar_fix.go +++ b/post-processor/compress/tar_fix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build !go1.10 // +build !go1.10 diff --git a/post-processor/compress/tar_fix_go110.go b/post-processor/compress/tar_fix_go110.go index 5eac3dea192..2e0eba8d8cf 100644 --- a/post-processor/compress/tar_fix_go110.go +++ b/post-processor/compress/tar_fix_go110.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build go1.10 // +build go1.10 diff --git a/post-processor/compress/version/version.go b/post-processor/compress/version/version.go index 639290a83ef..75bfb46f656 100644 --- a/post-processor/compress/version/version.go +++ b/post-processor/compress/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/post-processor/manifest/artifact.go b/post-processor/manifest/artifact.go index b70c7deceb0..ceef83f8123 100644 --- a/post-processor/manifest/artifact.go +++ b/post-processor/manifest/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package manifest diff --git a/post-processor/manifest/post-processor.go b/post-processor/manifest/post-processor.go index f911f734b5c..5fb90c45577 100644 --- a/post-processor/manifest/post-processor.go +++ b/post-processor/manifest/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config //go:generate packer-sdc struct-markdown diff --git a/post-processor/manifest/version/version.go b/post-processor/manifest/version/version.go index 20a5523154a..86f862f89fd 100644 --- a/post-processor/manifest/version/version.go +++ b/post-processor/manifest/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/post-processor/shell-local/post-processor.go b/post-processor/shell-local/post-processor.go index 334081e5927..801e8ac6567 100644 --- a/post-processor/shell-local/post-processor.go +++ b/post-processor/shell-local/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell_local diff --git a/post-processor/shell-local/post-processor_test.go b/post-processor/shell-local/post-processor_test.go index eb8481772d1..39fbec25ec3 100644 --- a/post-processor/shell-local/post-processor_test.go +++ b/post-processor/shell-local/post-processor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell_local diff --git a/post-processor/shell-local/version/version.go b/post-processor/shell-local/version/version.go index 1d02737909d..1f602bc5f46 100644 --- a/post-processor/shell-local/version/version.go +++ b/post-processor/shell-local/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/provisioner/breakpoint/provisioner.go b/provisioner/breakpoint/provisioner.go index fc833fb47bc..9675ddff0d3 100644 --- a/provisioner/breakpoint/provisioner.go +++ b/provisioner/breakpoint/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/breakpoint/version/version.go b/provisioner/breakpoint/version/version.go index 008af956575..2024c7e5a74 100644 --- a/provisioner/breakpoint/version/version.go +++ b/provisioner/breakpoint/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/provisioner/file/provisioner.go b/provisioner/file/provisioner.go index 84e9c3744fa..586896611d9 100644 --- a/provisioner/file/provisioner.go +++ b/provisioner/file/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config //go:generate packer-sdc struct-markdown diff --git a/provisioner/file/provisioner_test.go b/provisioner/file/provisioner_test.go index e3ecd7294f7..17d55d75d2b 100644 --- a/provisioner/file/provisioner_test.go +++ b/provisioner/file/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package file diff --git a/provisioner/file/version/version.go b/provisioner/file/version/version.go index e5b7923463f..8451cf03227 100644 --- a/provisioner/file/version/version.go +++ b/provisioner/file/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/provisioner/powershell/execution_policy.go b/provisioner/powershell/execution_policy.go index 94463db2b24..057f60a2ec7 100644 --- a/provisioner/powershell/execution_policy.go +++ b/provisioner/powershell/execution_policy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate enumer -transform snake -trimprefix ExecutionPolicy -type ExecutionPolicy diff --git a/provisioner/powershell/execution_policy_test.go b/provisioner/powershell/execution_policy_test.go index 8b82c97f270..5631b78bdd1 100644 --- a/provisioner/powershell/execution_policy_test.go +++ b/provisioner/powershell/execution_policy_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package powershell diff --git a/provisioner/powershell/provisioner.go b/provisioner/powershell/provisioner.go index 65ed16d1bf2..aae71f9fb3e 100644 --- a/provisioner/powershell/provisioner.go +++ b/provisioner/powershell/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/powershell/provisioner_acc_test.go b/provisioner/powershell/provisioner_acc_test.go index 379b14f9b8f..8340b2a5a87 100644 --- a/provisioner/powershell/provisioner_acc_test.go +++ b/provisioner/powershell/provisioner_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package powershell_test diff --git a/provisioner/powershell/provisioner_test.go b/provisioner/powershell/provisioner_test.go index d94a56fa23b..0d8b4ca35cd 100644 --- a/provisioner/powershell/provisioner_test.go +++ b/provisioner/powershell/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package powershell diff --git a/provisioner/powershell/version/version.go b/provisioner/powershell/version/version.go index eb2cc7e0d33..b0350e51cbd 100644 --- a/provisioner/powershell/version/version.go +++ b/provisioner/powershell/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/provisioner/shell-local/provisioner.go b/provisioner/shell-local/provisioner.go index d051b361239..3c62b28f9d5 100644 --- a/provisioner/shell-local/provisioner.go +++ b/provisioner/shell-local/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell diff --git a/provisioner/shell-local/provisioner_acc_test.go b/provisioner/shell-local/provisioner_acc_test.go index f53990d0d2f..b7b7c051a14 100644 --- a/provisioner/shell-local/provisioner_acc_test.go +++ b/provisioner/shell-local/provisioner_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell_test diff --git a/provisioner/shell-local/provisioner_test.go b/provisioner/shell-local/provisioner_test.go index ac7262b616a..c320ad4a1d1 100644 --- a/provisioner/shell-local/provisioner_test.go +++ b/provisioner/shell-local/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell diff --git a/provisioner/shell-local/version/version.go b/provisioner/shell-local/version/version.go index 205aea7ccf0..27e57fb5c0a 100644 --- a/provisioner/shell-local/version/version.go +++ b/provisioner/shell-local/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/provisioner/shell/provisioner.go b/provisioner/shell/provisioner.go index cc1e399996a..593f898caf0 100644 --- a/provisioner/shell/provisioner.go +++ b/provisioner/shell/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/shell/provisioner_acc_test.go b/provisioner/shell/provisioner_acc_test.go index 8ffc58b8d14..4eefa19e78a 100644 --- a/provisioner/shell/provisioner_acc_test.go +++ b/provisioner/shell/provisioner_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell_test diff --git a/provisioner/shell/provisioner_test.go b/provisioner/shell/provisioner_test.go index 73a4ac248f5..5640c92425e 100644 --- a/provisioner/shell/provisioner_test.go +++ b/provisioner/shell/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell diff --git a/provisioner/shell/unix_reader.go b/provisioner/shell/unix_reader.go index dc74647b292..9e27a6de928 100644 --- a/provisioner/shell/unix_reader.go +++ b/provisioner/shell/unix_reader.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell diff --git a/provisioner/shell/unix_reader_test.go b/provisioner/shell/unix_reader_test.go index 96c470cc13c..869531653ad 100644 --- a/provisioner/shell/unix_reader_test.go +++ b/provisioner/shell/unix_reader_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell diff --git a/provisioner/shell/version/version.go b/provisioner/shell/version/version.go index f192bb373db..bb0b798efe2 100644 --- a/provisioner/shell/version/version.go +++ b/provisioner/shell/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/provisioner/sleep/provisioner.go b/provisioner/sleep/provisioner.go index 8dfb4ce1f7c..7c74c74b73d 100644 --- a/provisioner/sleep/provisioner.go +++ b/provisioner/sleep/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Provisioner diff --git a/provisioner/sleep/provisioner_test.go b/provisioner/sleep/provisioner_test.go index 315849e66dc..94acf5771ef 100644 --- a/provisioner/sleep/provisioner_test.go +++ b/provisioner/sleep/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package sleep diff --git a/provisioner/sleep/version/version.go b/provisioner/sleep/version/version.go index bdad4975ec3..3b0c4c2bf25 100644 --- a/provisioner/sleep/version/version.go +++ b/provisioner/sleep/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/provisioner/windows-restart/provisioner.go b/provisioner/windows-restart/provisioner.go index 8aaa3598ccd..4c1113a0df8 100644 --- a/provisioner/windows-restart/provisioner.go +++ b/provisioner/windows-restart/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/windows-restart/provisioner_test.go b/provisioner/windows-restart/provisioner_test.go index bc68f167398..c2d934ed539 100644 --- a/provisioner/windows-restart/provisioner_test.go +++ b/provisioner/windows-restart/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package restart diff --git a/provisioner/windows-restart/version/version.go b/provisioner/windows-restart/version/version.go index 5376f9e31a6..d178be5e559 100644 --- a/provisioner/windows-restart/version/version.go +++ b/provisioner/windows-restart/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/provisioner/windows-shell/provisioner.go b/provisioner/windows-shell/provisioner.go index c6f22a3e778..0002d85ba06 100644 --- a/provisioner/windows-shell/provisioner.go +++ b/provisioner/windows-shell/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/windows-shell/provisioner_test.go b/provisioner/windows-shell/provisioner_test.go index e01af9e7b06..5ef92c64ac0 100644 --- a/provisioner/windows-shell/provisioner_test.go +++ b/provisioner/windows-shell/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package shell diff --git a/provisioner/windows-shell/version/version.go b/provisioner/windows-shell/version/version.go index 18ad34fe08e..71885679439 100644 --- a/provisioner/windows-shell/version/version.go +++ b/provisioner/windows-shell/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 4f1abd3a1cb..3290347fe0f 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 <# .Synopsis diff --git a/scripts/build.sh b/scripts/build.sh index 8b65f50b773..491a1bbce4f 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 # This script builds the application from source for multiple platforms. diff --git a/scripts/codesign_example.sh b/scripts/codesign_example.sh index 2e1a1698477..85303332049 100755 --- a/scripts/codesign_example.sh +++ b/scripts/codesign_example.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 set -euo pipefail diff --git a/scripts/dist.sh b/scripts/dist.sh index 113af57ba21..999be612a05 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 set -e diff --git a/scripts/generate-plugins.go b/scripts/generate-plugins.go index e52c063b3fe..bd303cb29ba 100755 --- a/scripts/generate-plugins.go +++ b/scripts/generate-plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 // Generate Plugins is a small program that updates the lists of plugins in // command/plugin.go so they will be compiled into the main packer binary. diff --git a/scripts/off_gopath.sh b/scripts/off_gopath.sh index beb1433e1bf..04e1ae709e5 100755 --- a/scripts/off_gopath.sh +++ b/scripts/off_gopath.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 set -eu -o pipefail diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh index 3f776034b1d..be9049eca78 100755 --- a/scripts/prepare_changelog.sh +++ b/scripts/prepare_changelog.sh @@ -1,6 +1,6 @@ #!/bin/zsh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 LAST_RELEASE=$1 diff --git a/scripts/sign.sh b/scripts/sign.sh index f7d18acd764..494347ef677 100755 --- a/scripts/sign.sh +++ b/scripts/sign.sh @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 #!/usr/bin/env bash diff --git a/scripts/sort-md-list.py b/scripts/sort-md-list.py index 9842977752e..c84ad663da2 100755 --- a/scripts/sort-md-list.py +++ b/scripts/sort-md-list.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 """ sort-md-list.py sorts markdown lists diff --git a/scripts/upgrade_plugins.sh b/scripts/upgrade_plugins.sh index 3ca2885f178..961f8ed804d 100755 --- a/scripts/upgrade_plugins.sh +++ b/scripts/upgrade_plugins.sh @@ -1,6 +1,6 @@ #!/bin/zsh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 ## This script is to be run before a Packer release in order to update diff --git a/scripts/vagrant-freebsd-priv-config.sh b/scripts/vagrant-freebsd-priv-config.sh index 9d5f0761ed5..89915370f36 100755 --- a/scripts/vagrant-freebsd-priv-config.sh +++ b/scripts/vagrant-freebsd-priv-config.sh @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 chown vagrant:wheel \ diff --git a/scripts/vagrant-freebsd-unpriv-bootstrap.sh b/scripts/vagrant-freebsd-unpriv-bootstrap.sh index 89fc9fc87bb..809415ab6c8 100755 --- a/scripts/vagrant-freebsd-unpriv-bootstrap.sh +++ b/scripts/vagrant-freebsd-unpriv-bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 export GOPATH=/opt/gopath diff --git a/scripts/vagrant-linux-priv-config.sh b/scripts/vagrant-linux-priv-config.sh index d89e10ecb0b..b658e719179 100755 --- a/scripts/vagrant-linux-priv-config.sh +++ b/scripts/vagrant-linux-priv-config.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 export DEBIAN_FRONTEND=noninteractive diff --git a/scripts/vagrant-linux-priv-go.sh b/scripts/vagrant-linux-priv-go.sh index 2d99bc1517b..e59ae7e145d 100755 --- a/scripts/vagrant-linux-priv-go.sh +++ b/scripts/vagrant-linux-priv-go.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 function install_go() { diff --git a/scripts/vagrant-linux-unpriv-bootstrap.sh b/scripts/vagrant-linux-unpriv-bootstrap.sh index ca7f004c9eb..ff6b8f8f90f 100755 --- a/scripts/vagrant-linux-unpriv-bootstrap.sh +++ b/scripts/vagrant-linux-unpriv-bootstrap.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 +# SPDX-License-Identifier: BUSL-1.1 cd /opt/gopath/src/github.com/hashicorp/packer && make dev diff --git a/tty.go b/tty.go index a6f16d122ac..62fa5203ffd 100644 --- a/tty.go +++ b/tty.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 //go:build !solaris // +build !solaris diff --git a/tty_solaris.go b/tty_solaris.go index 257db948865..ed40b7fdb82 100644 --- a/tty_solaris.go +++ b/tty_solaris.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package main diff --git a/version/version.go b/version/version.go index c474c80d650..2df08d2d71b 100644 --- a/version/version.go +++ b/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// SPDX-License-Identifier: BUSL-1.1 package version From 320fd8d6fbcdde6990db3efadff0f454acc48ab7 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 11 Aug 2023 15:19:13 -0400 Subject: [PATCH 061/156] Update licensing for product release pipeline (#12570) --- .copywrite.hcl | 4 ++-- .github/workflows/build.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.copywrite.hcl b/.copywrite.hcl index 2e86e1c3cc1..3cbd1daa501 100644 --- a/.copywrite.hcl +++ b/.copywrite.hcl @@ -1,6 +1,6 @@ project { - license = "MPL-2.0" - copyright_year = 2013 + license = "BUSL-1.1" + copyright_year = 2023 header_ignore = [ "*.hcl2spec.go", # generated code specs, since they'll be wiped out until we support adding the headers at generation-time "hcl2template/testdata/**", diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a756fc56013..c15c8c6acf5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -169,7 +169,7 @@ jobs: version: ${{ needs.set-product-version.outputs.product-version }} maintainer: "HashiCorp" homepage: "https://www.packer.io/docs" - license: "MPL-2.0" + license: "BUSL-1.1" binary: "dist/${{ env.REPO_NAME }}" deb_depends: "openssl" rpm_depends: "openssl" From c575946e4db49729913a78b7cc7db6091b142331 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 11 Aug 2023 15:20:50 -0400 Subject: [PATCH 062/156] Update terminology to reflect community editions of Packer (#12571) --- website/content/docs/commands/init.mdx | 2 +- website/content/docs/index.mdx | 2 +- website/content/docs/intro/index.mdx | 2 +- website/content/docs/partnerships.mdx | 2 +- website/content/guides/packer-on-cicd/trigger-tfe.mdx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/content/docs/commands/init.mdx b/website/content/docs/commands/init.mdx index e6209d2c15e..7b61ecbf13f 100644 --- a/website/content/docs/commands/init.mdx +++ b/website/content/docs/commands/init.mdx @@ -70,7 +70,7 @@ packer { } ``` -HashiCorp does not officially verify third party Packer plugins, plugins not under the HashiCorp namespace `hashicorp/*`; as with all open source tools, please do your own due diligence when using a new tool. +HashiCorp does not officially verify third party Packer plugins, plugins not under the HashiCorp namespace `hashicorp/*`; as with all community tools, please do your own due diligence when using a new tool. ## Plugin Selection diff --git a/website/content/docs/index.mdx b/website/content/docs/index.mdx index ad32aa8a02c..5fd386e1dc7 100644 --- a/website/content/docs/index.mdx +++ b/website/content/docs/index.mdx @@ -6,7 +6,7 @@ page_title: Documentation # Packer Documentation -[Packer](https://www.packer.io/) is an open source tool that enables you to create identical machine images for multiple platforms from a single source template. A common use case is creating "golden images" that teams across an organization can use in cloud infrastructure. +[Packer](https://www.packer.io/) is a community tool that enables you to create identical machine images for multiple platforms from a single source template. A common use case is creating "golden images" that teams across an organization can use in cloud infrastructure. To install Packer and learn the standard Packer workflow, try the [Get Started tutorials](/packer/tutorials). diff --git a/website/content/docs/intro/index.mdx b/website/content/docs/intro/index.mdx index 99f8175943e..d6fb56902f6 100644 --- a/website/content/docs/intro/index.mdx +++ b/website/content/docs/intro/index.mdx @@ -17,7 +17,7 @@ features. ## What is Packer? -Packer is an open source tool for creating identical machine images for multiple +Packer is a community tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer does not replace configuration diff --git a/website/content/docs/partnerships.mdx b/website/content/docs/partnerships.mdx index 2e87dfdb7c8..97d1ec526f6 100644 --- a/website/content/docs/partnerships.mdx +++ b/website/content/docs/partnerships.mdx @@ -15,7 +15,7 @@ This program is intended to be largely a self-service process with links and gui ### Types of Packer Integrations -Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. +Packer is a community tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer does not replace configuration management like Chef or Puppet. In fact, when building images, Packer is able to use tools like Chef or Puppet to install software onto the image. A machine image is a single static unit that contains a pre-configured operating system and installed software which is used to quickly create new running machines. Machine image formats change for each platform. Some examples include AMIs for EC2, VMDK/VMX files for VMware, OVF exports for VirtualBox, etc. To know more about use cases of Packer click ([Use Cases - Introduction | Packer by HashiCorp](/packer/docs/intro/use-cases)) diff --git a/website/content/guides/packer-on-cicd/trigger-tfe.mdx b/website/content/guides/packer-on-cicd/trigger-tfe.mdx index b43e282a6b2..14b2643bd1e 100644 --- a/website/content/guides/packer-on-cicd/trigger-tfe.mdx +++ b/website/content/guides/packer-on-cicd/trigger-tfe.mdx @@ -12,7 +12,7 @@ and used locally in development, like is often done with VirtualBox images with Vagrant. In most other cases, the new image will be used to provision new infrastructure. -[Terraform](https://www.terraform.io/) is an open source tool that is ideal for +[Terraform](https://www.terraform.io/) is a community tool that is ideal for provisioning new infrastructure with images generated by Packer, and [Terraform Enterprise](https://www.hashicorp.com/products/terraform/) is the best way to perform automated Terraform runs. From 2b32903fe388d78e9654b8362d0aafff97ad5fe3 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:44:32 -0400 Subject: [PATCH 063/156] Document PLSP-related environment variables Since we added support for PLSPs recently, and it will be released as part of 1.9.3, we add some documentation regarding the environment variables we added, and a note regarding their relation to PLSP support. --- website/content/docs/hcp/index.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/content/docs/hcp/index.mdx b/website/content/docs/hcp/index.mdx index b7af158ee26..d908cca70cc 100644 --- a/website/content/docs/hcp/index.mdx +++ b/website/content/docs/hcp/index.mdx @@ -35,6 +35,12 @@ You can set these additional environment variables to control how metadata is pu - `HCP_PACKER_REGISTRY` - When set, Packer does not push image metadata to HCP Packer from an otherwise configured template. Allowed values are [0|OFF]. +- `HCP_ORGANIZATION_ID` - The ID of the HCP organization linked to your service principal. This is environment variable is not required and available for the sole purpose of keeping parity with the HCP SDK authentication options. Its use may change in a future release. + +- `HCP_PROJECT_ID` - The ID of the HCP project to use. This is useful if your service principal has access to multiple projects, as by default Packer will pick the one created first as target. + +-> **Note**: The HCP_PROJECT_ID environment variable must be set if you're authenticating with a project-level service principal, otherwise Packer will attempt to get the list of projects for an organization and error due to a lack of permissions for a project-level service principal. This is supported starting with Packer 1.9.3; older versions of Packer do not support using project-level service principals. + ### HCP Packer Registry Block The only metadata that Packer can infer from a template with the basic configuration are the build name and build fingerprint. For HCL2 templates, we recommend adding the `hcp_packer_registry` block to your template so that you can customize the metadata that Packer sends to the registry. From a961adfb7033f757a9d35124bb06e7e2a6165618 Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 12:44:09 -0400 Subject: [PATCH 064/156] Update BUSL LICENSE to include licensed product and version. (#12575) Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 2ecf202e305..73957dc7d75 100644 --- a/LICENSE +++ b/LICENSE @@ -4,7 +4,7 @@ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved. Parameters Licensor: HashiCorp, Inc. -Licensed Work: The Licensed Work is (c) 2023 HashiCorp, Inc. +Licensed Work: Packer 1.10.0. The Licensed Work is (c) 2023 HashiCorp, Inc. Additional Use Grant: You may make production use of the Licensed Work, provided such use does not include offering the Licensed Work to third parties on a hosted or embedded basis which is From 50e8f507ca3198eadf4d28105f5d22f7cef95496 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 16 Aug 2023 19:18:27 +0000 Subject: [PATCH 065/156] Update CHANGELOG for 1.9.3 --- CHANGELOG.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c693c7fd3e..67394c78ee2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,38 @@ -## 1.9.3 (Upcoming) +## 1.9.3 (August 17, 2023) + +### NOTES: +* **New Docker Image**: As part of the bundled plugin removal effort, a new + Docker target called `release-full` has been added to the Packer release + artifacts. The release-full image includes Packer and all the official + plugins pre-installed in its environment. This image is being offered as an + alternative option for those users who may still be relying on the plugin + versions bundled into the Packer binary. + [GH-12532](https://github.com/hashicorp/packer/pull/12532) + +### IMPROVEMENTS: +* core/docs: Clarify the expected usage of the `packer init` command for HCL2 + template builds.[GH-12535](https://github.com/hashicorp/packer/pull/12535) +* core/hcp: Add support for project-level service principals. A user connecting + with a project level service principals must provide a valid HCP_PROJECT_ID + in order to connect. + [GH-12520](https://github.com/hashicorp/packer/pull/12520) + [GH-12576](https://github.com/hashicorp/packer/pull/12576) +* core: A new Docker image `packer:release-full` has been added for all + supported architectures. The release-full image includes Packer and all the + official plugins pre-installed in its environment. + [GH-12532](https://github.com/hashicorp/packer/pull/12532) +* core: Add enhanced support to Packer telemetry for bundle plugins usage. + [GH-12536](https://github.com/hashicorp/packer/pull/12536) + +### BUG FIXES: + +* core: Bump golang.org/x/net to v0.13.0 to address CVE GO-2023-1988. Packer + itself is not vulnerable to the CVE as we don't render web pages, but + security checks do point it as an issue that needs to be addressed. + [GH-12561](https://github.com/hashicorp/packer/pull/12561) +* core: Fix custom plugin loading in current working directory regression. + [GH-12544](https://github.com/hashicorp/packer/pull/12544) + ## 1.9.2 (July 19, 2023) From 999d751793324d368755000694ba82a5cecea509 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 17 Aug 2023 11:10:19 -0400 Subject: [PATCH 066/156] Rename duplicate ami name to fix failing test --- .../test-fixtures/basic_amazon_with_required_plugins.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl b/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl index f9ba5a55b2c..a30f85fa49e 100644 --- a/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl +++ b/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl @@ -12,7 +12,7 @@ source "amazon-ebs" "basic-test" { instance_type = "m3.medium" source_ami = "ami-76b2a71e" ssh_username = "ubuntu" - ami_name = "packer-plugin-bundled-amazon-ebs-test" + ami_name = "packer-plugin-external-amazon-ebs-test" } build { From f961715161804650cb82fb701ff2c001c146a6ed Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 17 Aug 2023 17:08:04 +0000 Subject: [PATCH 067/156] Prepare for 1.9.4 dev mode --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67394c78ee2..f040eba0233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.9.4 (Upcoming) + ## 1.9.3 (August 17, 2023) ### NOTES: From eb9e1a479537f3786b9f5ad48a414fce6aa9cb2c Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 9 Aug 2023 14:42:38 -0400 Subject: [PATCH 068/156] packer: remove implicit required plugins Since this feature is no longer something we plan to activate later, as it contradicts with our efforts to remove bundled plugins, and encouraging users to move to either manually installing plugins, or managing them through `packer init', we clean-up the code for this feature. --- command/init.go | 48 +---- command/plugins_install.go | 1 - command/plugins_installed.go | 1 - command/plugins_remove.go | 1 - hcl2template/parser.go | 18 +- hcl2template/plugin.go | 1 - hcl2template/types.required_plugins.go | 138 ------------- hcl2template/types.required_plugins_test.go | 218 +------------------- main.go | 66 ------ packer/plugin-getter/plugins.go | 3 - packer/plugin.go | 17 -- website/content/docs/commands/init.mdx | 12 -- 12 files changed, 8 insertions(+), 516 deletions(-) diff --git a/command/init.go b/command/init.go index 5a066d96276..ad9a7bcdd98 100644 --- a/command/init.go +++ b/command/init.go @@ -124,55 +124,13 @@ func (c *InitCommand) RunContext(buildCtx context.Context, cla *InitArgs) int { Getters: getters, }) if err != nil { - if pluginRequirement.Implicit { - msg := fmt.Sprintf(` -Warning! At least one component used in your config file(s) has moved out of -Packer into the %q plugin. -For that reason, Packer init tried to install the latest version of the %s -plugin. Unfortunately, this failed : -%s`, - pluginRequirement.Identifier, - pluginRequirement.Identifier.Type, - err) - c.Ui.Say(msg) - } else { - c.Ui.Error(fmt.Sprintf("Failed getting the %q plugin:", pluginRequirement.Identifier)) - c.Ui.Error(err.Error()) - ret = 1 - } + c.Ui.Error(fmt.Sprintf("Failed getting the %q plugin:", pluginRequirement.Identifier)) + c.Ui.Error(err.Error()) + ret = 1 } if newInstall != nil { - if pluginRequirement.Implicit { - msg := fmt.Sprintf("Installed implicitly required plugin %s %s in %q", pluginRequirement.Identifier, newInstall.Version, newInstall.BinaryPath) - ui.Say(msg) - - warn := fmt.Sprintf(` -Warning, at least one component used in your config file(s) has moved out of -Packer into the %[2]q plugin and is now being implicitly required. -For more details on implicitly required plugins see https://packer.io/docs/commands/init#implicit-required-plugin - -To avoid any backward incompatible changes with your -config file you may want to lock the plugin version by pasting the following to your config: - -packer { - required_plugins { - %[1]s = { - source = "%[2]s" - version = "~> %[3]s" - } - } -} -`, - pluginRequirement.Identifier.Type, - pluginRequirement.Identifier, - newInstall.Version, - ) - ui.Error(warn) - continue - } msg := fmt.Sprintf("Installed plugin %s %s in %q", pluginRequirement.Identifier, newInstall.Version, newInstall.BinaryPath) ui.Say(msg) - } } return ret diff --git a/command/plugins_install.go b/command/plugins_install.go index 7082f134a8f..3037c0959d0 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -77,7 +77,6 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args []stri // a plugin requirement that matches them all pluginRequirement := plugingetter.Requirement{ Identifier: plugin, - Implicit: false, } if len(args) > 1 { diff --git a/command/plugins_installed.go b/command/plugins_installed.go index 114c25b55a9..b19be4e5c33 100644 --- a/command/plugins_installed.go +++ b/command/plugins_installed.go @@ -64,7 +64,6 @@ func (c *PluginsInstalledCommand) RunContext(buildCtx context.Context) int { Accessor: "", VersionConstraints: nil, Identifier: nil, - Implicit: false, } installations, err := allPlugins.ListInstallations(opts) diff --git a/command/plugins_remove.go b/command/plugins_remove.go index ac8c0882b8f..07993f21a4e 100644 --- a/command/plugins_remove.go +++ b/command/plugins_remove.go @@ -74,7 +74,6 @@ func (c *PluginsRemoveCommand) RunContext(buildCtx context.Context, args []strin // a plugin requirement that matches them all pluginRequirement := plugingetter.Requirement{ Identifier: plugin, - Implicit: false, } if len(args) > 1 { diff --git a/hcl2template/parser.go b/hcl2template/parser.go index 43b43bcd6f0..fc9182bf04f 100644 --- a/hcl2template/parser.go +++ b/hcl2template/parser.go @@ -163,28 +163,14 @@ func (p *Parser) Parse(filename string, varFiles []string, argVars map[string]st return cfg, diags } - // Decode required_plugins blocks and create implicit required_plugins - // blocks. Implicit required_plugins blocks happen when a builder or another - // plugin cannot be found, for example if one uses : - // source "amazon-ebs" "example" { ... } - // And no `amazon-ebs` builder can be found. This will then be the - // equivalent of having : - // packer { - // required_plugins { - // amazon = { - // version = "latest" - // source = "github.com/hashicorp/amazon" - // } - // } + // Decode required_plugins blocks. + // // Note: using `latest` ( or actually an empty string ) in a config file // does not work and packer will ask you to pick a version { for _, file := range files { diags = append(diags, cfg.decodeRequiredPluginsBlock(file)...) } - for _, file := range files { - diags = append(diags, cfg.decodeImplicitRequiredPluginsBlocks(file)...) - } } // Decode variable blocks so that they are available later on. Here locals diff --git a/hcl2template/plugin.go b/hcl2template/plugin.go index 92b9cf2f30b..323263596f8 100644 --- a/hcl2template/plugin.go +++ b/hcl2template/plugin.go @@ -45,7 +45,6 @@ func (cfg *PackerConfig) PluginRequirements() (plugingetter.Requirements, hcl.Di Accessor: name, Identifier: block.Type, VersionConstraints: block.Requirement.Required, - Implicit: block.PluginDependencyReason == PluginDependencyImplicit, }) uniq[name] = block } diff --git a/hcl2template/types.required_plugins.go b/hcl2template/types.required_plugins.go index 94dfd4669b3..d5e010345ea 100644 --- a/hcl2template/types.required_plugins.go +++ b/hcl2template/types.required_plugins.go @@ -9,7 +9,6 @@ import ( "github.com/hashicorp/go-version" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/packer/hcl2template/addrs" - "github.com/hashicorp/packer/packer" "github.com/zclconf/go-cty/cty" ) @@ -44,127 +43,6 @@ func (cfg *PackerConfig) decodeRequiredPluginsBlock(f *hcl.File) hcl.Diagnostics return diags } -func (cfg *PackerConfig) decodeImplicitRequiredPluginsBlocks(f *hcl.File) hcl.Diagnostics { - // when a plugin is used but not available it should be 'implicitly - // required'. Here we read common configuration blocks to try to guess - // plugin usages. - - // decodeRequiredPluginsBlock needs to be called before - // decodeImplicitRequiredPluginsBlocks; otherwise all required plugins will - // be implicitly required too. - - var diags hcl.Diagnostics - - content, moreDiags := f.Body.Content(configSchema) - diags = append(diags, moreDiags...) - - for _, block := range content.Blocks { - - switch block.Type { - case sourceLabel: - diags = append(diags, cfg.decodeImplicitRequiredPluginsBlock(Builder, block)...) - case dataSourceLabel: - diags = append(diags, cfg.decodeImplicitRequiredPluginsBlock(Datasource, block)...) - case buildLabel: - content, _, moreDiags := block.Body.PartialContent(buildSchema) - diags = append(diags, moreDiags...) - for _, block := range content.Blocks { - - switch block.Type { - case buildProvisionerLabel: - diags = append(diags, cfg.decodeImplicitRequiredPluginsBlock(Provisioner, block)...) - case buildPostProcessorLabel: - diags = append(diags, cfg.decodeImplicitRequiredPluginsBlock(PostProcessor, block)...) - case buildPostProcessorsLabel: - content, _, moreDiags := block.Body.PartialContent(postProcessorsSchema) - diags = append(diags, moreDiags...) - for _, block := range content.Blocks { - - switch block.Type { - case buildPostProcessorLabel: - diags = append(diags, cfg.decodeImplicitRequiredPluginsBlock(PostProcessor, block)...) - } - } - } - } - - } - } - return diags -} - -func (cfg *PackerConfig) decodeImplicitRequiredPluginsBlock(k ComponentKind, block *hcl.Block) hcl.Diagnostics { - if len(block.Labels) == 0 { - // malformed block ? Let's not panic :) - return nil - } - // Currently all block types are `type "component-kind" ["name"] {` - // this makes this simple. - componentName := block.Labels[0] - - store := map[ComponentKind]packer.BasicStore{ - Builder: cfg.parser.PluginConfig.Builders, - PostProcessor: cfg.parser.PluginConfig.PostProcessors, - Provisioner: cfg.parser.PluginConfig.Provisioners, - Datasource: cfg.parser.PluginConfig.DataSources, - }[k] - if store.Has(componentName) { - // If any core or pre-loaded plugin defines the `happycloud-uploader` - // pp, skip. This happens for core and manually installed plugins, as - // they will be listed in the PluginConfig before parsing any HCL. - return nil - } - - redirect := map[ComponentKind]map[string]string{ - Builder: cfg.parser.PluginConfig.BuilderRedirects, - PostProcessor: cfg.parser.PluginConfig.PostProcessorRedirects, - Provisioner: cfg.parser.PluginConfig.ProvisionerRedirects, - Datasource: cfg.parser.PluginConfig.DatasourceRedirects, - }[k][componentName] - - if redirect == "" { - // no known redirect for this component - return nil - } - - redirectAddr, diags := addrs.ParsePluginSourceString(redirect) - if diags.HasErrors() { - // This should never happen, since the map is manually filled. - return diags - } - - for _, req := range cfg.Packer.RequiredPlugins { - if _, found := req.RequiredPlugins[redirectAddr.Type]; found { - // This could happen if a plugin was forked. For example, I forked - // the github.com/hashicorp/happycloud plugin into - // github.com/azr/happycloud that is required in my config file; and - // am using the `happycloud-uploader` pp component from it. In that - // case - and to avoid miss-requires - we won't implicitly import - // any other `happycloud` plugin. - return nil - } - } - - cfg.implicitlyRequirePlugin(redirectAddr) - return nil -} - -func (cfg *PackerConfig) implicitlyRequirePlugin(plugin *addrs.Plugin) { - cfg.Packer.RequiredPlugins = append(cfg.Packer.RequiredPlugins, &RequiredPlugins{ - RequiredPlugins: map[string]*RequiredPlugin{ - plugin.Type: { - Name: plugin.Type, - Source: plugin.String(), - Type: plugin, - Requirement: VersionConstraint{ - Required: nil, // means latest - }, - PluginDependencyReason: PluginDependencyImplicit, - }, - }, - }) -} - // RequiredPlugin represents a declaration of a dependency on a particular // Plugin version or source. type RequiredPlugin struct { @@ -177,24 +55,8 @@ type RequiredPlugin struct { Type *addrs.Plugin Requirement VersionConstraint DeclRange hcl.Range - PluginDependencyReason } -// PluginDependencyReason is an enumeration of reasons why a dependency might be -// present. -type PluginDependencyReason int - -const ( - // PluginDependencyExplicit means that there is an explicit - // "required_plugin" block in the configuration. - PluginDependencyExplicit PluginDependencyReason = iota - - // PluginDependencyImplicit means that there is no explicit - // "required_plugin" block but there is at least one resource that uses this - // plugin. - PluginDependencyImplicit -) - type RequiredPlugins struct { RequiredPlugins map[string]*RequiredPlugin DeclRange hcl.Range diff --git a/hcl2template/types.required_plugins_test.go b/hcl2template/types.required_plugins_test.go index 5e2b4a90c96..0329d1505ff 100644 --- a/hcl2template/types.required_plugins_test.go +++ b/hcl2template/types.required_plugins_test.go @@ -46,7 +46,6 @@ func TestPackerConfig_required_plugin_parse(t *testing.T) { Requirement: VersionConstraint{ Required: mustVersionConstraints(version.NewConstraint("~> v1.2.3")), }, - PluginDependencyReason: PluginDependencyExplicit, }, }}, }, @@ -77,19 +76,13 @@ func TestPackerConfig_required_plugin_parse(t *testing.T) { Requirement: VersionConstraint{ Required: mustVersionConstraints(version.NewConstraint("~> v1.2.3")), }, - PluginDependencyReason: PluginDependencyExplicit, }, }}, }, }, }}, {"required_plugin_forked", PackerConfig{ - parser: getBasicParser(func(p *Parser) { - p.PluginConfig.BuilderRedirects = map[string]string{ - "amazon-chroot": "github.com/hashicorp/amazon", - } - }, - )}, ` + parser: getBasicParser(func(p *Parser) {})}, ` packer { required_plugins { amazon = { @@ -114,19 +107,13 @@ func TestPackerConfig_required_plugin_parse(t *testing.T) { Requirement: VersionConstraint{ Required: mustVersionConstraints(version.NewConstraint("~> v1.2.3")), }, - PluginDependencyReason: PluginDependencyExplicit, }, }}, }, }, }}, {"missing-required-plugin-for-pre-defined-builder", PackerConfig{ - parser: getBasicParser(func(p *Parser) { - p.PluginConfig.BuilderRedirects = map[string]string{ - "amazon-ebs": "github.com/hashicorp/amazon", - } - }, - )}, + parser: getBasicParser(func(p *Parser) {})}, ` packer { }`, ` @@ -143,202 +130,6 @@ func TestPackerConfig_required_plugin_parse(t *testing.T) { RequiredPlugins: nil, }, }}, - {"missing-required-plugin-for-builder", PackerConfig{ - parser: getBasicParser(func(p *Parser) { - p.PluginConfig.BuilderRedirects = map[string]string{ - "amazon-chroot": "github.com/hashicorp/amazon", - } - }, - )}, - ` - packer { - }`, ` - source "amazon-chroot" "example" { - } - `, - false, - PackerConfig{ - Packer: struct { - VersionConstraints []VersionConstraint - RequiredPlugins []*RequiredPlugins - }{ - RequiredPlugins: []*RequiredPlugins{ - {RequiredPlugins: map[string]*RequiredPlugin{ - "amazon": { - Name: "amazon", - Source: "github.com/hashicorp/amazon", - Type: &addrs.Plugin{Hostname: "github.com", Namespace: "hashicorp", Type: "amazon"}, - Requirement: VersionConstraint{ - Required: nil, - }, - PluginDependencyReason: PluginDependencyImplicit, - }, - }}, - }, - }, - }}, - {"missing-required-plugin-for-provisioner", PackerConfig{ - parser: getBasicParser(func(p *Parser) { - p.PluginConfig.ProvisionerRedirects = map[string]string{ - "ansible-local": "github.com/ansible/ansible", - } - }, - )}, - ` - packer { - }`, ` - build { - provisioner "ansible-local" {} - } - `, - false, - PackerConfig{ - Packer: struct { - VersionConstraints []VersionConstraint - RequiredPlugins []*RequiredPlugins - }{ - RequiredPlugins: []*RequiredPlugins{ - {RequiredPlugins: map[string]*RequiredPlugin{ - "ansible": { - Name: "ansible", - Source: "github.com/ansible/ansible", - Type: &addrs.Plugin{Hostname: "github.com", Namespace: "ansible", Type: "ansible"}, - Requirement: VersionConstraint{ - Required: nil, - }, - PluginDependencyReason: PluginDependencyImplicit, - }, - }}, - }, - }, - }}, - {"missing-required-plugin-for-post-processor", PackerConfig{ - parser: getBasicParser(func(p *Parser) { - p.PluginConfig.PostProcessorRedirects = map[string]string{ - "docker-push": "github.com/hashicorp/docker", - } - }, - )}, - ` - packer { - }`, ` - build { - post-processor "docker-push" {} - } - `, - false, - PackerConfig{ - Packer: struct { - VersionConstraints []VersionConstraint - RequiredPlugins []*RequiredPlugins - }{ - RequiredPlugins: []*RequiredPlugins{ - {RequiredPlugins: map[string]*RequiredPlugin{ - "docker": { - Name: "docker", - Source: "github.com/hashicorp/docker", - Type: &addrs.Plugin{Hostname: "github.com", Namespace: "hashicorp", Type: "docker"}, - Requirement: VersionConstraint{ - Required: nil, - }, - PluginDependencyReason: PluginDependencyImplicit, - }, - }}, - }, - }, - }}, - {"missing-required-plugin-for-nested-post-processor", PackerConfig{ - parser: getBasicParser(func(p *Parser) { - p.PluginConfig.PostProcessorRedirects = map[string]string{ - "docker-push": "github.com/hashicorp/docker", - } - }, - )}, - ` - packer { - }`, ` - build { - post-processors { - post-processor "docker-push" { - } - } - } - `, - false, - PackerConfig{ - Packer: struct { - VersionConstraints []VersionConstraint - RequiredPlugins []*RequiredPlugins - }{ - RequiredPlugins: []*RequiredPlugins{ - {RequiredPlugins: map[string]*RequiredPlugin{ - "docker": { - Name: "docker", - Source: "github.com/hashicorp/docker", - Type: &addrs.Plugin{Hostname: "github.com", Namespace: "hashicorp", Type: "docker"}, - Requirement: VersionConstraint{ - Required: nil, - }, - PluginDependencyReason: PluginDependencyImplicit, - }, - }}, - }, - }, - }}, - - {"required-plugin-renamed", PackerConfig{ - parser: getBasicParser(func(p *Parser) { - p.PluginConfig.BuilderRedirects = map[string]string{ - "amazon-chroot": "github.com/hashicorp/amazon", - } - }, - )}, - ` - packer { - required_plugins { - amazon-v1 = { - source = "github.com/hashicorp/amazon" - version = "~> v1.0" - } - } - }`, ` - source "amazon-v1-chroot" "example" { - } - source "amazon-chroot" "example" { - } - `, - false, - PackerConfig{ - Packer: struct { - VersionConstraints []VersionConstraint - RequiredPlugins []*RequiredPlugins - }{ - RequiredPlugins: []*RequiredPlugins{ - {RequiredPlugins: map[string]*RequiredPlugin{ - "amazon-v1": { - Name: "amazon-v1", - Source: "github.com/hashicorp/amazon", - Type: &addrs.Plugin{Hostname: "github.com", Namespace: "hashicorp", Type: "amazon"}, - Requirement: VersionConstraint{ - Required: mustVersionConstraints(version.NewConstraint("~> v1.0")), - }, - PluginDependencyReason: PluginDependencyExplicit, - }, - }}, - {RequiredPlugins: map[string]*RequiredPlugin{ - "amazon": { - Name: "amazon", - Source: "github.com/hashicorp/amazon", - Type: &addrs.Plugin{Hostname: "github.com", Namespace: "hashicorp", Type: "amazon"}, - Requirement: VersionConstraint{ - Required: nil, - }, - PluginDependencyReason: PluginDependencyImplicit, - }, - }}, - }, - }, - }}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -351,13 +142,10 @@ func TestPackerConfig_required_plugin_parse(t *testing.T) { t.Fatal(diags) } - rest, diags := cfg.parser.ParseHCL([]byte(tt.restOfTemplate), "rest.pkr.hcl") + _, diags = cfg.parser.ParseHCL([]byte(tt.restOfTemplate), "rest.pkr.hcl") if len(diags) > 0 { t.Fatal(diags) } - if gotDiags := cfg.decodeImplicitRequiredPluginsBlocks(rest); (len(gotDiags) > 0) != tt.wantDiags { - t.Fatal(gotDiags) - } if diff := cmp.Diff(tt.wantConfig, cfg, cmpOpts...); diff != "" { t.Errorf("PackerConfig.inferImplicitRequiredPluginFromBlocks() unexpected PackerConfig: %v", diff) } diff --git a/main.go b/main.go index 0d39d70d579..972f7170c68 100644 --- a/main.go +++ b/main.go @@ -325,72 +325,6 @@ func loadConfig() (*config, error) { PluginMinPort: 10000, PluginMaxPort: 25000, KnownPluginFolders: packer.PluginFolders("."), - - // BuilderRedirects - BuilderRedirects: map[string]string{ - - //"amazon-chroot": "github.com/hashicorp/amazon", - //"amazon-ebs": "github.com/hashicorp/amazon", - //"amazon-ebssurrogate": "github.com/hashicorp/amazon", - //"amazon-ebsvolume": "github.com/hashicorp/amazon", - //"amazon-instance": "github.com/hashicorp/amazon", - - //"azure-arm": "github.com/hashicorp/azure", - //"azure-chroot": "github.com/hashicorp/azure", - //"azure-dtl": "github.com/hashicorp/azure", - - //"docker": "github.com/hashicorp/docker", - - //"exoscale": "github.com/exoscale/exoscale", - - //"googlecompute": "github.com/hashicorp/googlecompute", - - //"parallels-iso": "github.com/hashicorp/parallels", - //"parallels-pvm": "github.com/hashicorp/parallels", - - //"qemu": "github.com/hashicorp/qemu", - - //"vagrant": "github.com/hashicorp/vagrant", - - //"virtualbox-iso": "github.com/hashicorp/virtualbox", - //"virtualbox-ovf": "github.com/hashicorp/virtualbox", - //"virtualbox-vm": "github.com/hashicorp/virtualbox", - - //"vmware-iso": "github.com/hashicorp/vmware", - //"vmware-vmx": "github.com/hashicorp/vmware", - - //"vsphere-iso": "github.com/hashicorp/vsphere", - //"vsphere-clone": "github.com/hashicorp/vsphere", - }, - DatasourceRedirects: map[string]string{ - //"amazon-ami": "github.com/hashicorp/amazon", - //"amazon-secretsmanager": "github.com/hashicorp/amazon", - }, - ProvisionerRedirects: map[string]string{ - //"ansible": "github.com/hashicorp/ansible", - //"ansible-local": "github.com/hashicorp/ansible", - - //"azure-dtlartifact": "github.com/hashicorp/azure", - }, - PostProcessorRedirects: map[string]string{ - //"amazon-import": "github.com/hashicorp/amazon", - - //"docker-import": "github.com/hashicorp/docker", - //"docker-push": "github.com/hashicorp/docker", - //"docker-save": "github.com/hashicorp/docker", - //"docker-tag": "github.com/hashicorp/docker", - - //"googlecompute-export": "github.com/hashicorp/googlecompute", - //"googlecompute-import": "github.com/hashicorp/googlecompute", - - //"exoscale-import": "github.com/exoscale/exoscale", - - //"vagrant": "github.com/hashicorp/vagrant", - //"vagrant-cloud": "github.com/hashicorp/vagrant", - - //"vsphere": "github.com/hashicorp/vsphere", - //"vsphere-template": "github.com/hashicorp/vsphere", - }, } if err := config.Plugins.Discover(); err != nil { return nil, err diff --git a/packer/plugin-getter/plugins.go b/packer/plugin-getter/plugins.go index b16edcfade0..92f7e28a8e7 100644 --- a/packer/plugin-getter/plugins.go +++ b/packer/plugin-getter/plugins.go @@ -43,9 +43,6 @@ type Requirement struct { // VersionConstraints as defined by user. Empty ( to be avoided ) means // highest found version. VersionConstraints version.Constraints - - // was this require implicitly guessed ? - Implicit bool } type BinaryInstallationOptions struct { diff --git a/packer/plugin.go b/packer/plugin.go index c88f54f86b3..313ef2db31e 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -34,23 +34,6 @@ type PluginConfig struct { Provisioners ProvisionerSet PostProcessors PostProcessorSet DataSources DatasourceSet - - // Redirects are only set when a plugin was completely moved out; they allow - // telling where a plugin has moved by checking if a known component of this - // plugin is used. For example implicitly require the - // github.com/hashicorp/amazon plugin if it was moved out and the - // "amazon-ebs" plugin is used, but not found. - // - // Redirects will be bypassed if the redirected components are already found - // in their corresponding sets (Builders, Provisioners, PostProcessors, - // DataSources). That is, for example, if you manually put a single - // component plugin in the plugins folder. - // - // Example BuilderRedirects: "amazon-ebs" => "github.com/hashicorp/amazon" - BuilderRedirects map[string]string - DatasourceRedirects map[string]string - ProvisionerRedirects map[string]string - PostProcessorRedirects map[string]string } // PACKERSPACE is used to represent the spaces that separate args for a command diff --git a/website/content/docs/commands/init.mdx b/website/content/docs/commands/init.mdx index 7b61ecbf13f..940751c5b67 100644 --- a/website/content/docs/commands/init.mdx +++ b/website/content/docs/commands/init.mdx @@ -87,18 +87,6 @@ Directory](/packer/docs/configure#packer-s-plugin-directory). See [Installing Plugins](/packer/docs/plugins#installing-plugins) for more information on how plugin installation works. -### Implicit required plugin - -This is part of a set of breaking changes made to decouple Packer releases from -plugin releases. To make the transition easier, we will tag components of these -plugins as "moved out". If one of the components of a moved out plugin is used -in a config file, but there is no mention of that plugin in the -"required_plugin" block, then Packer init will automatically download and -install that plugin. Packer will then display a warning and suggest that you -add the plugin to your required_plugin block. We recommend you use the -required_plugin block even if you are only using official plugins, because it -allows you to set the plugin version to avoid surprises in the future. - ## Options - `-upgrade` - On top of installing missing plugins, update installed plugins to From f8ebf69c0de67c0a297d2d5c64dd962989ad59fd Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 18 Aug 2023 06:26:08 -0400 Subject: [PATCH 069/156] telemetry: Add nil check in SetBundledUsage Invoking Packer with the CHECKPOINT_DISABLE env. variable the telemetry reporter is left uninitialized in order to disable telemetry reporting. Any method calls on the nil reporter is expected to check if the reporter is active or in NOOP mode. This change fixes a crash when calling SetBundledUsage() on a nil CheckpointTelemetry type that occurs when using a bundled plugin with CHECKPOINT_DISABLE=1. --- packer/telemetry.go | 3 +++ packer/telemetry_test.go | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/packer/telemetry.go b/packer/telemetry.go index 9a7f569139e..c3d0573ef5e 100644 --- a/packer/telemetry.go +++ b/packer/telemetry.go @@ -132,6 +132,9 @@ func (c *CheckpointTelemetry) SetTemplateType(t PackerTemplateType) { // SetBundledUsage marks the template as using bundled plugins func (c *CheckpointTelemetry) SetBundledUsage() { + if c == nil { + return + } c.useBundled = true } diff --git a/packer/telemetry_test.go b/packer/telemetry_test.go index ab304a55023..7abc600cda1 100644 --- a/packer/telemetry_test.go +++ b/packer/telemetry_test.go @@ -4,6 +4,7 @@ package packer import ( + "errors" "testing" "github.com/stretchr/testify/assert" @@ -33,3 +34,24 @@ func TestFlattenConfigKeys_nested(t *testing.T) { "Input didn't flatten correctly.", ) } + +func TestCheckpointTelemetry(t *testing.T) { + defer func() { + if r := recover(); r != nil { + t.Error("a noop CheckpointTelemetry should not to panic but it did\n", r) + } + }() + + // A null CheckpointTelemetry obtained in Packer when the CHECKPOINT_DISABLE env var is set results in a NOOP reporter + // The null reporter can be executable as a configured reporter but does not report any telemetry data. + var c *CheckpointTelemetry + c.SetTemplateType(HCL2Template) + c.SetBundledUsage() + c.AddSpan("mockprovisioner", "provisioner", nil) + if err := c.ReportPanic("Bogus Panic"); err != nil { + t.Errorf("calling ReportPanic on a nil checkpoint reporter should not error") + } + if err := c.Finalize("test", 1, errors.New("Bogus Error")); err != nil { + t.Errorf("calling Finalize on a nil checkpoint reporter should not error") + } +} From 42da69e2bd93881bf23a2e5600791c7edd00f7f9 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 18 Aug 2023 10:32:43 -0400 Subject: [PATCH 070/156] CHANGELOG: cut 1.9.4 release --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f040eba0233..1f484095466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ -## 1.9.4 (Upcoming) +## 1.9.4 (August 18, 2023) + +### BUG FIXES: + +* core: When invoking Packer with the CHECKPOINT_DISABLE environment variable the telemetry + reporter is left uninitialized in order to disable telemetry reporting. + Any method calls on the nil reporter is expected to check if the reporter is active or in + NOOP mode. The SetBundledUsage function, introduced in Packer 1.9.2, failed to perform a nil + check before attempting to modify an attribute, causing Packer to fail when telemetry is + disabled. This release fixes this issue by introducing such a check. ## 1.9.3 (August 17, 2023) From a0cb19927c3f1ac4c98e0770bcad1efdfbbb4475 Mon Sep 17 00:00:00 2001 From: Jamie Finnigan Date: Fri, 18 Aug 2023 10:18:53 -0700 Subject: [PATCH 071/156] .go-version: bump version of Go to 1.20.7 --- .go-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.go-version b/.go-version index 0bd54efd316..8909929f6e7 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.4 +1.20.7 From 3c6e3f52ceee74232fb3b65007443586cb616214 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 18 Aug 2023 15:24:28 -0400 Subject: [PATCH 072/156] CHANGELOG: preparing for 1.9.5 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f484095466..5810f01c34d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.9.5 (Upcoming) + ## 1.9.4 (August 18, 2023) ### BUG FIXES: From ebdee64c643ae5ad22c4853ec6c64731bae5f310 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 18 Aug 2023 15:48:22 -0400 Subject: [PATCH 073/156] Bump backport assistant to latest version --- .github/workflows/backport.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index bb6e5b88158..8e4ebf5e0b2 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -16,7 +16,7 @@ jobs: contents: none if: github.event.pull_request.merged runs-on: ubuntu-latest - container: hashicorpdev/backport-assistant:0.2.3 + container: hashicorpdev/backport-assistant:0.3.4 steps: - name: Backport changes to stable-website run: | From fa663b47bfaac0eef5d836db407c6ca848a331ab Mon Sep 17 00:00:00 2001 From: cjlapao Date: Fri, 25 Aug 2023 10:31:06 +0100 Subject: [PATCH 074/156] Updating Community Tools webpage Adding Parallels Packer Example --- website/content/docs/community-tools.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/content/docs/community-tools.mdx b/website/content/docs/community-tools.mdx index ea75ef3df23..3a222f17a75 100644 --- a/website/content/docs/community-tools.mdx +++ b/website/content/docs/community-tools.mdx @@ -65,6 +65,9 @@ contribution here! to automate the creation of virtual machine images and their guest operating systems on VMware vSphere using HashiCorp Packer and the Packer Plugin for VMware vSphere (vsphere-iso). +- [Parallels/packer-examples](https://github.com/parallels/packer-examples) - Examples in how to use Packer with Parallels Desktop + to automate the creation of virtual machine images and their guest operating systems on macOS, windows and linux. + ## Wrappers - [packer-config](https://github.com/ianchesal/packer-config) - a Ruby model that lets you build Packer configurations in Ruby From 2325c7e9c7da938cd7b0c57fb30447fbcf0e1f67 Mon Sep 17 00:00:00 2001 From: Ilya Voronin Date: Fri, 18 Aug 2023 16:48:33 +0500 Subject: [PATCH 075/156] Set ivoronin/packer-plugin-sshkey version to 'latest' --- website/data/plugins-manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/data/plugins-manifest.json b/website/data/plugins-manifest.json index 675c8e7271d..2647475cb9e 100644 --- a/website/data/plugins-manifest.json +++ b/website/data/plugins-manifest.json @@ -287,7 +287,7 @@ "path": "sshkey", "repo": "ivoronin/packer-plugin-sshkey", "pluginTier": "community", - "version": "v1.0.1" + "version": "latest" }, { "title": "Tart", From 48e8c3e680549e4bce8a106ddc1c4c5d825aad6e Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 11 Aug 2023 14:46:03 +0000 Subject: [PATCH 076/156] Update version output for `-v` and `--version` flags The flags -v and --version are handled by the CLI runner, which outputs the raw version string. This change shortcuts the handling of the flags to force Packer to run the version subcommand. Closes: #12565 --- main.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.go b/main.go index 972f7170c68..834d040409a 100644 --- a/main.go +++ b/main.go @@ -252,6 +252,16 @@ func wrappedMain() int { Ui: ui, } + //versionCLIHelper shortcuts "--version" and "-v" to just show the version + versionCLIHelper := &cli.CLI{ + Args: args, + Version: version.Version, + } + if versionCLIHelper.IsVersion() && versionCLIHelper.Version != "" { + // by default version flags ignore all other args so there is no need to persist the original args. + args = []string{"version"} + } + cli := &cli.CLI{ Args: args, Autocomplete: true, From 318529f373e76b314b962874c3b6324e1238b7d1 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 6 Sep 2023 11:07:35 -0400 Subject: [PATCH 077/156] hcl2template: remove value validation for locals Local variables can't have a validation block in their definition, so this step in not useful and should be removed. Besides, since the validation was done on the local variables before evaluation, it did nothing at all, as the PackerConfig.LocalVariables collection gets populated during evaluation, so this is essentially a no-op, and can be safely removed. --- hcl2template/parser.go | 1 - 1 file changed, 1 deletion(-) diff --git a/hcl2template/parser.go b/hcl2template/parser.go index fc9182bf04f..c372a7733a9 100644 --- a/hcl2template/parser.go +++ b/hcl2template/parser.go @@ -295,7 +295,6 @@ func filterVarsFromLogs(inputOrLocal Variables) { func (cfg *PackerConfig) Initialize(opts packer.InitializeOptions) hcl.Diagnostics { diags := cfg.InputVariables.ValidateValues() - diags = append(diags, cfg.LocalVariables.ValidateValues()...) diags = append(diags, cfg.evaluateDatasources(opts.SkipDatasourcesExecution)...) diags = append(diags, checkForDuplicateLocalDefinition(cfg.LocalBlocks)...) diags = append(diags, cfg.evaluateLocalVariables(cfg.LocalBlocks)...) From 6fa0d25c5107b19c33e8e87a3314397def5b633f Mon Sep 17 00:00:00 2001 From: "Sk.Lv" Date: Fri, 4 Aug 2023 10:52:38 +0800 Subject: [PATCH 078/156] website: register ksyun docuement --- website/data/plugins-manifest.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/data/plugins-manifest.json b/website/data/plugins-manifest.json index 2647475cb9e..ae900b68e70 100644 --- a/website/data/plugins-manifest.json +++ b/website/data/plugins-manifest.json @@ -373,5 +373,12 @@ "repo": "hashicorp/packer-plugin-yandex", "version": "latest", "pluginTier": "community" + }, + { + "title": "Ksyun", + "path": "ksyun", + "repo": "kingsoftcloud/packer-plugin-ksyun", + "pluginTier": "community", + "version": "latest" } ] From 7f7567f68626a8a9752c77c04fcb4ec1b0b1bd83 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 15 Sep 2023 08:55:44 -0400 Subject: [PATCH 079/156] Remove plugins on the integration framework The active plugins that resided in a HashiCorp repository have been migrated to the integrations framework and no longer need to be listed within the plugins-manifest file. --- website/data/plugins-manifest.json | 234 ----------------------------- 1 file changed, 234 deletions(-) diff --git a/website/data/plugins-manifest.json b/website/data/plugins-manifest.json index ae900b68e70..63d9d26998b 100644 --- a/website/data/plugins-manifest.json +++ b/website/data/plugins-manifest.json @@ -1,18 +1,4 @@ [ - { - "title": "1&1", - "path": "oneandone", - "repo": "hashicorp/packer-plugin-oneandone", - "pluginTier": "community", - "version": "latest" - }, - { - "title": "Alibaba Cloud", - "path": "alicloud", - "repo": "hashicorp/packer-plugin-alicloud", - "pluginTier": "community", - "version": "latest" - }, { "title": "Anka", "path": "anka", @@ -21,49 +7,6 @@ "sourceBranch": "master", "version": "latest" }, - { - "title": "Ansible", - "path": "ansible", - "repo": "hashicorp/packer-plugin-ansible", - "version": "latest" - }, - { - "title": "Amazon EC2", - "path": "amazon", - "repo": "hashicorp/packer-plugin-amazon", - "version": "latest", - "isHcpPackerReady": true - }, - { - "title": "Azure", - "path": "azure", - "repo": "hashicorp/packer-plugin-azure", - "version": "latest", - "isHcpPackerReady": true - }, - { - "title": "Chef", - "path": "chef", - "repo": "hashicorp/packer-plugin-chef", - "pluginTier": "community", - "version": "latest", - "archived": true - }, - { - "title": "CloudStack", - "path": "cloudstack", - "repo": "hashicorp/packer-plugin-cloudstack", - "pluginTier": "community", - "version": "latest" - }, - { - "title": "Converge", - "path": "converge", - "repo": "hashicorp/packer-plugin-converge", - "pluginTier": "community", - "version": "latest", - "archived": true - }, { "title": "DigitalOcean", "path": "digitalocean", @@ -72,13 +15,6 @@ "version": "latest", "isHcpPackerReady": true }, - { - "title": "Docker", - "path": "docker", - "repo": "hashicorp/packer-plugin-docker", - "version": "latest", - "isHcpPackerReady": true - }, { "title": "External", "path": "external", @@ -93,13 +29,6 @@ "version": "latest", "sourceBranch": "main" }, - { - "title": "Google Cloud Platform", - "path": "googlecompute", - "repo": "hashicorp/packer-plugin-googlecompute", - "version": "latest", - "isHcpPackerReady": true - }, { "title": "Gridscale", "path": "gridscale", @@ -108,49 +37,6 @@ "pluginTier": "verified", "isHcpPackerReady": false }, - { - "title": "HashiCups", - "path": "hashicups", - "repo": "hashicorp/packer-plugin-hashicups", - "version": "latest", - "isHcpPackerReady": false - }, - { - "title": "Hetzner Cloud", - "path": "hetzner-cloud", - "repo": "hashicorp/packer-plugin-hcloud", - "version": "latest", - "pluginTier": "community" - }, - { - "title": "HyperOne", - "path": "hyperone", - "repo": "hashicorp/packer-plugin-hyperone", - "version": "latest", - "pluginTier": "community" - }, - { - "title": "Hyper-V", - "path": "hyperv", - "repo": "hashicorp/packer-plugin-hyperv", - "version": "latest", - "pluginTier": "community" - }, - { - "title": "InSpec", - "path": "inspec", - "repo": "hashicorp/packer-plugin-inspec", - "pluginTier": "community", - "version": "latest", - "archived": true - }, - { - "title": "JD Cloud", - "path": "jdcloud", - "repo": "hashicorp/packer-plugin-jdcloud", - "pluginTier": "community", - "version": "latest" - }, { "title": "Kamatera", "path": "kamatera", @@ -173,20 +59,6 @@ "pluginTier": "community", "version": "latest" }, - { - "title": "LXC", - "path": "lxc", - "repo": "hashicorp/packer-plugin-lxc", - "pluginTier": "community", - "version": "latest" - }, - { - "title": "LXD", - "path": "lxd", - "repo": "hashicorp/packer-plugin-lxd", - "pluginTier": "community", - "version": "latest" - }, { "title": "Mondoo", "path": "mondoo", @@ -194,13 +66,6 @@ "pluginTier": "verified", "version": "latest" }, - { - "title": "Naver Cloud", - "path": "ncloud", - "repo": "hashicorp/packer-plugin-ncloud", - "pluginTier": "community", - "version": "latest" - }, { "title": "Nutanix", "path": "nutanix", @@ -209,21 +74,6 @@ "pluginTier": "verified", "sourceBranch": "main" }, - { - "title": "OpenStack", - "path": "openstack", - "repo": "hashicorp/packer-plugin-openstack", - "pluginTier": "community", - "version": "latest" - }, - { - "title": "Oracle", - "path": "oracle", - "repo": "hashicorp/packer-plugin-oracle", - "pluginTier": "community", - "version": "latest", - "isHcpPackerReady": true - }, { "title": "Outscale", "path": "outscale", @@ -239,42 +89,6 @@ "version": "latest", "pluginTier": "verified" }, - { - "title": "Profitbricks", - "path": "profitbricks", - "repo": "hashicorp/packer-plugin-profitbricks", - "pluginTier": "community", - "version": "latest" - }, - { - "title": "Proxmox", - "path": "proxmox", - "repo": "hashicorp/packer-plugin-proxmox", - "pluginTier": "community", - "version": "latest" - }, - { - "title": "Puppet", - "path": "puppet", - "repo": "hashicorp/packer-plugin-puppet", - "version": "latest", - "pluginTier": "community", - "archived": true - }, - { - "title": "QEMU", - "path": "qemu", - "repo": "hashicorp/packer-plugin-qemu", - "version": "latest" - }, - { - "title": "Salt", - "path": "salt", - "repo": "hashicorp/packer-plugin-salt", - "pluginTier": "community", - "version": "latest", - "archived": true - }, { "title": "Scaleway", "path": "scaleway", @@ -296,20 +110,6 @@ "pluginTier": "community", "version": "latest" }, - { - "title": "Tencent Cloud", - "path": "tencentcloud", - "repo": "hashicorp/packer-plugin-tencentcloud", - "pluginTier": "community", - "version": "latest" - }, - { - "title": "Triton", - "path": "triton", - "repo": "hashicorp/packer-plugin-triton", - "pluginTier": "community", - "version": "latest" - }, { "title": "UCloud", "path": "ucloud", @@ -326,20 +126,6 @@ "sourceBranch": "master", "isHcpPackerReady": true }, - { - "title": "Vagrant", - "path": "vagrant", - "repo": "hashicorp/packer-plugin-vagrant", - "pluginTier": "official", - "version": "latest" - }, - { - "title": "VirtualBox", - "path": "virtualbox", - "repo": "hashicorp/packer-plugin-virtualbox", - "pluginTier": "official", - "version": "latest" - }, { "title": "Volcengine", "path": "volcengine", @@ -347,19 +133,6 @@ "pluginTier": "community", "version": "latest" }, - { - "title": "VMware vSphere", - "path": "vsphere", - "repo": "hashicorp/packer-plugin-vsphere", - "version": "latest", - "isHcpPackerReady": true - }, - { - "title": "VMware", - "path": "vmware", - "repo": "hashicorp/packer-plugin-vmware", - "version": "latest" - }, { "title": "Vultr", "path": "vultr", @@ -367,13 +140,6 @@ "pluginTier": "community", "version": "latest" }, - { - "title": "Yandex", - "path": "yandex", - "repo": "hashicorp/packer-plugin-yandex", - "version": "latest", - "pluginTier": "community" - }, { "title": "Ksyun", "path": "ksyun", From 324e628b86ef850bd12994586c1e2c850d986694 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Thu, 21 Sep 2023 13:14:19 +0800 Subject: [PATCH 080/156] chore: unnecessary use of fmt.Sprintf Signed-off-by: guoguangwu --- builder/null/artifact_export.go | 4 +--- command/build_parallel_test.go | 7 +++---- hcl2template/types.datasource.go | 4 ++-- provisioner/breakpoint/provisioner.go | 3 +-- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/builder/null/artifact_export.go b/builder/null/artifact_export.go index 8b12610f81b..5a685629072 100644 --- a/builder/null/artifact_export.go +++ b/builder/null/artifact_export.go @@ -4,8 +4,6 @@ package null import ( - "fmt" - registryimage "github.com/hashicorp/packer-plugin-sdk/packer/registry/image" ) @@ -26,7 +24,7 @@ func (*NullArtifact) Id() string { } func (a *NullArtifact) String() string { - return fmt.Sprintf("Did not export anything. This is the null builder") + return "Did not export anything. This is the null builder" } func (a *NullArtifact) State(name string) interface{} { diff --git a/command/build_parallel_test.go b/command/build_parallel_test.go index 4758505241b..4bebc65cee8 100644 --- a/command/build_parallel_test.go +++ b/command/build_parallel_test.go @@ -6,7 +6,6 @@ package command import ( "bytes" "context" - "fmt" "path/filepath" "sync" "testing" @@ -101,7 +100,7 @@ func TestBuildParallel_1(t *testing.T) { } args := []string{ - fmt.Sprintf("-parallel-builds=10"), + "-parallel-builds=10", filepath.Join(testFixture("parallel"), "1lock-5wg.json"), } @@ -130,7 +129,7 @@ func TestBuildParallel_2(t *testing.T) { } args := []string{ - fmt.Sprintf("-parallel-builds=3"), + "-parallel-builds=3", filepath.Join(testFixture("parallel"), "2lock-4wg.json"), } @@ -159,7 +158,7 @@ func TestBuildParallel_Timeout(t *testing.T) { } args := []string{ - fmt.Sprintf("-parallel-builds=3"), + "-parallel-builds=3", filepath.Join(testFixture("parallel"), "2lock-timeout.json"), } diff --git a/hcl2template/types.datasource.go b/hcl2template/types.datasource.go index 8ac2c160827..348d06f452c 100644 --- a/hcl2template/types.datasource.go +++ b/hcl2template/types.datasource.go @@ -45,7 +45,7 @@ func (ds *Datasources) Values() (map[string]cty.Value, hcl.Diagnostics) { for ref, datasource := range *ds { if datasource.value == (cty.Value{}) { diags = append(diags, &hcl.Diagnostic{ - Summary: fmt.Sprintf("empty value"), + Summary: "empty value", Subject: &datasource.block.DefRange, Severity: hcl.DiagError, }) @@ -73,7 +73,7 @@ func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, diags = append(diags, &hcl.Diagnostic{ Summary: "Unknown " + dataSourceLabel + " type " + ref.Type, Subject: block.LabelRanges[0].Ptr(), - Detail: fmt.Sprintf("packer does not currently know any data source."), + Detail: "packer does not currently know any data source.", Severity: hcl.DiagError, }) return nil, diags diff --git a/provisioner/breakpoint/provisioner.go b/provisioner/breakpoint/provisioner.go index 9675ddff0d3..9ac6e340fb2 100644 --- a/provisioner/breakpoint/provisioner.go +++ b/provisioner/breakpoint/provisioner.go @@ -67,8 +67,7 @@ func (p *Provisioner) Provision(ctx context.Context, ui packersdk.Ui, comm packe ui.Say("Pausing at breakpoint provisioner.") } - message := fmt.Sprintf( - "Press enter to continue.") + message := "Press enter to continue." var g errgroup.Group result := make(chan string, 1) From 7eb6a45cd483af4236645f75ca83623aa127f929 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 22 Sep 2023 15:44:03 +0800 Subject: [PATCH 081/156] chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu --- acctest/plugin/component_acc_test.go | 4 +-- acctest/plugin/plugin_acc_test.go | 4 +-- acctest/testing.go | 6 ++-- builder/file/builder.go | 3 +- builder/file/builder_test.go | 6 ++-- cmd/ssh-keygen/main.go | 5 ++-- command/build_test.go | 5 ++-- command/command_test.go | 4 +-- command/fmt_test.go | 3 +- command/hcl2_upgrade_test.go | 5 ++-- command/utils_test.go | 5 ++-- config_test.go | 5 ++-- datasource/http/data.go | 4 +-- datasource/http/data_acc_test.go | 4 +-- hcl2template/formatter.go | 11 ++++--- hcl2template/formatter_test.go | 9 +++--- hcl2template/utils.go | 3 +- main.go | 5 ++-- packer/client_test.go | 3 +- packer/plugin-getter/github/getter.go | 5 ++-- packer/plugin-getter/plugins.go | 3 +- packer/plugin-getter/plugins_test.go | 5 ++-- packer/plugin_client.go | 3 +- packer/progressbar_test.go | 10 +++---- packer/testing.go | 6 ++-- .../checksum/post-processor_test.go | 4 +-- .../compress/post-processor_test.go | 18 ++++++------ post-processor/manifest/post-processor.go | 5 ++-- .../shell-local/post-processor_test.go | 9 +++--- provisioner/file/provisioner_test.go | 29 +++++++++---------- .../powershell/provisioner_acc_test.go | 4 +-- provisioner/powershell/provisioner_test.go | 17 +++++------ .../shell-local/provisioner_acc_test.go | 4 +-- provisioner/shell/provisioner_acc_test.go | 4 +-- provisioner/shell/provisioner_test.go | 9 +++--- provisioner/windows-shell/provisioner_test.go | 15 +++++----- scripts/generate-plugins.go | 3 +- 37 files changed, 112 insertions(+), 135 deletions(-) diff --git a/acctest/plugin/component_acc_test.go b/acctest/plugin/component_acc_test.go index 110d8d3765a..e78c77284c0 100644 --- a/acctest/plugin/component_acc_test.go +++ b/acctest/plugin/component_acc_test.go @@ -8,7 +8,7 @@ package plugin import ( _ "embed" "fmt" - "io/ioutil" + "io" "os" "os/exec" "testing" @@ -54,7 +54,7 @@ func TestAccInitAndBuildBasicAmazonAmiDatasource(t *testing.T) { } defer logs.Close() - logsBytes, err := ioutil.ReadAll(logs) + logsBytes, err := io.ReadAll(logs) if err != nil { return fmt.Errorf("Unable to read %s", logfile) } diff --git a/acctest/plugin/plugin_acc_test.go b/acctest/plugin/plugin_acc_test.go index 137fb394db4..6549b2129a3 100644 --- a/acctest/plugin/plugin_acc_test.go +++ b/acctest/plugin/plugin_acc_test.go @@ -8,7 +8,7 @@ package plugin import ( _ "embed" "fmt" - "io/ioutil" + "io" "os" "os/exec" "path/filepath" @@ -58,7 +58,7 @@ func TestAccInitAndBuildBasicAmazonEbs(t *testing.T) { } defer logs.Close() - logsBytes, err := ioutil.ReadAll(logs) + logsBytes, err := io.ReadAll(logs) if err != nil { return fmt.Errorf("Unable to read %s", logfile) } diff --git a/acctest/testing.go b/acctest/testing.go index dbd877fb3d3..dd18be1a365 100644 --- a/acctest/testing.go +++ b/acctest/testing.go @@ -6,7 +6,7 @@ package acctest import ( "context" "fmt" - "io/ioutil" + "io" "log" "os" "strings" @@ -182,8 +182,8 @@ func Test(t TestT, c TestCase) { log.Printf("[DEBUG] Running 'test' build") ui := &packersdk.BasicUi{ Reader: os.Stdin, - Writer: ioutil.Discard, - ErrorWriter: ioutil.Discard, + Writer: io.Discard, + ErrorWriter: io.Discard, PB: &packersdk.NoopProgressTracker{}, } artifacts, err := build.Run(context.Background(), ui) diff --git a/builder/file/builder.go b/builder/file/builder.go index e9d9d8f9ebd..0f79c958fe8 100644 --- a/builder/file/builder.go +++ b/builder/file/builder.go @@ -12,7 +12,6 @@ import ( "context" "fmt" "io" - "io/ioutil" "os" "path/filepath" @@ -77,7 +76,7 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) } else { // We're going to write Contents; if it's empty we'll just create an // empty file. - err := ioutil.WriteFile(b.config.Target, []byte(b.config.Content), 0600) + err := os.WriteFile(b.config.Target, []byte(b.config.Content), 0600) if err != nil { return nil, err } diff --git a/builder/file/builder_test.go b/builder/file/builder_test.go index 80fc326bdf4..5248318a4dc 100644 --- a/builder/file/builder_test.go +++ b/builder/file/builder_test.go @@ -5,7 +5,7 @@ package file import ( "fmt" - "io/ioutil" + "os" "testing" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" @@ -33,7 +33,7 @@ func TestBuilderFileAcc_copy(t *testing.T) { } func checkContent(artifacts []packersdk.Artifact) error { - content, err := ioutil.ReadFile("contentTest.txt") + content, err := os.ReadFile("contentTest.txt") if err != nil { return err } @@ -45,7 +45,7 @@ func checkContent(artifacts []packersdk.Artifact) error { } func checkCopy(artifacts []packersdk.Artifact) error { - content, err := ioutil.ReadFile("copyTest.txt") + content, err := os.ReadFile("copyTest.txt") if err != nil { return err } diff --git a/cmd/ssh-keygen/main.go b/cmd/ssh-keygen/main.go index f47eca5791f..c29edf76e7e 100644 --- a/cmd/ssh-keygen/main.go +++ b/cmd/ssh-keygen/main.go @@ -5,7 +5,6 @@ package main import ( "flag" - "io/ioutil" "log" "os" "os/user" @@ -74,12 +73,12 @@ func main() { log.Fatalf("%s already exists.", cla.Filename) } log.Printf("Saving private key to %s", cla.Filename) - if err := ioutil.WriteFile(cla.Filename, keypair.Private, 0600); err != nil { + if err := os.WriteFile(cla.Filename, keypair.Private, 0600); err != nil { log.Fatal(err) } publicFilename := cla.Filename + ".pub" log.Printf("Saving public key to %s", publicFilename) - if err := ioutil.WriteFile(publicFilename, keypair.Public, 0644); err != nil { + if err := os.WriteFile(publicFilename, keypair.Public, 0644); err != nil { log.Fatal(err) } } diff --git a/command/build_test.go b/command/build_test.go index 00685e98dc7..de476fdb0c4 100644 --- a/command/build_test.go +++ b/command/build_test.go @@ -5,7 +5,6 @@ package command import ( "fmt" - "io/ioutil" "math" "os" "path/filepath" @@ -1009,9 +1008,9 @@ func (fc fileCheck) verify(t *testing.T, dir string) { } } for file, expectedContent := range fc.expectedContent { - content, err := ioutil.ReadFile(filepath.Join(dir, file)) + content, err := os.ReadFile(filepath.Join(dir, file)) if err != nil { - t.Fatalf("ioutil.ReadFile: %v", err) + t.Fatalf("os.ReadFile: %v", err) } if diff := cmp.Diff(expectedContent, string(content)); diff != "" { t.Errorf("content of %s differs: %s", file, diff) diff --git a/command/command_test.go b/command/command_test.go index fcbec5fb0a7..712e9300496 100644 --- a/command/command_test.go +++ b/command/command_test.go @@ -5,7 +5,7 @@ package command import ( "bytes" - "io/ioutil" + "os" "path/filepath" "testing" @@ -27,7 +27,7 @@ func fatalCommand(t *testing.T, m Meta) { func testFixtureContent(n ...string) string { path := filepath.Join(append([]string{fixturesDir}, n...)...) - b, err := ioutil.ReadFile(path) + b, err := os.ReadFile(path) if err != nil { panic(err) } diff --git a/command/fmt_test.go b/command/fmt_test.go index 8fd058b379b..7d9f3b11979 100644 --- a/command/fmt_test.go +++ b/command/fmt_test.go @@ -6,7 +6,6 @@ package command import ( "bytes" "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -128,7 +127,7 @@ func TestFmt_Recursive(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - tempDirectory := mustString(ioutil.TempDir(testDir, "test-dir-*")) + tempDirectory := mustString(os.MkdirTemp(testDir, "test-dir-*")) defer os.RemoveAll(tempDirectory) createFiles(tempDirectory, tt.alreadyPresentContent) diff --git a/command/hcl2_upgrade_test.go b/command/hcl2_upgrade_test.go index f0ffc7676f2..487d99999cb 100644 --- a/command/hcl2_upgrade_test.go +++ b/command/hcl2_upgrade_test.go @@ -4,7 +4,6 @@ package command import ( - "io/ioutil" "os" "path/filepath" "testing" @@ -64,8 +63,8 @@ func Test_hcl2_upgrade(t *testing.T) { if tc.exitEarly { return } - expected := string(mustBytes(ioutil.ReadFile(expectedPath))) - actual := string(mustBytes(ioutil.ReadFile(outputPath))) + expected := string(mustBytes(os.ReadFile(expectedPath))) + actual := string(mustBytes(os.ReadFile(outputPath))) if diff := cmp.Diff(expected, actual); diff != "" { t.Fatalf("unexpected output: %s", diff) diff --git a/command/utils_test.go b/command/utils_test.go index 6af1f2c4881..cf5e2dbe3e7 100644 --- a/command/utils_test.go +++ b/command/utils_test.go @@ -4,7 +4,6 @@ package command import ( - "io/ioutil" "log" "os" "path/filepath" @@ -23,7 +22,7 @@ func createFiles(dir string, content map[string]string) { if err := os.MkdirAll(filepath.Dir(contentPath), 0777); err != nil { panic(err) } - if err := ioutil.WriteFile(contentPath, []byte(content), 0666); err != nil { + if err := os.WriteFile(contentPath, []byte(content), 0666); err != nil { panic(err) } log.Printf("created tmp file: %s", contentPath) @@ -39,7 +38,7 @@ func (c *configDirSingleton) dir(key string) string { if v, exists := c.dirs[key]; exists { return v } - c.dirs[key] = mustString(ioutil.TempDir("", "pkr-test-cfg-dir-"+key)) + c.dirs[key] = mustString(os.MkdirTemp("", "pkr-test-cfg-dir-"+key)) return c.dirs[key] } diff --git a/config_test.go b/config_test.go index 1a583a8c3a7..ac101010c3c 100644 --- a/config_test.go +++ b/config_test.go @@ -6,7 +6,6 @@ package main import ( "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "reflect" @@ -122,7 +121,7 @@ func TestLoadExternalComponentsFromConfig_onlyProvisioner(t *testing.T) { func TestLoadSingleComponent(t *testing.T) { // .exe will work everyone for testing purpose, but mostly here to help Window's test runs. - tmpFile, err := ioutil.TempFile(".", "packer-builder-*.exe") + tmpFile, err := os.CreateTemp(".", "packer-builder-*.exe") if err != nil { t.Fatalf("failed to create test file with error: %s", err) } @@ -160,7 +159,7 @@ func TestLoadSingleComponent(t *testing.T) { } func generateFakePlugins(dirname string, pluginNames []string) (string, []string, func(), error) { - dir, err := ioutil.TempDir("", dirname) + dir, err := os.MkdirTemp("", dirname) if err != nil { return "", nil, nil, fmt.Errorf("failed to create temporary test directory: %v", err) } diff --git a/datasource/http/data.go b/datasource/http/data.go index ef77adca2ba..58dec04c35b 100644 --- a/datasource/http/data.go +++ b/datasource/http/data.go @@ -8,7 +8,7 @@ package http import ( "context" "fmt" - "io/ioutil" + "io" "mime" "net/http" "regexp" @@ -137,7 +137,7 @@ func (d *Datasource) Execute() (cty.Value, error) { fmt.Println("If the content is binary data, Packer may not properly handle the contents of the response.") } - bytes, err := ioutil.ReadAll(resp.Body) + bytes, err := io.ReadAll(resp.Body) // TODO: How to make test case for this? if err != nil { fmt.Println("Error processing response body of call") diff --git a/datasource/http/data_acc_test.go b/datasource/http/data_acc_test.go index c5a92718e67..fdf680b8298 100644 --- a/datasource/http/data_acc_test.go +++ b/datasource/http/data_acc_test.go @@ -6,7 +6,7 @@ package http import ( _ "embed" "fmt" - "io/ioutil" + "io" "os" "os/exec" "regexp" @@ -84,7 +84,7 @@ func TestHttpDataSource(t *testing.T) { } defer logs.Close() - logsBytes, err := ioutil.ReadAll(logs) + logsBytes, err := io.ReadAll(logs) if err != nil { return fmt.Errorf("Unable to read %s", logfile) } diff --git a/hcl2template/formatter.go b/hcl2template/formatter.go index 5505cde4052..c04bb114748 100644 --- a/hcl2template/formatter.go +++ b/hcl2template/formatter.go @@ -7,7 +7,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -76,7 +75,7 @@ func (f *HCL2Formatter) Format(path string) (int, hcl.Diagnostics) { return f.formatFile(path, diags, bytesModified) } - fileInfos, err := ioutil.ReadDir(path) + fileInfos, err := os.ReadDir(path) if err != nil { diag := &hcl.Diagnostic{ Severity: hcl.DiagError, @@ -129,7 +128,7 @@ func (f *HCL2Formatter) processFile(filename string) ([]byte, error) { } } - inSrc, err := ioutil.ReadAll(in) + inSrc, err := io.ReadAll(in) if err != nil { return nil, fmt.Errorf("failed to read %s: %s", filename, err) } @@ -158,7 +157,7 @@ func (f *HCL2Formatter) processFile(filename string) ([]byte, error) { if filename == "-" { _, _ = f.Output.Write(outSrc) } else { - if err := ioutil.WriteFile(filename, outSrc, 0644); err != nil { + if err := os.WriteFile(filename, outSrc, 0644); err != nil { return nil, err } } @@ -178,14 +177,14 @@ func (f *HCL2Formatter) processFile(filename string) ([]byte, error) { // bytesDiff returns the unified diff of b1 and b2 // Shamelessly copied from Terraform's fmt command. func bytesDiff(b1, b2 []byte, path string) (data []byte, err error) { - f1, err := ioutil.TempFile("", "") + f1, err := os.CreateTemp("", "") if err != nil { return } defer os.Remove(f1.Name()) defer f1.Close() - f2, err := ioutil.TempFile("", "") + f2, err := os.CreateTemp("", "") if err != nil { return } diff --git a/hcl2template/formatter_test.go b/hcl2template/formatter_test.go index 07febb6f439..8cb909292a9 100644 --- a/hcl2template/formatter_test.go +++ b/hcl2template/formatter_test.go @@ -5,7 +5,6 @@ package hcl2template import ( "bytes" - "io/ioutil" "os" "os/exec" "strings" @@ -48,12 +47,12 @@ func TestHCL2Formatter_Format_Write(t *testing.T) { f.Output = &buf f.Write = true - unformattedData, err := ioutil.ReadFile("testdata/format/unformatted.pkr.hcl") + unformattedData, err := os.ReadFile("testdata/format/unformatted.pkr.hcl") if err != nil { t.Fatalf("failed to open the unformatted fixture %s", err) } - tf, err := ioutil.TempFile("", "*.pkr.hcl") + tf, err := os.CreateTemp("", "*.pkr.hcl") if err != nil { t.Fatalf("failed to create tempfile for test %s", err) } @@ -68,12 +67,12 @@ func TestHCL2Formatter_Format_Write(t *testing.T) { } //lets re-read the tempfile which should now be formatted - data, err := ioutil.ReadFile(tf.Name()) + data, err := os.ReadFile(tf.Name()) if err != nil { t.Fatalf("failed to open the newly formatted fixture %s", err) } - formattedData, err := ioutil.ReadFile("testdata/format/formatted.pkr.hcl") + formattedData, err := os.ReadFile("testdata/format/formatted.pkr.hcl") if err != nil { t.Fatalf("failed to open the formatted fixture %s", err) } diff --git a/hcl2template/utils.go b/hcl2template/utils.go index dc2399a1034..98546a95456 100644 --- a/hcl2template/utils.go +++ b/hcl2template/utils.go @@ -5,7 +5,6 @@ package hcl2template import ( "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -74,7 +73,7 @@ func GetHCL2Files(filename, hclSuffix, jsonSuffix string) (hclFiles, jsonFiles [ return nil, nil, diags } - fileInfos, err := ioutil.ReadDir(filename) + fileInfos, err := os.ReadDir(filename) if err != nil { diag := &hcl.Diagnostic{ Severity: hcl.DiagError, diff --git a/main.go b/main.go index 834d040409a..fe902f5bdb3 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,6 @@ package main import ( "fmt" "io" - "io/ioutil" "log" "math/rand" "os" @@ -65,13 +64,13 @@ func realMain() int { return 1 } if logWriter == nil { - logWriter = ioutil.Discard + logWriter = io.Discard } packersdk.LogSecretFilter.SetOutput(logWriter) // Disable logging here - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) // We always send logs to a temporary file that we use in case // there is a panic. Otherwise, we delete it. diff --git a/packer/client_test.go b/packer/client_test.go index f0dc074e997..c914a3edaed 100644 --- a/packer/client_test.go +++ b/packer/client_test.go @@ -5,7 +5,6 @@ package packer import ( "bytes" - "io/ioutil" "os" "strings" "testing" @@ -102,7 +101,7 @@ func TestClient_Stderr(t *testing.T) { func TestClient_Stdin(t *testing.T) { // Overwrite stdin for this test with a temporary file - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("err: %s", err) } diff --git a/packer/plugin-getter/github/getter.go b/packer/plugin-getter/github/getter.go index bde61e51641..a4942a42163 100644 --- a/packer/plugin-getter/github/getter.go +++ b/packer/plugin-getter/github/getter.go @@ -11,7 +11,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "log" "net/http" "os" @@ -71,7 +70,7 @@ func transformChecksumStream() func(in io.ReadCloser) (io.ReadCloser, error) { } } _, _ = buffer.WriteString("]") - return ioutil.NopCloser(buffer), nil + return io.NopCloser(buffer), nil } } @@ -103,7 +102,7 @@ func transformVersionStream(in io.ReadCloser) (io.ReadCloser, error) { return nil, err } - return ioutil.NopCloser(buf), nil + return io.NopCloser(buf), nil } // HostSpecificTokenAuthTransport makes sure the http roundtripper only sets an diff --git a/packer/plugin-getter/plugins.go b/packer/plugin-getter/plugins.go index 92f7e28a8e7..f6ca5c4abfe 100644 --- a/packer/plugin-getter/plugins.go +++ b/packer/plugin-getter/plugins.go @@ -9,7 +9,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "os" "path/filepath" @@ -714,7 +713,7 @@ func (pr *Requirement) InstallLatest(opts InstallOptions) (*Installation, error) log.Printf("[WARNING] %v, ignoring", err) } - if err := ioutil.WriteFile(outputFileName+checksum.Checksummer.FileExt(), []byte(hex.EncodeToString(cs)), 0555); err != nil { + if err := os.WriteFile(outputFileName+checksum.Checksummer.FileExt(), []byte(hex.EncodeToString(cs)), 0555); err != nil { err := fmt.Errorf("failed to write local binary checksum file: %s", err) errs = multierror.Append(errs, err) log.Printf("[WARNING] %v, ignoring", err) diff --git a/packer/plugin-getter/plugins_test.go b/packer/plugin-getter/plugins_test.go index 7a1439de210..dfb28767067 100644 --- a/packer/plugin-getter/plugins_test.go +++ b/packer/plugin-getter/plugins_test.go @@ -10,7 +10,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "os" "path/filepath" @@ -754,7 +753,7 @@ func (g *mockPluginGetter) Get(what string, options GetOptions) (io.ReadCloser, panic(err) } }() - return ioutil.NopCloser(read), nil + return io.NopCloser(read), nil } func zipFile(content map[string]string) io.ReadCloser { @@ -778,7 +777,7 @@ func zipFile(content map[string]string) io.ReadCloser { if err != nil { panic(err) } - return ioutil.NopCloser(buff) + return io.NopCloser(buff) } var _ Getter = &mockPluginGetter{} diff --git a/packer/plugin_client.go b/packer/plugin_client.go index b788f68f7fb..01e899e2813 100644 --- a/packer/plugin_client.go +++ b/packer/plugin_client.go @@ -8,7 +8,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "log" "net" "os" @@ -114,7 +113,7 @@ func NewClient(config *PluginClientConfig) (c *PluginClient) { } if config.Stderr == nil { - config.Stderr = ioutil.Discard + config.Stderr = io.Discard } c = &PluginClient{config: config} diff --git a/packer/progressbar_test.go b/packer/progressbar_test.go index 96ff65d687b..20edc07c9b2 100644 --- a/packer/progressbar_test.go +++ b/packer/progressbar_test.go @@ -5,7 +5,7 @@ package packer import ( "bytes" - "io/ioutil" + "io" "testing" "golang.org/x/sync/errgroup" @@ -16,10 +16,10 @@ import ( func TestProgressTracking_open_close(t *testing.T) { var bar *UiProgressBar - tracker := bar.TrackProgress("1,", 1, 42, ioutil.NopCloser(nil)) + tracker := bar.TrackProgress("1,", 1, 42, io.NopCloser(nil)) tracker.Close() - tracker = bar.TrackProgress("2,", 1, 42, ioutil.NopCloser(nil)) + tracker = bar.TrackProgress("2,", 1, 42, io.NopCloser(nil)) tracker.Close() } @@ -29,7 +29,7 @@ func TestProgressTracking_multi_open_close(t *testing.T) { for i := 0; i < 100; i++ { g.Go(func() error { - tracker := bar.TrackProgress("file,", 1, 42, ioutil.NopCloser(nil)) + tracker := bar.TrackProgress("file,", 1, 42, io.NopCloser(nil)) return tracker.Close() }) } @@ -46,7 +46,7 @@ func TestProgressTracking_races(t *testing.T) { g.Go(func() error { txt := []byte("foobarbaz dolores") b := bytes.NewReader(txt) - tracker := bar.TrackProgress("file,", 1, 42, ioutil.NopCloser(b)) + tracker := bar.TrackProgress("file,", 1, 42, io.NopCloser(b)) for i := 0; i < 42; i++ { tracker.Read([]byte("i")) diff --git a/packer/testing.go b/packer/testing.go index faa3c58283e..b0ebc04b95f 100644 --- a/packer/testing.go +++ b/packer/testing.go @@ -5,7 +5,7 @@ package packer import ( "bytes" - "io/ioutil" + "io" "testing" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" @@ -40,8 +40,8 @@ func TestUi(t *testing.T) packersdk.Ui { var buf bytes.Buffer return &packersdk.BasicUi{ Reader: &buf, - Writer: ioutil.Discard, - ErrorWriter: ioutil.Discard, + Writer: io.Discard, + ErrorWriter: io.Discard, } } diff --git a/post-processor/checksum/post-processor_test.go b/post-processor/checksum/post-processor_test.go index 62c2f2ae3e1..6a08f029735 100644 --- a/post-processor/checksum/post-processor_test.go +++ b/post-processor/checksum/post-processor_test.go @@ -7,7 +7,7 @@ import ( "bytes" "context" "fmt" - "io/ioutil" + "io" "os" "strings" "testing" @@ -38,7 +38,7 @@ func TestChecksumSHA1(t *testing.T) { if err != nil { t.Errorf("Unable to read checksum file: %s", err) } - if buf, _ := ioutil.ReadAll(f); !bytes.Equal(buf, []byte("d3486ae9136e7856bc42212385ea797094475802\tpackage.txt\n")) { + if buf, _ := io.ReadAll(f); !bytes.Equal(buf, []byte("d3486ae9136e7856bc42212385ea797094475802\tpackage.txt\n")) { t.Errorf("Failed to compute checksum: %s\n%s", buf, "d3486ae9136e7856bc42212385ea797094475802 package.txt") } diff --git a/post-processor/compress/post-processor_test.go b/post-processor/compress/post-processor_test.go index e85b2041062..885388c79e8 100644 --- a/post-processor/compress/post-processor_test.go +++ b/post-processor/compress/post-processor_test.go @@ -9,7 +9,7 @@ import ( "compress/gzip" "context" "fmt" - "io/ioutil" + "io" "os" "strings" "testing" @@ -84,7 +84,7 @@ func TestCompressOptions(t *testing.T) { filename := "package.gz" archive, _ := os.Open(filename) gzipReader, _ := gzip.NewReader(archive) - data, _ := ioutil.ReadAll(gzipReader) + data, _ := io.ReadAll(gzipReader) if string(data) != expectedFileContents { t.Errorf("Expected:\n%s\nFound:\n%s\n", expectedFileContents, data) @@ -115,7 +115,7 @@ func TestCompressInterpolation(t *testing.T) { } gzipReader, _ := gzip.NewReader(archive) - data, _ := ioutil.ReadAll(gzipReader) + data, _ := io.ReadAll(gzipReader) if string(data) != expectedFileContents { t.Errorf("Expected:\n%s\nFound:\n%s\n", expectedFileContents, data) @@ -194,7 +194,7 @@ func TestArchive(t *testing.T) { if err != nil { return nil, err } - return ioutil.ReadAll(bzipReader) + return io.ReadAll(bzipReader) }, "zip": func(archive *os.File) ([]byte, error) { fi, _ := archive.Stat() @@ -206,7 +206,7 @@ func TestArchive(t *testing.T) { if err != nil { return nil, err } - return ioutil.ReadAll(ctt) + return io.ReadAll(ctt) }, "tar": func(archive *os.File) ([]byte, error) { tarReader := tar.NewReader(archive) @@ -214,7 +214,7 @@ func TestArchive(t *testing.T) { if err != nil { return nil, err } - return ioutil.ReadAll(tarReader) + return io.ReadAll(tarReader) }, "tar.gz": func(archive *os.File) ([]byte, error) { gzipReader, err := gzip.NewReader(archive) @@ -226,15 +226,15 @@ func TestArchive(t *testing.T) { if err != nil { return nil, err } - return ioutil.ReadAll(tarReader) + return io.ReadAll(tarReader) }, "gz": func(archive *os.File) ([]byte, error) { gzipReader, _ := gzip.NewReader(archive) - return ioutil.ReadAll(gzipReader) + return io.ReadAll(gzipReader) }, "lz4": func(archive *os.File) ([]byte, error) { lz4Reader := lz4.NewReader(archive) - return ioutil.ReadAll(lz4Reader) + return io.ReadAll(lz4Reader) }, } diff --git a/post-processor/manifest/post-processor.go b/post-processor/manifest/post-processor.go index 5fb90c45577..74f203525d9 100644 --- a/post-processor/manifest/post-processor.go +++ b/post-processor/manifest/post-processor.go @@ -10,7 +10,6 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" "log" "os" "path/filepath" @@ -143,7 +142,7 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packersdk.Ui, source // Read the current manifest file from disk contents := []byte{} - if contents, err = ioutil.ReadFile(p.config.OutputPath); err != nil && !os.IsNotExist(err) { + if contents, err = os.ReadFile(p.config.OutputPath); err != nil && !os.IsNotExist(err) { return source, true, true, fmt.Errorf("Unable to open %s for reading: %s", p.config.OutputPath, err) } @@ -167,7 +166,7 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packersdk.Ui, source // Write JSON to disk if out, err := json.MarshalIndent(manifestFile, "", " "); err == nil { - if err = ioutil.WriteFile(p.config.OutputPath, out, 0664); err != nil { + if err = os.WriteFile(p.config.OutputPath, out, 0664); err != nil { return source, true, true, fmt.Errorf("Unable to write %s: %s", p.config.OutputPath, err) } } else { diff --git a/post-processor/shell-local/post-processor_test.go b/post-processor/shell-local/post-processor_test.go index 39fbec25ec3..13121658af2 100644 --- a/post-processor/shell-local/post-processor_test.go +++ b/post-processor/shell-local/post-processor_test.go @@ -4,7 +4,6 @@ package shell_local import ( - "io/ioutil" "os" "runtime" "testing" @@ -95,7 +94,7 @@ func TestPostProcessorPrepare_Script(t *testing.T) { } // Test with a good one - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -163,7 +162,7 @@ func TestPostProcessorPrepare_ScriptAndInline(t *testing.T) { } // Test with both - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -182,7 +181,7 @@ func TestPostProcessorPrepare_ScriptAndScripts(t *testing.T) { raws := testConfig() // Test with both - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -208,7 +207,7 @@ func TestPostProcessorPrepare_Scripts(t *testing.T) { } // Test with a good one - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } diff --git a/provisioner/file/provisioner_test.go b/provisioner/file/provisioner_test.go index 17d55d75d2b..280afa0250a 100644 --- a/provisioner/file/provisioner_test.go +++ b/provisioner/file/provisioner_test.go @@ -6,7 +6,6 @@ package file import ( "bytes" "context" - "io/ioutil" "os" "path/filepath" "regexp" @@ -62,7 +61,7 @@ func TestProvisionerPrepare_InvalidSource(t *testing.T) { func TestProvisionerPrepare_ValidSource(t *testing.T) { var p Provisioner - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -107,7 +106,7 @@ func TestProvisionerPrepare_EmptyDestination(t *testing.T) { func TestProvisionerProvision_SendsFile(t *testing.T) { var p Provisioner - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -195,7 +194,7 @@ func TestProvisionerProvision_SendsContent(t *testing.T) { func TestProvisionerProvision_SendsFileMultipleFiles(t *testing.T) { var p Provisioner - tf1, err := ioutil.TempFile("", "packer") + tf1, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -205,7 +204,7 @@ func TestProvisionerProvision_SendsFileMultipleFiles(t *testing.T) { t.Fatalf("error writing tempfile: %s", err) } - tf2, err := ioutil.TempFile("", "packer") + tf2, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -248,13 +247,13 @@ func TestProvisionerProvision_SendsFileMultipleDirs(t *testing.T) { var p Provisioner // Prepare the first directory - td1, err := ioutil.TempDir("", "packerdir") + td1, err := os.MkdirTemp("", "packerdir") if err != nil { t.Fatalf("error temp folder 1: %s", err) } defer os.Remove(td1) - tf1, err := ioutil.TempFile(td1, "packer") + tf1, err := os.CreateTemp(td1, "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -264,13 +263,13 @@ func TestProvisionerProvision_SendsFileMultipleDirs(t *testing.T) { } // Prepare the second directory - td2, err := ioutil.TempDir("", "packerdir") + td2, err := os.MkdirTemp("", "packerdir") if err != nil { t.Fatalf("error temp folder 1: %s", err) } defer os.Remove(td2) - tf2, err := ioutil.TempFile(td2, "packer") + tf2, err := os.CreateTemp(td2, "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -317,7 +316,7 @@ func TestProvisionerProvision_SendsFileMultipleDirs(t *testing.T) { func TestProvisionerProvision_DownloadsMultipleFilesToFolder(t *testing.T) { var p Provisioner - tf1, err := ioutil.TempFile("", "packer") + tf1, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -327,7 +326,7 @@ func TestProvisionerProvision_DownloadsMultipleFilesToFolder(t *testing.T) { t.Fatalf("error writing tempfile: %s", err) } - tf2, err := ioutil.TempFile("", "packer") + tf2, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -388,7 +387,7 @@ func TestProvisionerProvision_DownloadsMultipleFilesToFolder(t *testing.T) { func TestProvisionerProvision_SendsFileMultipleFilesToFolder(t *testing.T) { var p Provisioner - tf1, err := ioutil.TempFile("", "packer") + tf1, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -398,7 +397,7 @@ func TestProvisionerProvision_SendsFileMultipleFilesToFolder(t *testing.T) { t.Fatalf("error writing tempfile: %s", err) } - tf2, err := ioutil.TempFile("", "packer") + tf2, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -454,12 +453,12 @@ func TestProvisionDownloadMkdirAll(t *testing.T) { {"path/to/dir"}, {"path/to/dir/"}, } - tmpDir, err := ioutil.TempDir("", "packer-file") + tmpDir, err := os.MkdirTemp("", "packer-file") if err != nil { t.Fatalf("error tempdir: %s", err) } defer os.RemoveAll(tmpDir) - tf, err := ioutil.TempFile(tmpDir, "packer") + tf, err := os.CreateTemp(tmpDir, "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } diff --git a/provisioner/powershell/provisioner_acc_test.go b/provisioner/powershell/provisioner_acc_test.go index 8340b2a5a87..8073d011334 100644 --- a/provisioner/powershell/provisioner_acc_test.go +++ b/provisioner/powershell/provisioner_acc_test.go @@ -5,7 +5,7 @@ package powershell_test import ( "fmt" - "io/ioutil" + "io" "os" "os/exec" "path/filepath" @@ -35,7 +35,7 @@ func LoadProvisionerFragment(templateFragmentPath string) (string, error) { } defer fragmentFile.Close() - fragmentString, err := ioutil.ReadAll(fragmentFile) + fragmentString, err := io.ReadAll(fragmentFile) if err != nil { return "", fmt.Errorf("Unable to read %s", fragmentAbsPath) } diff --git a/provisioner/powershell/provisioner_test.go b/provisioner/powershell/provisioner_test.go index 0d8b4ca35cd..024b0585fa2 100644 --- a/provisioner/powershell/provisioner_test.go +++ b/provisioner/powershell/provisioner_test.go @@ -7,7 +7,6 @@ import ( "bytes" "context" "fmt" - "io/ioutil" "os" "regexp" "strings" @@ -35,7 +34,7 @@ func TestProvisionerPrepare_extractScript(t *testing.T) { } // File contents should contain 2 lines concatenated by newlines: foo\nbar - readFile, err := ioutil.ReadFile(file) + readFile, err := os.ReadFile(file) expectedContents := "foo\nbar\n" if err != nil { t.Fatalf("Should not be error: %s", err) @@ -187,7 +186,7 @@ func TestProvisionerPrepare_Script(t *testing.T) { } // Test with a good one - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -214,7 +213,7 @@ func TestProvisionerPrepare_ScriptAndInline(t *testing.T) { } // Test with both - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -234,7 +233,7 @@ func TestProvisionerPrepare_ScriptAndScripts(t *testing.T) { config := testConfig() // Test with both - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -261,7 +260,7 @@ func TestProvisionerPrepare_Scripts(t *testing.T) { } // Test with a good one - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -512,7 +511,7 @@ func TestProvisionerProvision_Inline(t *testing.T) { } func TestProvisionerProvision_Scripts(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "packer") + tempFile, _ := os.CreateTemp("", "packer") defer os.Remove(tempFile.Name()) defer tempFile.Close() @@ -542,7 +541,7 @@ func TestProvisionerProvision_Scripts(t *testing.T) { } func TestProvisionerProvision_ScriptsWithEnvVars(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "packer") + tempFile, _ := os.CreateTemp("", "packer") ui := testUi() defer os.Remove(tempFile.Name()) defer tempFile.Close() @@ -579,7 +578,7 @@ func TestProvisionerProvision_ScriptsWithEnvVars(t *testing.T) { } func TestProvisionerProvision_SkipClean(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "packer") + tempFile, _ := os.CreateTemp("", "packer") defer func() { tempFile.Close() os.Remove(tempFile.Name()) diff --git a/provisioner/shell-local/provisioner_acc_test.go b/provisioner/shell-local/provisioner_acc_test.go index b7b7c051a14..1f1b37a0cb8 100644 --- a/provisioner/shell-local/provisioner_acc_test.go +++ b/provisioner/shell-local/provisioner_acc_test.go @@ -5,7 +5,7 @@ package shell_test import ( "fmt" - "io/ioutil" + "io" "os" "os/exec" "path/filepath" @@ -31,7 +31,7 @@ func loadFile(templateFragmentPath string) (string, error) { } defer fragmentFile.Close() - fragmentString, err := ioutil.ReadAll(fragmentFile) + fragmentString, err := io.ReadAll(fragmentFile) if err != nil { return "", fmt.Errorf("Unable to read %s", fragmentAbsPath) } diff --git a/provisioner/shell/provisioner_acc_test.go b/provisioner/shell/provisioner_acc_test.go index 4eefa19e78a..167456d274a 100644 --- a/provisioner/shell/provisioner_acc_test.go +++ b/provisioner/shell/provisioner_acc_test.go @@ -5,7 +5,7 @@ package shell_test import ( "fmt" - "io/ioutil" + "io" "os" "os/exec" "path/filepath" @@ -31,7 +31,7 @@ func loadFile(templateFragmentPath string) (string, error) { } defer fragmentFile.Close() - fragmentString, err := ioutil.ReadAll(fragmentFile) + fragmentString, err := io.ReadAll(fragmentFile) if err != nil { return "", fmt.Errorf("Unable to read %s", fragmentAbsPath) } diff --git a/provisioner/shell/provisioner_test.go b/provisioner/shell/provisioner_test.go index 5640c92425e..40da9b5ea2b 100644 --- a/provisioner/shell/provisioner_test.go +++ b/provisioner/shell/provisioner_test.go @@ -4,7 +4,6 @@ package shell import ( - "io/ioutil" "os" "regexp" "strings" @@ -123,7 +122,7 @@ func TestProvisionerPrepare_Script(t *testing.T) { } // Test with a good one - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -149,7 +148,7 @@ func TestProvisionerPrepare_ScriptAndInline(t *testing.T) { } // Test with both - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -168,7 +167,7 @@ func TestProvisionerPrepare_ScriptAndScripts(t *testing.T) { config := testConfig() // Test with both - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -194,7 +193,7 @@ func TestProvisionerPrepare_Scripts(t *testing.T) { } // Test with a good one - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } diff --git a/provisioner/windows-shell/provisioner_test.go b/provisioner/windows-shell/provisioner_test.go index 5ef92c64ac0..08990b00ae7 100644 --- a/provisioner/windows-shell/provisioner_test.go +++ b/provisioner/windows-shell/provisioner_test.go @@ -6,7 +6,6 @@ package shell import ( "bytes" "context" - "io/ioutil" "log" "os" "strings" @@ -37,7 +36,7 @@ func TestProvisionerPrepare_extractScript(t *testing.T) { } // File contents should contain 2 lines concatenated by newlines: foo\nbar - readFile, err := ioutil.ReadFile(file) + readFile, err := os.ReadFile(file) if err != nil { t.Fatalf("Should not be error: %s", err) } @@ -102,7 +101,7 @@ func TestProvisionerPrepare_Script(t *testing.T) { } // Test with a good one - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -129,7 +128,7 @@ func TestProvisionerPrepare_ScriptAndInline(t *testing.T) { } // Test with both - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -149,7 +148,7 @@ func TestProvisionerPrepare_ScriptAndScripts(t *testing.T) { config := testConfig() // Test with both - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -176,7 +175,7 @@ func TestProvisionerPrepare_Scripts(t *testing.T) { } // Test with a good one - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -325,7 +324,7 @@ func TestProvisionerProvision_Inline(t *testing.T) { } func TestProvisionerProvision_Scripts(t *testing.T) { - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } @@ -357,7 +356,7 @@ func TestProvisionerProvision_Scripts(t *testing.T) { } func TestProvisionerProvision_ScriptsWithEnvVars(t *testing.T) { - tf, err := ioutil.TempFile("", "packer") + tf, err := os.CreateTemp("", "packer") if err != nil { t.Fatalf("error tempfile: %s", err) } diff --git a/scripts/generate-plugins.go b/scripts/generate-plugins.go index bd303cb29ba..7390fafa070 100755 --- a/scripts/generate-plugins.go +++ b/scripts/generate-plugins.go @@ -12,7 +12,6 @@ import ( "go/ast" "go/parser" "go/token" - "io/ioutil" "log" "os" "path/filepath" @@ -142,7 +141,7 @@ func makeImports(builders, provisioners, postProcessors, Datasources []plugin) s // listDirectories recursively lists directories under the specified path func listDirectories(path string) ([]string, error) { names := []string{} - items, err := ioutil.ReadDir(path) + items, err := os.ReadDir(path) if err != nil { return names, err } From d56db70a577aa7f37e3225e2ae99629231d08128 Mon Sep 17 00:00:00 2001 From: Shengjing Zhu Date: Sun, 30 Jul 2023 19:19:14 +0800 Subject: [PATCH 082/156] Bump github.com/pierrec/lz4 to v4.1.18 --- go.mod | 3 ++- go.sum | 2 ++ post-processor/compress/benchmark.go | 4 +-- post-processor/compress/post-processor.go | 25 ++++++++++++++++--- .../compress/post-processor_test.go | 2 +- 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index ab2d8edd000..f0b2dcbaa54 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/mitchellh/panicwrap v1.0.0 github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784 github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db // indirect - github.com/pierrec/lz4 v2.6.1+incompatible + github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pkg/sftp v1.13.2 // indirect github.com/posener/complete v1.2.3 github.com/stretchr/testify v1.8.2 @@ -70,6 +70,7 @@ require ( github.com/hashicorp/packer-plugin-vmware v1.0.7 github.com/hashicorp/packer-plugin-vsphere v1.1.1 github.com/oklog/ulid v1.3.1 + github.com/pierrec/lz4/v4 v4.1.18 github.com/shirou/gopsutil/v3 v3.23.4 ) diff --git a/go.sum b/go.sum index 81a0347bf5c..34f7c200dc5 100644 --- a/go.sum +++ b/go.sum @@ -643,6 +643,8 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/post-processor/compress/benchmark.go b/post-processor/compress/benchmark.go index 5d06b7d6448..e315f3bcf2d 100644 --- a/post-processor/compress/benchmark.go +++ b/post-processor/compress/benchmark.go @@ -18,7 +18,7 @@ import ( "github.com/biogo/hts/bgzf" "github.com/klauspost/pgzip" - "github.com/pierrec/lz4" + "github.com/pierrec/lz4/v4" "github.com/ulikunitz/xz" ) @@ -190,7 +190,7 @@ func (c *Compressor) BenchmarkPGZIPReader(b *testing.B) { func (c *Compressor) BenchmarkLZ4Writer(b *testing.B) { cw := lz4.NewWriter(c.w) // cw.Header.HighCompression = true - cw.Header.NoChecksum = true + cw.Apply(lz4.ChecksumOption(false)) b.ResetTimer() _, err := io.Copy(cw, c.r) diff --git a/post-processor/compress/post-processor.go b/post-processor/compress/post-processor.go index 88b345a97d8..07a74e813d0 100644 --- a/post-processor/compress/post-processor.go +++ b/post-processor/compress/post-processor.go @@ -24,7 +24,7 @@ import ( "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" "github.com/klauspost/pgzip" - "github.com/pierrec/lz4" + "github.com/pierrec/lz4/v4" "github.com/ulikunitz/xz" ) @@ -333,8 +333,27 @@ func makeBZIP2Writer(output io.Writer, compressionLevel int) (io.WriteCloser, er func makeLZ4Writer(output io.WriteCloser, compressionLevel int) (io.WriteCloser, error) { lzwriter := lz4.NewWriter(output) - if compressionLevel > 0 { - lzwriter.Header.CompressionLevel = compressionLevel + if compressionLevel < 0 { + return lzwriter, nil + } + levels := map[int]lz4.CompressionLevel{ + 0: lz4.Fast, + 1: lz4.Level1, + 2: lz4.Level2, + 3: lz4.Level3, + 4: lz4.Level4, + 5: lz4.Level5, + 6: lz4.Level6, + 7: lz4.Level7, + 8: lz4.Level8, + 9: lz4.Level9, + } + level, ok := levels[compressionLevel] + if !ok { + return nil, ErrInvalidCompressionLevel + } + if err := lzwriter.Apply(lz4.CompressionLevelOption(level)); err != nil { + return nil, err } return lzwriter, nil } diff --git a/post-processor/compress/post-processor_test.go b/post-processor/compress/post-processor_test.go index 885388c79e8..00b8a1377ca 100644 --- a/post-processor/compress/post-processor_test.go +++ b/post-processor/compress/post-processor_test.go @@ -18,7 +18,7 @@ import ( packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template" "github.com/hashicorp/packer/builder/file" - "github.com/pierrec/lz4" + "github.com/pierrec/lz4/v4" ) func TestDetectFilename(t *testing.T) { From c0e594738be27695fba13f2ad817554497b11885 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 27 Sep 2023 10:47:34 -0400 Subject: [PATCH 083/156] init: warn if no requirements specified When users call `packer init' on a template that does not specify a `required_plugin' block, the command succeeds but does nothing, which is not helpful for users that may expect their plugins to install. To remedy that problem, we now output a message like what `packer plugins required' does on templates without such a block, so that users have an idea of what to change in order to get the command to work. --- command/init.go | 8 +++++++ command/init_test.go | 53 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/command/init.go b/command/init.go index ad9a7bcdd98..709e8ab0fdf 100644 --- a/command/init.go +++ b/command/init.go @@ -66,6 +66,14 @@ func (c *InitCommand) RunContext(buildCtx context.Context, cla *InitArgs) int { return ret } + if len(reqs) == 0 { + c.Ui.Message(` +No plugins requirement found, make sure you reference a Packer config +containing a packer.required_plugins block. See +https://www.packer.io/docs/templates/hcl_templates/blocks/packer +for more info.`) + } + opts := plugingetter.ListInstallationsOptions{ FromFolders: c.Meta.CoreConfig.Components.PluginConfig.KnownPluginFolders, BinaryInstallationOptions: plugingetter.BinaryInstallationOptions{ diff --git a/command/init_test.go b/command/init_test.go index 07246d50081..57ab1781d04 100644 --- a/command/init_test.go +++ b/command/init_test.go @@ -13,6 +13,7 @@ import ( "path/filepath" "runtime" "sort" + "strings" "testing" "github.com/google/go-cmp/cmp" @@ -414,3 +415,55 @@ func (opts initTestGoGetPlugin) fn(t *testing.T, _ testCaseInit) { t.Fatalf("get: %v", err) } } + +// TestInitCmd aims to test the init command, with output validation +func TestInitCmd(t *testing.T) { + tests := []struct { + name string + args []string + expectedCode int + outputCheck func(string, string) error + }{ + { + name: "Ensure init warns on template without required_plugin blocks", + args: []string{ + testFixture("hcl", "build-var-in-pp.pkr.hcl"), + }, + expectedCode: 0, + outputCheck: func(stdout, stderr string) error { + if !strings.Contains(stdout, "No plugins requirement found") { + return fmt.Errorf("command should warn about plugin requirements not found, but did not") + } + return nil + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := &InitCommand{ + Meta: TestMetaFile(t), + } + + exitCode := c.Run(tt.args) + if exitCode != tt.expectedCode { + t.Errorf("process exit code mismatch: expected %d, got %d", + tt.expectedCode, + exitCode) + } + + out, stderr := GetStdoutAndErrFromTestMeta(t, c.Meta) + err := tt.outputCheck(out, stderr) + if err != nil { + if len(out) != 0 { + t.Logf("command stdout: %q", out) + } + + if len(stderr) != 0 { + t.Logf("command stderr: %q", stderr) + } + t.Error(err.Error()) + } + }) + } +} From 8490333f557e8a23f866afef93995f91e5d0faea Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 2 Oct 2023 06:50:04 -0400 Subject: [PATCH 084/156] Fix broken acctest for Amazon data source This change updates the Ubuntu image being from 16.04 to something more recent. --- .../plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl b/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl index b3c4696024d..7ff2d3127da 100644 --- a/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl +++ b/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl @@ -9,7 +9,7 @@ packer { data "amazon-ami" "test" { filters = { - name = "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*" + name = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*" root-device-type = "ebs" virtualization-type = "hvm" } From 8dcc6b9fd9af8d4f47a758fb18324858cdfd9996 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 3 Oct 2023 10:32:42 -0400 Subject: [PATCH 085/156] Bump Go tooling version to 1.20.8 --- .go-version | 2 +- go | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 go diff --git a/.go-version b/.go-version index 8909929f6e7..95393fc7d4d 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.7 +1.20.8 diff --git a/go b/go new file mode 100644 index 00000000000..e69de29bb2d From 8438d81d4daee583e24e34819982bb89248dc211 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 24 Aug 2023 15:29:11 -0400 Subject: [PATCH 086/156] hcl2template: remove unused shouldContinue bool Not sure why this was defined and returned, but the value was set, but never used, as such this is not useful to keep in the code, so let's simplify this now. --- hcl2template/types.packer_config.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 819107e86b3..9ef8de242e4 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -380,7 +380,7 @@ func (cfg *PackerConfig) evaluateDatasources(skipExecution bool) hcl.Diagnostics // Now that most of our data sources have been started and executed, we can // try to execute the ones that depend on other data sources. for ref := range dependencies { - _, moreDiags, _ := cfg.recursivelyEvaluateDatasources(ref, dependencies, skipExecution, 0) + _, moreDiags := cfg.recursivelyEvaluateDatasources(ref, dependencies, skipExecution, 0) // Deduplicate diagnostics to prevent recursion messes. cleanedDiags := map[string]*hcl.Diagnostic{} for _, diag := range moreDiags { @@ -395,10 +395,9 @@ func (cfg *PackerConfig) evaluateDatasources(skipExecution bool) hcl.Diagnostics return diags } -func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, dependencies map[DatasourceRef][]DatasourceRef, skipExecution bool, depth int) (map[DatasourceRef][]DatasourceRef, hcl.Diagnostics, bool) { +func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, dependencies map[DatasourceRef][]DatasourceRef, skipExecution bool, depth int) (map[DatasourceRef][]DatasourceRef, hcl.Diagnostics) { var diags hcl.Diagnostics var moreDiags hcl.Diagnostics - shouldContinue := true if depth > 10 { // Add a comment about recursion. @@ -410,7 +409,7 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen "other data sources, or your data sources have a cyclic " + "dependency. Please simplify your config to continue. ", }) - return dependencies, diags, false + return dependencies, diags } ds := cfg.Datasources[ref] @@ -421,11 +420,11 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen // If this dependency is not in the map, it means we've already // launched and executed this datasource. Otherwise, it means // we still need to run it. RECURSION TIME!! - dependencies, moreDiags, shouldContinue = cfg.recursivelyEvaluateDatasources(dep, dependencies, skipExecution, depth) + dependencies, moreDiags = cfg.recursivelyEvaluateDatasources(dep, dependencies, skipExecution, depth) diags = append(diags, moreDiags...) if moreDiags.HasErrors() { diags = append(diags, moreDiags...) - return dependencies, diags, shouldContinue + return dependencies, diags } } } @@ -435,14 +434,14 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref, true) if startDiags.HasErrors() { diags = append(diags, startDiags...) - return dependencies, diags, shouldContinue + return dependencies, diags } if skipExecution { placeholderValue := cty.UnknownVal(hcldec.ImpliedType(datasource.OutputSpec())) ds.value = placeholderValue cfg.Datasources[ref] = ds - return dependencies, diags, shouldContinue + return dependencies, diags } opts, _ := decodeHCL2Spec(ds.block.Body, cfg.EvalContext(DatasourceContext, nil), datasource) @@ -455,14 +454,14 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen Subject: &cfg.Datasources[ref].block.DefRange, Severity: hcl.DiagError, }) - return dependencies, diags, shouldContinue + return dependencies, diags } ds.value = realValue cfg.Datasources[ref] = ds // remove ref from the dependencies map. delete(dependencies, ref) - return dependencies, diags, shouldContinue + return dependencies, diags } // getCoreBuildProvisioners takes a list of provisioner block, starts according From 2a6ccaccab0456de9f8aa88405c56690bfff3338 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 24 Aug 2023 16:09:25 -0400 Subject: [PATCH 087/156] hcl2template: simplify datasource evaluation Since datasources are recursively evaluated depending on their dependencies, we don't need to pre-execute those that depend on nothing, as the recursive traversal of the datasources will take care of that for us. --- hcl2template/types.packer_config.go | 46 ++--------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 9ef8de242e4..39283e59075 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -311,8 +311,8 @@ func (cfg *PackerConfig) evaluateDatasources(skipExecution bool) hcl.Diagnostics // source in any of its input expressions. If so, skip evaluating it for // now, and add it to a list of datasources to evaluate again, later, // with the datasources in its context. - // This is essentially creating a very primitive DAG just for data - // source interdependencies. + dependencies[ref] = []DatasourceRef{} + block := ds.block body := block.Body attrs, _ := body.JustAttributes() @@ -330,51 +330,11 @@ func (cfg *PackerConfig) evaluateDatasources(skipExecution bool) hcl.Diagnostics Name: v[2].(hcl.TraverseAttr).Name, } log.Printf("The data source %#v depends on datasource %#v", ref, dependsOn) - if dependencies[ref] != nil { - dependencies[ref] = append(dependencies[ref], dependsOn) - } else { - dependencies[ref] = []DatasourceRef{dependsOn} - } + dependencies[ref] = append(dependencies[ref], dependsOn) skipFirstEval = true } } } - - // Now we have a list of data sources that depend on other data sources. - // Don't evaluate these; only evaluate data sources that we didn't - // mark as having dependencies. - if skipFirstEval { - continue - } - - datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref, false) - diags = append(diags, startDiags...) - if diags.HasErrors() { - continue - } - - if skipExecution { - placeholderValue := cty.UnknownVal(hcldec.ImpliedType(datasource.OutputSpec())) - ds.value = placeholderValue - cfg.Datasources[ref] = ds - continue - } - - dsOpts, _ := decodeHCL2Spec(body, cfg.EvalContext(DatasourceContext, nil), datasource) - sp := packer.CheckpointReporter.AddSpan(ref.Type, "datasource", dsOpts) - realValue, err := datasource.Execute() - sp.End(err) - if err != nil { - diags = append(diags, &hcl.Diagnostic{ - Summary: err.Error(), - Subject: &cfg.Datasources[ref].block.DefRange, - Severity: hcl.DiagError, - }) - continue - } - - ds.value = realValue - cfg.Datasources[ref] = ds } // Now that most of our data sources have been started and executed, we can From 14b6ad10fe6a8aa1d69bcf676f32eb9c2af3210d Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 24 Aug 2023 16:10:51 -0400 Subject: [PATCH 088/156] hcl2template: report localtion for cycle detection When a datasource fails to be evaluated because a cycle has been detected, we point out one of the links of the chain now so that users have a better idea of what to look at. --- hcl2template/types.packer_config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 39283e59075..c9beb67bd0a 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -368,6 +368,7 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen "sources. Either your data source depends on more than ten " + "other data sources, or your data sources have a cyclic " + "dependency. Please simplify your config to continue. ", + Subject: &(cfg.Datasources[ref]).block.DefRange, }) return dependencies, diags } From d9259d6d12873360755f699d911ec8d0d3f680f9 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 24 Aug 2023 16:11:55 -0400 Subject: [PATCH 089/156] hcl2template: extract attr filter code from ds Datasources use their attribute's expressions to determine whether or not they depend on another datasource, in order to get the list of dependencies and execute them before executing a datasource. This code may be useful later on for figuring out the dependencies for any block, so we move this code to the utils.go file, and use this for datasources. --- hcl2template/types.packer_config.go | 31 ++++++++++------------------- hcl2template/utils.go | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index c9beb67bd0a..c344aa7b0b2 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -5,7 +5,6 @@ package hcl2template import ( "fmt" - "log" "sort" "strings" @@ -313,27 +312,17 @@ func (cfg *PackerConfig) evaluateDatasources(skipExecution bool) hcl.Diagnostics // with the datasources in its context. dependencies[ref] = []DatasourceRef{} - block := ds.block - body := block.Body - attrs, _ := body.JustAttributes() - - skipFirstEval := false - for _, attr := range attrs { - vars := attr.Expr.Variables() - for _, v := range vars { - // check whether the variable is a data source - if v.RootName() == "data" { - // construct, backwards, the data source type and name we - // need to evaluate before this one can be evaluated. - dependsOn := DatasourceRef{ - Type: v[1].(hcl.TraverseAttr).Name, - Name: v[2].(hcl.TraverseAttr).Name, - } - log.Printf("The data source %#v depends on datasource %#v", ref, dependsOn) - dependencies[ref] = append(dependencies[ref], dependsOn) - skipFirstEval = true - } + // Note: when looking at the expressions, we only need to care about + // attributes, as HCL2 expressions are not allowed in a block's labels. + vars := GetVarsByType(ds.block, "data") + for _, v := range vars { + // construct, backwards, the data source type and name we + // need to evaluate before this one can be evaluated. + dependsOn := DatasourceRef{ + Type: v[1].(hcl.TraverseAttr).Name, + Name: v[2].(hcl.TraverseAttr).Name, } + dependencies[ref] = append(dependencies[ref], dependsOn) } } diff --git a/hcl2template/utils.go b/hcl2template/utils.go index 98546a95456..a542a2467ac 100644 --- a/hcl2template/utils.go +++ b/hcl2template/utils.go @@ -186,3 +186,23 @@ func ConvertPluginConfigValueToHCLValue(v interface{}) (cty.Value, error) { } return buildValue, nil } + +func GetVarsByType(block *hcl.Block, topLevelLabels ...string) []hcl.Traversal { + attributes, _ := block.Body.JustAttributes() + + var vars []hcl.Traversal + + for _, attr := range attributes { + for _, variable := range attr.Expr.Variables() { + rootLabel := variable.RootName() + for _, label := range topLevelLabels { + if label == rootLabel { + vars = append(vars, variable) + break + } + } + } + } + + return vars +} From 51ec78622d3edace2a5ca174b4bcd690b0c8dae3 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 25 Aug 2023 14:55:26 -0400 Subject: [PATCH 090/156] hcl2template: simplify startDatasource function --- hcl2template/types.datasource.go | 17 +++++++++-------- hcl2template/types.packer_config.go | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hcl2template/types.datasource.go b/hcl2template/types.datasource.go index 348d06f452c..23bc7c5900f 100644 --- a/hcl2template/types.datasource.go +++ b/hcl2template/types.datasource.go @@ -10,7 +10,6 @@ import ( "github.com/hashicorp/hcl/v2/hclsyntax" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" hcl2shim "github.com/hashicorp/packer/hcl2template/shim" - "github.com/hashicorp/packer/packer" "github.com/zclconf/go-cty/cty" ) @@ -65,13 +64,15 @@ func (ds *Datasources) Values() (map[string]cty.Value, hcl.Diagnostics) { return res, diags } -func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, ref DatasourceRef, secondaryEvaluation bool) (packersdk.Datasource, hcl.Diagnostics) { +func (cfg *PackerConfig) startDatasource(ds DatasourceBlock) (packersdk.Datasource, hcl.Diagnostics) { var diags hcl.Diagnostics - block := cfg.Datasources[ref].block + block := ds.block + + dataSourceStore := cfg.parser.PluginConfig.DataSources if dataSourceStore == nil { diags = append(diags, &hcl.Diagnostic{ - Summary: "Unknown " + dataSourceLabel + " type " + ref.Type, + Summary: "Unknown " + dataSourceLabel + " type " + ds.Type, Subject: block.LabelRanges[0].Ptr(), Detail: "packer does not currently know any data source.", Severity: hcl.DiagError, @@ -79,9 +80,9 @@ func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, return nil, diags } - if !dataSourceStore.Has(ref.Type) { + if !dataSourceStore.Has(ds.Type) { diags = append(diags, &hcl.Diagnostic{ - Summary: "Unknown " + dataSourceLabel + " type " + ref.Type, + Summary: "Unknown " + dataSourceLabel + " type " + ds.Type, Subject: block.LabelRanges[0].Ptr(), Detail: fmt.Sprintf("known data sources: %v", dataSourceStore.List()), Severity: hcl.DiagError, @@ -89,7 +90,7 @@ func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, return nil, diags } - datasource, err := dataSourceStore.Start(ref.Type) + datasource, err := dataSourceStore.Start(ds.Type) if err != nil { diags = append(diags, &hcl.Diagnostic{ Summary: err.Error(), @@ -99,7 +100,7 @@ func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, } if datasource == nil { diags = append(diags, &hcl.Diagnostic{ - Summary: fmt.Sprintf("failed to start datasource plugin %q.%q", ref.Type, ref.Name), + Summary: fmt.Sprintf("failed to start datasource plugin %q.%q", ds.Type, ds.Name), Subject: &block.DefRange, Severity: hcl.DiagError, }) diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index c344aa7b0b2..10963226160 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -381,7 +381,7 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen // If we've gotten here, then it means ref doesn't seem to have any further // dependencies we need to evaluate first. Evaluate it, with the cfg's full // data source context. - datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref, true) + datasource, startDiags := cfg.startDatasource(ds) if startDiags.HasErrors() { diags = append(diags, startDiags...) return dependencies, diags From 434a1637f85be46c1e6ee585d9d45be7531a5d8b Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 25 Aug 2023 17:00:03 -0400 Subject: [PATCH 091/156] hcl2template: fix func to get vars from a config The previous implementation of the GetVarsByType function worked only on top-level attributes, ignoring the nested blocks in the structure. This implies that if a datasource depends on another through an expression within a nested block, we may not execute it first, and then executing this datasource before its dependent is possible, resulting in an error in the end. This commit is an attempt at making this more reliable for HCL configs, but only works on configs lifted from HCL files for now. We need to make this more reliable for later iterations. --- hcl2template/utils.go | 52 ++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/hcl2template/utils.go b/hcl2template/utils.go index a542a2467ac..ce9486ed676 100644 --- a/hcl2template/utils.go +++ b/hcl2template/utils.go @@ -11,6 +11,7 @@ import ( "github.com/gobwas/glob" "github.com/hashicorp/hcl/v2" + "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/hashicorp/packer/hcl2template/repl" hcl2shim "github.com/hashicorp/packer/hcl2template/shim" "github.com/zclconf/go-cty/cty" @@ -187,22 +188,47 @@ func ConvertPluginConfigValueToHCLValue(v interface{}) (cty.Value, error) { return buildValue, nil } +// GetVarsByType walks through a hcl body, and gathers all the Traversals that +// have a root type matching one of the specified top-level labels. +// +// This will only work on finite, expanded, HCL bodies. func GetVarsByType(block *hcl.Block, topLevelLabels ...string) []hcl.Traversal { - attributes, _ := block.Body.JustAttributes() - - var vars []hcl.Traversal - - for _, attr := range attributes { - for _, variable := range attr.Expr.Variables() { - rootLabel := variable.RootName() - for _, label := range topLevelLabels { - if label == rootLabel { - vars = append(vars, variable) - break - } + var travs []hcl.Traversal + + switch body := block.Body.(type) { + case *hclsyntax.Body: + travs = getVarsByTypeForHCLSyntaxBody(body) + default: + attrs, _ := body.JustAttributes() + for _, attr := range attrs { + travs = append(travs, attr.Expr.Variables()...) + } + } + + var rets []hcl.Traversal + for _, t := range travs { + varRootname := t.RootName() + for _, lbl := range topLevelLabels { + if varRootname == lbl { + rets = append(rets, t) + break } } } - return vars + return rets +} + +func getVarsByTypeForHCLSyntaxBody(body *hclsyntax.Body) []hcl.Traversal { + var rets []hcl.Traversal + + for _, attr := range body.Attributes { + rets = append(rets, attr.Expr.Variables()...) + } + + for _, block := range body.Blocks { + rets = append(rets, getVarsByTypeForHCLSyntaxBody(block.Body)...) + } + + return rets } From a1722abf073a34e0b0aa47fa4ade0d2fc3f6d76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 26 Jul 2023 23:29:26 +0200 Subject: [PATCH 092/156] website: Add community maintained IPSW data source Packer plugin --- website/data/plugins-manifest.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/data/plugins-manifest.json b/website/data/plugins-manifest.json index 63d9d26998b..5a3c0034ad6 100644 --- a/website/data/plugins-manifest.json +++ b/website/data/plugins-manifest.json @@ -37,6 +37,14 @@ "pluginTier": "verified", "isHcpPackerReady": false }, + { + "title": "IPSW", + "path": "ipsw", + "repo": "torarnv/packer-plugin-ipsw", + "version": "latest", + "sourceBranch": "main", + "pluginTier": "community" + }, { "title": "Kamatera", "path": "kamatera", From 020f18e37f7e8e7d4bcd665d419ed365cc8b3347 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 6 Oct 2023 10:48:31 -0400 Subject: [PATCH 093/156] command: remove unused FlagSetFlags enum The enumeration for FlagSetFlags, which presumably was added when the Meta structure was introduced, aims to pre-populate the flagset for a subcommand with a series of arguments. However, despite it being documented, it is actually not used, and therefore can safely be removed from the codebase. --- command/build.go | 2 +- command/console.go | 2 +- command/fix.go | 2 +- command/fmt.go | 2 +- command/hcl2_upgrade.go | 2 +- command/init.go | 2 +- command/inspect.go | 2 +- command/meta.go | 17 ++--------------- command/plugins_required.go | 2 +- command/validate.go | 2 +- 10 files changed, 11 insertions(+), 24 deletions(-) diff --git a/command/build.go b/command/build.go index c77687c3586..94361807407 100644 --- a/command/build.go +++ b/command/build.go @@ -43,7 +43,7 @@ func (c *BuildCommand) Run(args []string) int { func (c *BuildCommand) ParseArgs(args []string) (*BuildArgs, int) { var cfg BuildArgs - flags := c.Meta.FlagSet("build", FlagSetBuildFilter|FlagSetVars) + flags := c.Meta.FlagSet("build") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/console.go b/command/console.go index f942ec4bd4f..da24a06150e 100644 --- a/command/console.go +++ b/command/console.go @@ -43,7 +43,7 @@ func (c *ConsoleCommand) Run(args []string) int { func (c *ConsoleCommand) ParseArgs(args []string) (*ConsoleArgs, int) { var cfg ConsoleArgs - flags := c.Meta.FlagSet("console", FlagSetVars) + flags := c.Meta.FlagSet("console") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/fix.go b/command/fix.go index 708be59717d..07bc8021e80 100644 --- a/command/fix.go +++ b/command/fix.go @@ -36,7 +36,7 @@ func (c *FixCommand) Run(args []string) int { func (c *FixCommand) ParseArgs(args []string) (*FixArgs, int) { var cfg FixArgs - flags := c.Meta.FlagSet("fix", FlagSetNone) + flags := c.Meta.FlagSet("fix") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/fmt.go b/command/fmt.go index 095a6fc8c69..3a70bcf187d 100644 --- a/command/fmt.go +++ b/command/fmt.go @@ -28,7 +28,7 @@ func (c *FormatCommand) Run(args []string) int { func (c *FormatCommand) ParseArgs(args []string) (*FormatArgs, int) { var cfg FormatArgs - flags := c.Meta.FlagSet("format", FlagSetNone) + flags := c.Meta.FlagSet("format") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index 7802d409875..8295e4e8ae0 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -47,7 +47,7 @@ func (c *HCL2UpgradeCommand) Run(args []string) int { func (c *HCL2UpgradeCommand) ParseArgs(args []string) (*HCL2UpgradeArgs, int) { var cfg HCL2UpgradeArgs - flags := c.Meta.FlagSet("hcl2_upgrade", FlagSetNone) + flags := c.Meta.FlagSet("hcl2_upgrade") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/init.go b/command/init.go index 709e8ab0fdf..71332d57d25 100644 --- a/command/init.go +++ b/command/init.go @@ -37,7 +37,7 @@ func (c *InitCommand) Run(args []string) int { func (c *InitCommand) ParseArgs(args []string) (*InitArgs, int) { var cfg InitArgs - flags := c.Meta.FlagSet("init", 0) + flags := c.Meta.FlagSet("init") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/inspect.go b/command/inspect.go index 7a77ab76bb8..7e5ed316650 100644 --- a/command/inspect.go +++ b/command/inspect.go @@ -28,7 +28,7 @@ func (c *InspectCommand) Run(args []string) int { func (c *InspectCommand) ParseArgs(args []string) (*InspectArgs, int) { var cfg InspectArgs - flags := c.Meta.FlagSet("inspect", FlagSetVars) + flags := c.Meta.FlagSet("inspect") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/meta.go b/command/meta.go index 1989027499b..87ed70b906b 100644 --- a/command/meta.go +++ b/command/meta.go @@ -22,16 +22,6 @@ import ( "github.com/hashicorp/packer/version" ) -// FlagSetFlags is an enum to define what flags are present in the -// default FlagSet returned by Meta.FlagSet -type FlagSetFlags uint - -const ( - FlagSetNone FlagSetFlags = 0 - FlagSetBuildFilter FlagSetFlags = 1 << iota - FlagSetVars -) - // Meta contains the meta-options and functionality that nearly every // Packer command inherits. type Meta struct { @@ -72,11 +62,8 @@ func (m *Meta) Core(tpl *template.Template, cla *MetaArgs) (*packer.Core, error) return core, nil } -// FlagSet returns a FlagSet with the common flags that every -// command implements. The exact behavior of FlagSet can be configured -// using the flags as the second parameter, for example to disable -// build settings on the commands that don't handle builds. -func (m *Meta) FlagSet(n string, _ FlagSetFlags) *flag.FlagSet { +// FlagSet returns a FlagSet with Packer SDK Ui support built-in +func (m *Meta) FlagSet(n string) *flag.FlagSet { f := flag.NewFlagSet(n, flag.ContinueOnError) // Create an io.Writer that writes to our Ui properly for errors. diff --git a/command/plugins_required.go b/command/plugins_required.go index 04f86b3628c..7776b19210b 100644 --- a/command/plugins_required.go +++ b/command/plugins_required.go @@ -54,7 +54,7 @@ func (c *PluginsRequiredCommand) Run(args []string) int { func (c *PluginsRequiredCommand) ParseArgs(args []string) (*PluginsRequiredArgs, int) { var cfg PluginsRequiredArgs - flags := c.Meta.FlagSet("plugins required", 0) + flags := c.Meta.FlagSet("plugins required") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/validate.go b/command/validate.go index 60199bdbf71..5e40a5f9530 100644 --- a/command/validate.go +++ b/command/validate.go @@ -31,7 +31,7 @@ func (c *ValidateCommand) Run(args []string) int { func (c *ValidateCommand) ParseArgs(args []string) (*ValidateArgs, int) { var cfg ValidateArgs - flags := c.Meta.FlagSet("validate", FlagSetBuildFilter|FlagSetVars) + flags := c.Meta.FlagSet("validate") flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { From 0e5776a9afdd0892a1bc063b282cd20423edec80 Mon Sep 17 00:00:00 2001 From: Jamie Finnigan Date: Fri, 20 Oct 2023 15:01:42 -0700 Subject: [PATCH 094/156] build with Go 1.20.10 --- .go-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.go-version b/.go-version index 95393fc7d4d..acdfc7930c8 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.8 +1.20.10 From 193f5e1f60d115576834a9e802b43a9fb8f38895 Mon Sep 17 00:00:00 2001 From: Jamie Finnigan Date: Fri, 20 Oct 2023 15:02:04 -0700 Subject: [PATCH 095/156] go get -u golang.org/x/net && go mod tidy --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index f0b2dcbaa54..c6b9dcc6823 100644 --- a/go.mod +++ b/go.mod @@ -45,14 +45,14 @@ require ( github.com/ulikunitz/xz v0.5.10 github.com/zclconf/go-cty v1.10.0 github.com/zclconf/go-cty-yaml v1.0.1 - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/mod v0.8.0 - golang.org/x/net v0.13.0 + golang.org/x/net v0.17.0 golang.org/x/oauth2 v0.1.0 golang.org/x/sync v0.1.0 - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.6.0 google.golang.org/api v0.101.0 // indirect google.golang.org/grpc v1.50.1 diff --git a/go.sum b/go.sum index 34f7c200dc5..5ba38f4998a 100644 --- a/go.sum +++ b/go.sum @@ -796,8 +796,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= @@ -845,8 +845,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= @@ -907,21 +907,21 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= From 9a1d4b5219c579217d87ac136a25ab648c7560f0 Mon Sep 17 00:00:00 2001 From: Jamie Finnigan Date: Fri, 20 Oct 2023 15:02:39 -0700 Subject: [PATCH 096/156] go get -u google.golang.org/grpc && go mod tidy --- go.mod | 35 +++++++++++--------- go.sum | 103 +++++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 89 insertions(+), 49 deletions(-) diff --git a/go.mod b/go.mod index c6b9dcc6823..21cfd2aef87 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/hashicorp/packer require ( - cloud.google.com/go v0.105.0 // indirect + cloud.google.com/go v0.110.8 // indirect github.com/biogo/hts v1.4.3 github.com/cheggaaa/pb v1.0.27 github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e @@ -48,14 +48,14 @@ require ( golang.org/x/crypto v0.14.0 // indirect golang.org/x/mod v0.8.0 golang.org/x/net v0.17.0 - golang.org/x/oauth2 v0.1.0 - golang.org/x/sync v0.1.0 + golang.org/x/oauth2 v0.11.0 + golang.org/x/sync v0.3.0 golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.6.0 - google.golang.org/api v0.101.0 // indirect - google.golang.org/grpc v1.50.1 + google.golang.org/api v0.128.0 // indirect + google.golang.org/grpc v1.59.0 ) require ( @@ -75,10 +75,10 @@ require ( ) require ( - cloud.google.com/go/compute v1.12.1 // indirect - cloud.google.com/go/compute/metadata v0.1.1 // indirect - cloud.google.com/go/iam v0.6.0 // indirect - cloud.google.com/go/storage v1.27.0 // indirect + cloud.google.com/go/compute v1.23.0 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v1.1.2 // indirect + cloud.google.com/go/storage v1.30.1 // indirect github.com/Azure/azure-sdk-for-go v64.0.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.19 // indirect @@ -134,13 +134,14 @@ require ( github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.2.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.0.1 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.6.0 // indirect + github.com/google/uuid v1.3.1 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/aws-sdk-go-base v0.7.1 // indirect github.com/hashicorp/consul/api v1.10.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -197,15 +198,17 @@ require ( github.com/xanzy/ssh-agent v0.3.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.mongodb.org/mongo-driver v1.11.0 // indirect - go.opencensus.io v0.23.0 // indirect + go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.11.1 // indirect go.opentelemetry.io/otel/trace v1.11.1 // indirect golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/go.sum b/go.sum index 5ba38f4998a..78887ed7807 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,16 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute/metadata v0.1.1 h1:/sxEbyrm6cw+XOUw1YxBHlatV71z4vpnmO7z2IZ0h3I= -cloud.google.com/go/compute/metadata v0.1.1/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/iam v0.6.0 h1:nsqQC88kT5Iwlm4MeNGTpfMWddp6NB/UOLFTH6m1QfQ= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/longrunning v0.1.1 h1:y50CXG4j0+qvEukslYFBCrzaXX0qpFbBzc3PchSu/LE= -cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/iam v1.1.2 h1:gacbrBdWcoVmGLozRuStX45YKvJtzIjJdAolzUs1sm4= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v64.0.0+incompatible h1:WAA77WBDWYtNfCC95V70VvkdzHe+wM/r2MQ9mG7fnQs= @@ -91,6 +91,7 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ= github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0 h1:JaCC8jz0zdMLk2m+qCCVLLLM/PL93p84w4pK3aJWj60= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-cidr v1.0.1 h1:NmIwLZ/KdsjIUlhf+/Np40atNXm/+lZ5txfTJ/SpF+U= github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= @@ -147,6 +148,11 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -187,6 +193,8 @@ github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -199,6 +207,7 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= @@ -326,8 +335,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -351,18 +361,21 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.4 h1:uGy6JWR/uMIILU8wbf+OkstIrNiMjGpEIyhx8f6W7s4= +github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 h1:BpJ2o0OR5FV7vrkDYfXYVJQeMNWa8RhklZOpW2ITAIQ= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE= github.com/hashicorp/aws-sdk-go-base v0.7.1 h1:7s/aR3hFn74tYPVihzDyZe7y/+BorN70rr9ZvpV3j3o= @@ -677,6 +690,7 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -720,6 +734,7 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= @@ -751,6 +766,7 @@ github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgk github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= @@ -765,13 +781,14 @@ go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAV go.mongodb.org/mongo-driver v1.11.0 h1:FZKhBSTydeuffHj9CBjXlR8vQLee1cQyTWYPA6/tqiE= go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -795,6 +812,7 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= @@ -815,6 +833,7 @@ golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1/go.mod h1:jFTmtFYCV0MFtXB golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -824,6 +843,7 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -838,6 +858,7 @@ golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= @@ -845,11 +866,13 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -859,8 +882,9 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -905,6 +929,8 @@ golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= @@ -920,6 +946,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -945,6 +972,7 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -953,8 +981,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.101.0 h1:lJPPeEBIRxGpGLwnBTam1NPEM8Z2BmmXEd3z812pjwM= -google.golang.org/api v0.101.0/go.mod h1:CjxAAWWt3A3VrUE2IGDY2bgK5qhoG/OkyWVlYcP05MY= +google.golang.org/api v0.128.0 h1:RjPESny5CnQRn9V6siglged+DZCgfu9l6mO9dkX9VOg= +google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -964,9 +992,14 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a h1:fwgW9j3vHirt4ObdHoYNwuO24BEZjSzbh+zPaNWoiY8= +google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -976,9 +1009,12 @@ google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -990,8 +1026,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1014,6 +1050,7 @@ gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From fa5d0359eb636ad68d8073162b31c52c63990e7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 23:23:38 +0000 Subject: [PATCH 097/156] build(deps-dev): bump @babel/traverse from 7.17.9 to 7.23.2 in /website Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.17.9 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/package-lock.json | 492 +++++++++++++++++++++++++------------- 1 file changed, 322 insertions(+), 170 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index fa295779654..55458aed469 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -32,17 +32,80 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { "version": "7.17.7", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", @@ -92,28 +155,20 @@ } }, "node_modules/@babel/generator": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.9.tgz", - "integrity": "sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.17.7", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", @@ -142,37 +197,34 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -231,21 +283,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -275,13 +336,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz", - "integrity": "sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -326,13 +387,13 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { "node": ">=4" @@ -351,9 +412,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.9.tgz", - "integrity": "sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -574,33 +635,33 @@ } }, "node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.9.tgz", - "integrity": "sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.9", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.9", - "@babel/types": "^7.17.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -618,12 +679,13 @@ } }, "node_modules/@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1483,29 +1545,52 @@ "node": ">= 10.14.2" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.8.tgz", - "integrity": "sha512-zdpaWDz5IEyHlu1EO+B+qRHmJkSxMVV6SXngDry9n1ZqslLXFH9Dw6lRqDidm/sOJAWdRltJsmZ1SK28/uZKsw==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@mdx-js/util": { @@ -13981,12 +14066,65 @@ } }, "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/compat-data": { @@ -14027,22 +14165,15 @@ } }, "@babel/generator": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.9.tgz", - "integrity": "sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" } }, "@babel/helper-compilation-targets": { @@ -14066,31 +14197,28 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true }, "@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-imports": { @@ -14134,18 +14262,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -14166,13 +14300,13 @@ } }, "@babel/highlight": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz", - "integrity": "sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "dependencies": { @@ -14208,13 +14342,13 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true }, "supports-color": { @@ -14229,9 +14363,9 @@ } }, "@babel/parser": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.9.tgz", - "integrity": "sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-proposal-object-rest-spread": { @@ -14392,30 +14526,30 @@ } }, "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.9.tgz", - "integrity": "sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.9", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.9", - "@babel/types": "^7.17.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -14429,12 +14563,13 @@ } }, "@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -15101,26 +15236,43 @@ "chalk": "^4.0.0" } }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.8.tgz", - "integrity": "sha512-zdpaWDz5IEyHlu1EO+B+qRHmJkSxMVV6SXngDry9n1ZqslLXFH9Dw6lRqDidm/sOJAWdRltJsmZ1SK28/uZKsw==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@mdx-js/util": { From ac71611cf5340cb416cab9874866fb60e2c6b501 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 18 Oct 2023 14:16:52 -0400 Subject: [PATCH 098/156] Remove all HashiCorp vendored plugins --- command/meta.go | 27 +++++ command/vendored_plugins.go | 207 ++---------------------------------- go.mod | 34 +----- go.sum | 113 +------------------- 4 files changed, 38 insertions(+), 343 deletions(-) diff --git a/command/meta.go b/command/meta.go index 87ed70b906b..455478e2188 100644 --- a/command/meta.go +++ b/command/meta.go @@ -343,3 +343,30 @@ func (m *Meta) detectBundledPluginsHCL2(config *hcl2template.PackerConfig) []str return compileBundledPluginList(bundledPlugins) } + +func generateRequiredPluginsBlock(plugins []string) string { + if len(plugins) == 0 { + return "" + } + + buf := &strings.Builder{} + buf.WriteString(` +packer { + required_plugins {`) + + for _, plugin := range plugins { + pluginName := strings.Replace(plugin, "github.com/hashicorp/", "", 1) + fmt.Fprintf(buf, ` + %s = { + source = %q + version = "~> 1" + }`, pluginName, plugin) + } + + buf.WriteString(` + } +} +`) + + return buf.String() +} diff --git a/command/vendored_plugins.go b/command/vendored_plugins.go index d412db98bf6..5853e34cac4 100644 --- a/command/vendored_plugins.go +++ b/command/vendored_plugins.go @@ -4,159 +4,36 @@ package command import ( - "fmt" "log" - "strings" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - // Previously core-bundled components, split into their own plugins but // still vendored with Packer for now. Importing as library instead of // forcing use of packer init. - - amazonchrootbuilder "github.com/hashicorp/packer-plugin-amazon/builder/chroot" - amazonebsbuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebs" - amazonebssurrogatebuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate" - amazonebsvolumebuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume" - amazoninstancebuilder "github.com/hashicorp/packer-plugin-amazon/builder/instance" - amazonamidatasource "github.com/hashicorp/packer-plugin-amazon/datasource/ami" - amazonsecretsmanagerdatasource "github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager" - anazibimportpostprocessor "github.com/hashicorp/packer-plugin-amazon/post-processor/import" - ansibleprovisioner "github.com/hashicorp/packer-plugin-ansible/provisioner/ansible" - ansiblelocalprovisioner "github.com/hashicorp/packer-plugin-ansible/provisioner/ansible-local" - azurearmbuilder "github.com/hashicorp/packer-plugin-azure/builder/azure/arm" - azurechrootbuilder "github.com/hashicorp/packer-plugin-azure/builder/azure/chroot" - azuredtlbuilder "github.com/hashicorp/packer-plugin-azure/builder/azure/dtl" - azuredtlartifactprovisioner "github.com/hashicorp/packer-plugin-azure/provisioner/azure-dtlartifact" - dockerbuilder "github.com/hashicorp/packer-plugin-docker/builder/docker" - dockerimportpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-import" - dockerpushpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-push" - dockersavepostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-save" - dockertagpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-tag" - googlecomputebuilder "github.com/hashicorp/packer-plugin-googlecompute/builder/googlecompute" - googlecomputeexportpostprocessor "github.com/hashicorp/packer-plugin-googlecompute/post-processor/googlecompute-export" - googlecomputeimportpostprocessor "github.com/hashicorp/packer-plugin-googlecompute/post-processor/googlecompute-import" - qemubuilder "github.com/hashicorp/packer-plugin-qemu/builder/qemu" - vagrantbuilder "github.com/hashicorp/packer-plugin-vagrant/builder/vagrant" - vagrantpostprocessor "github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant" - vagrantcloudpostprocessor "github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant-cloud" - virtualboxisobuilder "github.com/hashicorp/packer-plugin-virtualbox/builder/virtualbox/iso" - virtualboxovfbuilder "github.com/hashicorp/packer-plugin-virtualbox/builder/virtualbox/ovf" - virtualboxvmbuilder "github.com/hashicorp/packer-plugin-virtualbox/builder/virtualbox/vm" - vmwareisobuilder "github.com/hashicorp/packer-plugin-vmware/builder/vmware/iso" - vmwarevmxbuilder "github.com/hashicorp/packer-plugin-vmware/builder/vmware/vmx" - vsphereclonebuilder "github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/clone" - vsphereisobuilder "github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/iso" - vspherepostprocessor "github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere" - vspheretemplatepostprocessor "github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template" ) // VendoredDatasources are datasource components that were once bundled with the // Packer core, but are now being imported from their counterpart plugin repos -var VendoredDatasources = map[string]packersdk.Datasource{ - "amazon-ami": new(amazonamidatasource.Datasource), - "amazon-secretsmanager": new(amazonsecretsmanagerdatasource.Datasource), -} +var VendoredDatasources = map[string]packersdk.Datasource{} // VendoredBuilders are builder components that were once bundled with the // Packer core, but are now being imported from their counterpart plugin repos -var VendoredBuilders = map[string]packersdk.Builder{ - "amazon-ebs": new(amazonebsbuilder.Builder), - "amazon-chroot": new(amazonchrootbuilder.Builder), - "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), - "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), - "amazon-instance": new(amazoninstancebuilder.Builder), - "azure-arm": new(azurearmbuilder.Builder), - "azure-chroot": new(azurechrootbuilder.Builder), - "azure-dtl": new(azuredtlbuilder.Builder), - "docker": new(dockerbuilder.Builder), - "googlecompute": new(googlecomputebuilder.Builder), - "qemu": new(qemubuilder.Builder), - "vagrant": new(vagrantbuilder.Builder), - "vsphere-clone": new(vsphereclonebuilder.Builder), - "vsphere-iso": new(vsphereisobuilder.Builder), - "virtualbox-iso": new(virtualboxisobuilder.Builder), - "virtualbox-ovf": new(virtualboxovfbuilder.Builder), - "virtualbox-vm": new(virtualboxvmbuilder.Builder), - "vmware-iso": new(vmwareisobuilder.Builder), - "vmware-vmx": new(vmwarevmxbuilder.Builder), -} +var VendoredBuilders = map[string]packersdk.Builder{} // VendoredProvisioners are provisioner components that were once bundled with the // Packer core, but are now being imported from their counterpart plugin repos -var VendoredProvisioners = map[string]packersdk.Provisioner{ - "azure-dtlartifact": new(azuredtlartifactprovisioner.Provisioner), - "ansible": new(ansibleprovisioner.Provisioner), - "ansible-local": new(ansiblelocalprovisioner.Provisioner), -} +var VendoredProvisioners = map[string]packersdk.Provisioner{} // VendoredPostProcessors are post-processor components that were once bundled with the // Packer core, but are now being imported from their counterpart plugin repos -var VendoredPostProcessors = map[string]packersdk.PostProcessor{ - "amazon-import": new(anazibimportpostprocessor.PostProcessor), - "docker-import": new(dockerimportpostprocessor.PostProcessor), - "docker-push": new(dockerpushpostprocessor.PostProcessor), - "docker-save": new(dockersavepostprocessor.PostProcessor), - "docker-tag": new(dockertagpostprocessor.PostProcessor), - "googlecompute-export": new(googlecomputeexportpostprocessor.PostProcessor), - "googlecompute-import": new(googlecomputeimportpostprocessor.PostProcessor), - "vagrant": new(vagrantpostprocessor.PostProcessor), - "vagrant-cloud": new(vagrantcloudpostprocessor.PostProcessor), - "vsphere-template": new(vspheretemplatepostprocessor.PostProcessor), - "vsphere": new(vspherepostprocessor.PostProcessor), -} +var VendoredPostProcessors = map[string]packersdk.PostProcessor{} // bundledStatus is used to know if one of the bundled components is loaded from // an external plugin, or from the bundled plugins. // // We keep track of this to produce a warning if a user relies on one // such plugin, as they will be removed in a later version of Packer. -var bundledStatus = map[string]bool{ - "packer-builder-amazon-ebs": false, - "packer-builder-amazon-chroot": false, - "packer-builder-amazon-ebssurrogate": false, - "packer-builder-amazon-ebsvolume": false, - "packer-builder-amazon-instance": false, - "packer-post-processor-amazon-import": false, - "packer-datasource-amazon-ami": false, - "packer-datasource-amazon-secretsmanager": false, - - "packer-provisioner-ansible": false, - "packer-provisioner-ansible-local": false, - - "packer-provisioner-azure-dtlartifact": false, - "packer-builder-azure-arm": false, - "packer-builder-azure-chroot": false, - "packer-builder-azure-dtl": false, - - "packer-builder-docker": false, - "packer-post-processor-docker-import": false, - "packer-post-processor-docker-push": false, - "packer-post-processor-docker-save": false, - "packer-post-processor-docker-tag": false, - - "packer-builder-googlecompute": false, - "packer-post-processor-googlecompute-export": false, - "packer-post-processor-googlecompute-import": false, - - "packer-builder-qemu": false, - - "packer-builder-vagrant": false, - "packer-post-processor-vagrant": false, - "packer-post-processor-vagrant-cloud": false, - - "packer-builder-virtualbox-iso": false, - "packer-builder-virtualbox-ovf": false, - "packer-builder-virtualbox-vm": false, - - "packer-builder-vmware-iso": false, - "packer-builder-vmware-vmx": false, - - "packer-builder-vsphere-clone": false, - "packer-builder-vsphere-iso": false, - "packer-post-processor-vsphere-template": false, - "packer-post-processor-vsphere": false, -} +var bundledStatus = map[string]bool{} // TrackBundledPlugin marks a component as loaded from Packer's bundled plugins // instead of from an externally loaded plugin. @@ -171,52 +48,7 @@ func TrackBundledPlugin(pluginName string) { bundledStatus[pluginName] = true } -var componentPluginMap = map[string]string{ - "packer-builder-amazon-ebs": "github.com/hashicorp/amazon", - "packer-builder-amazon-chroot": "github.com/hashicorp/amazon", - "packer-builder-amazon-ebssurrogate": "github.com/hashicorp/amazon", - "packer-builder-amazon-ebsvolume": "github.com/hashicorp/amazon", - "packer-builder-amazon-instance": "github.com/hashicorp/amazon", - "packer-post-processor-amazon-import": "github.com/hashicorp/amazon", - "packer-datasource-amazon-ami": "github.com/hashicorp/amazon", - "packer-datasource-amazon-secretsmanager": "github.com/hashicorp/amazon", - - "packer-provisioner-ansible": "github.com/hashicorp/ansible", - "packer-provisioner-ansible-local": "github.com/hashicorp/ansible", - - "packer-provisioner-azure-dtlartifact": "github.com/hashicorp/azure", - "packer-builder-azure-arm": "github.com/hashicorp/azure", - "packer-builder-azure-chroot": "github.com/hashicorp/azure", - "packer-builder-azure-dtl": "github.com/hashicorp/azure", - - "packer-builder-docker": "github.com/hashicorp/docker", - "packer-post-processor-docker-import": "github.com/hashicorp/docker", - "packer-post-processor-docker-push": "github.com/hashicorp/docker", - "packer-post-processor-docker-save": "github.com/hashicorp/docker", - "packer-post-processor-docker-tag": "github.com/hashicorp/docker", - - "packer-builder-googlecompute": "github.com/hashicorp/googlecompute", - "packer-post-processor-googlecompute-export": "github.com/hashicorp/googlecompute", - "packer-post-processor-googlecompute-import": "github.com/hashicorp/googlecompute", - - "packer-builder-qemu": "github.com/hashicorp/qemu", - - "packer-builder-vagrant": "github.com/hashicorp/vagrant", - "packer-post-processor-vagrant": "github.com/hashicorp/vagrant", - "packer-post-processor-vagrant-cloud": "github.com/hashicorp/vagrant", - - "packer-builder-virtualbox-iso": "github.com/hashicorp/virtualbox", - "packer-builder-virtualbox-ovf": "github.com/hashicorp/virtualbox", - "packer-builder-virtualbox-vm": "github.com/hashicorp/virtualbox", - - "packer-builder-vmware-iso": "github.com/hashicorp/vmware", - "packer-builder-vmware-vmx": "github.com/hashicorp/vmware", - - "packer-builder-vsphere-clone": "github.com/hashicorp/vsphere", - "packer-builder-vsphere-iso": "github.com/hashicorp/vsphere", - "packer-post-processor-vsphere-template": "github.com/hashicorp/vsphere", - "packer-post-processor-vsphere": "github.com/hashicorp/vsphere", -} +var componentPluginMap = map[string]string{} // compileBundledPluginList returns a list of plugins to import in a config // @@ -243,33 +75,6 @@ func compileBundledPluginList(componentMap map[string]struct{}) []string { return pluginList } -func generateRequiredPluginsBlock(plugins []string) string { - if len(plugins) == 0 { - return "" - } - - buf := &strings.Builder{} - buf.WriteString(` -packer { - required_plugins {`) - - for _, plugin := range plugins { - pluginName := strings.Replace(plugin, "github.com/hashicorp/", "", 1) - fmt.Fprintf(buf, ` - %s = { - source = %q - version = "~> 1" - }`, pluginName, plugin) - } - - buf.WriteString(` - } -} -`) - - return buf.String() -} - // Upon init lets load up any plugins that were vendored manually into the default // set of plugins. func init() { diff --git a/go.mod b/go.mod index 21cfd2aef87..5e353017141 100644 --- a/go.mod +++ b/go.mod @@ -60,15 +60,6 @@ require ( require ( github.com/go-openapi/strfmt v0.21.3 - github.com/hashicorp/packer-plugin-ansible v1.0.3 - github.com/hashicorp/packer-plugin-azure v1.4.0 - github.com/hashicorp/packer-plugin-docker v1.0.8 - github.com/hashicorp/packer-plugin-googlecompute v1.1.0 - github.com/hashicorp/packer-plugin-qemu v1.0.9 - github.com/hashicorp/packer-plugin-vagrant v1.0.3 - github.com/hashicorp/packer-plugin-virtualbox v1.0.4 - github.com/hashicorp/packer-plugin-vmware v1.0.7 - github.com/hashicorp/packer-plugin-vsphere v1.1.1 github.com/oklog/ulid v1.3.1 github.com/pierrec/lz4/v4 v4.1.18 github.com/shirou/gopsutil/v3 v3.23.4 @@ -79,17 +70,6 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.2 // indirect cloud.google.com/go/storage v1.30.1 // indirect - github.com/Azure/azure-sdk-for-go v64.0.0+incompatible // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.19 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect - github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect - github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect - github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect github.com/Masterminds/goutils v1.1.1 // indirect @@ -111,9 +91,6 @@ require ( github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/chzyer/test v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1 // indirect - github.com/digitalocean/go-qemu v0.0.0-20210326154740-ac9e0b687001 // indirect - github.com/dimchansky/utfbom v1.1.1 // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect github.com/emirpasic/gods v1.12.0 // indirect github.com/fatih/color v1.12.0 // indirect @@ -131,21 +108,16 @@ require ( github.com/go-openapi/swag v0.22.3 // indirect github.com/go-openapi/validate v0.22.1 // indirect github.com/gofrs/uuid v4.0.0+incompatible // indirect - github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 // indirect - github.com/golang-jwt/jwt v3.2.2+incompatible // indirect - github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/s2a-go v0.1.4 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.1 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/aws-sdk-go-base v0.7.1 // indirect github.com/hashicorp/consul/api v1.10.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-azure-helpers v0.16.5 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter/gcs/v2 v2.2.0 // indirect github.com/hashicorp/go-getter/s3/v2 v2.2.0 // indirect @@ -168,6 +140,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect github.com/kr/fs v0.1.0 // indirect + github.com/kr/pretty v0.3.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect @@ -177,16 +150,15 @@ require ( github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/iochan v1.0.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shoenig/go-m1cpu v0.1.5 // indirect @@ -194,14 +166,12 @@ require ( github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/ugorji/go/codec v1.2.6 // indirect - github.com/vmware/govmomi v0.29.0 // indirect github.com/xanzy/ssh-agent v0.3.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.mongodb.org/mongo-driver v1.11.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.11.1 // indirect go.opentelemetry.io/otel/trace v1.11.1 // indirect - golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 78887ed7807..f693b73893e 100644 --- a/go.sum +++ b/go.sum @@ -12,48 +12,7 @@ cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+K cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v64.0.0+incompatible h1:WAA77WBDWYtNfCC95V70VvkdzHe+wM/r2MQ9mG7fnQs= -github.com/Azure/azure-sdk-for-go v64.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.19 h1:7/IqD2fEYVha1EPeaiytVKhzmPV223pfkRIQUGOK2IE= -github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= -github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= -github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 h1:dMOmEJfkLKW/7JsokJqkyoYSgmR08hi9KrhjZb+JALY= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= @@ -99,7 +58,6 @@ github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/approvals/go-approval-tests v0.0.0-20210131072903-38d0b0ec12b1 h1:uroQ0JaeVom9Ffv9xFtc7DcqrpGmyQeZCRzHD9FqPBg= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= @@ -168,15 +126,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1 h1:j6vGflaQ2T7yOWqVgPdiRF73j/U2Zmpbbzab8nyDCRQ= -github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1/go.mod h1:QS1XzqZLcDniNYrN7EZefq3wIyb/M2WmJbql4ZKoc1Q= -github.com/digitalocean/go-qemu v0.0.0-20210326154740-ac9e0b687001 h1:WAg57gnaAWWjMAELcwHjc2xy0PoXQ5G+vn3+XS6s1jI= -github.com/digitalocean/go-qemu v0.0.0-20210326154740-ac9e0b687001/go.mod h1:IetBE52JfFxK46p2n2Rqm+p5Gx1gpu2hRHsrbnPOWZQ= -github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20200319182547-c7ad2b866182/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= @@ -196,14 +145,12 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -308,13 +255,6 @@ github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 h1:zN2lZNZRflqFyxVaTIU61KNKQ9C0055u9CAfpmqUvo4= -github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3/go.mod h1:nPpo7qLxd6XL3hWJG/O60sR8ZKfMCiIoNap5GvD12KU= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -364,8 +304,6 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= @@ -387,8 +325,6 @@ github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOj github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-azure-helpers v0.16.5 h1:rhcpg2Nk1Li6173KTHNnj/i+MGXYNjvYKIdNlg6q3RU= -github.com/hashicorp/go-azure-helpers v0.16.5/go.mod h1:kR7+sTDEb9TOp/O80ss1UEJg1t4/BHLD/U8wHLS4BGQ= github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de h1:XDCSythtg8aWSRSO29uwhgh7b127fWr+m5SemqjSUL8= github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de/go.mod h1:xIwEieBHERyEvaeKF/TcHh1Hu+lxPM+n2vT1+g9I4m4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -442,7 +378,6 @@ github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2I github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -462,26 +397,8 @@ github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/packer-plugin-amazon v1.2.1 h1:0Xqr8KsTJJhIo0vvjqPYrVMgyVxNRuYH4DeB5m/WAtw= github.com/hashicorp/packer-plugin-amazon v1.2.1/go.mod h1:qlp0h5TWVGgcPzN9mSxPiEAwOUOW3XU/zep0pGd0ZsM= -github.com/hashicorp/packer-plugin-ansible v1.0.3 h1:XjltQVPYnnZdNyBjwHr1QthR413SjZxTtRrmM0sM3VI= -github.com/hashicorp/packer-plugin-ansible v1.0.3/go.mod h1:N4OZtNDq2FSRBknuNU/GSoKtllfxQnHCYYaJUD1p1MA= -github.com/hashicorp/packer-plugin-azure v1.4.0 h1:rxkcGe5pjjnzddfR5/sBJmg8kb+ko+r2M+Ce7OC8sQ4= -github.com/hashicorp/packer-plugin-azure v1.4.0/go.mod h1:7j1q0SNPeZr7xRID0c/Hu9QojE41pSlSJwsNB9/rOTI= -github.com/hashicorp/packer-plugin-docker v1.0.8 h1:UWPG/pl+1RFsaNQVhEuowCeOZuES6/mqy5R6FTyMeQo= -github.com/hashicorp/packer-plugin-docker v1.0.8/go.mod h1:4U3gHULbUw3okSqqZgQZD5ptyJKs0S7LfOOt2U3V4Jk= -github.com/hashicorp/packer-plugin-googlecompute v1.1.0 h1:/cSZCJuRV6osaSa1uOy8cpN+c/uiCbrSsZ8vyNC0slk= -github.com/hashicorp/packer-plugin-googlecompute v1.1.0/go.mod h1:k7MhKwEDw9ASP3a1y1syKJFZiZ8pO4oH40HvVgGHzUE= -github.com/hashicorp/packer-plugin-qemu v1.0.9 h1:1YKBBzBULYUBWtpAZJTbaLjjZPAdQ63okkpTqMBTnzM= -github.com/hashicorp/packer-plugin-qemu v1.0.9/go.mod h1:BpWIpVpOoPFV9Ppmzq4DP/S0QNoh1R+7DUCqxHdXc+Y= github.com/hashicorp/packer-plugin-sdk v0.4.0 h1:UyLYe0y02D9wkOQ3FeeZWyFg2+mx2vLuWRGUL5xt50I= github.com/hashicorp/packer-plugin-sdk v0.4.0/go.mod h1:uNhU3pmjM2ejgHYce/g4J+sa5rh81iYQztpGvGa5FOs= -github.com/hashicorp/packer-plugin-vagrant v1.0.3 h1:IUfEdYuAjSjGsgJI2rnZ1qEo5rI0UWoueJ+yq9ysx4M= -github.com/hashicorp/packer-plugin-vagrant v1.0.3/go.mod h1:Ymg8LJrT8N2Dclu91G3ZhXpE67jL7hfbtyDVKeNsKTc= -github.com/hashicorp/packer-plugin-virtualbox v1.0.4 h1:mceFO34yhBU4BUMmCcQAB6KQ98GPjBIXTG3eS22RmZM= -github.com/hashicorp/packer-plugin-virtualbox v1.0.4/go.mod h1:rnDkWJpkbcFPBmsMZcoImWDd9kLjTiXiN0sfHypuHac= -github.com/hashicorp/packer-plugin-vmware v1.0.7 h1:cnc6XRNAkE+P5EoiI4VLXmIUeb2VAqW6zdNFmIW11YY= -github.com/hashicorp/packer-plugin-vmware v1.0.7/go.mod h1:AGeNk9f/qKUP8yGoiofMqvBw8TJLtdhsZgvqannZQS4= -github.com/hashicorp/packer-plugin-vsphere v1.1.1 h1:X4PtYV7TGPqoudjfvHpI2qRl9pAGf1SfkiJ7sMCKAEU= -github.com/hashicorp/packer-plugin-vsphere v1.1.1/go.mod h1:kLbvU4EwRISjhvY3c5pVisCKE0Usn+pOMRkIPnwcPfU= github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/vault/api v1.0.5-0.20200519221902-385fac77e20f/go.mod h1:euTFbi2YJgwcju3imEt919lhJKF68nN1cQPq3aA+kBE= @@ -540,6 +457,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -600,8 +518,6 @@ github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go. github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed h1:FI2NIv6fpef6BQl2u3IZX/Cj20tfypRF4yd+uaHOMtI= -github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= @@ -694,7 +610,9 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= @@ -754,8 +672,6 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/vmware/govmomi v0.29.0 h1:SHJQ7DUc4fltFZv16znJNGHR1/XhiDK5iKxm2OqwkuU= -github.com/vmware/govmomi v0.29.0/go.mod h1:F7adsVewLNHsW/IIm7ziFURaXDaHEwcc+ym4r3INMdY= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -764,8 +680,6 @@ github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23n github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= @@ -800,15 +714,11 @@ golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -818,7 +728,6 @@ golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -826,13 +735,8 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 h1:t3ZHqovedSY8DEAUmZA99fPJhUhOb176PLACYA1sJ8Y= -golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1/go.mod h1:jFTmtFYCV0MFtXBU+J5V/+5AUeVS0ON/0WkE/KSrl6E= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -857,12 +761,10 @@ golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -880,7 +782,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= @@ -918,15 +819,12 @@ golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -935,7 +833,6 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= @@ -959,7 +856,6 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -970,13 +866,10 @@ golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= From c65bb2fdca5618daa4b06f86dabded5b19a3b1bd Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 18 Oct 2023 14:19:48 -0400 Subject: [PATCH 099/156] Remove amazon plugin from acceptance test --- acctest/plugin/bundled_plugin_test.go | 184 ------------------ acctest/plugin/component_acc_test.go | 8 - acctest/plugin/plugin_acc_test.go | 8 - .../basic-amazon-ami-datasource.pkr.hcl | 3 +- .../test-fixtures/basic-amazon-ebs.pkr.hcl | 15 +- .../test-fixtures/basic_amazon_bundled.json | 10 - .../basic_amazon_bundled.pkr.hcl | 11 -- ...basic_amazon_with_required_plugins.pkr.hcl | 20 -- command/exec_test.go | 7 +- 9 files changed, 12 insertions(+), 254 deletions(-) delete mode 100644 acctest/plugin/bundled_plugin_test.go delete mode 100644 acctest/plugin/test-fixtures/basic_amazon_bundled.json delete mode 100644 acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl delete mode 100644 acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl diff --git a/acctest/plugin/bundled_plugin_test.go b/acctest/plugin/bundled_plugin_test.go deleted file mode 100644 index c6652610955..00000000000 --- a/acctest/plugin/bundled_plugin_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package plugin - -import ( - _ "embed" - "errors" - "fmt" - "os" - "os/exec" - "strings" - "testing" - - "github.com/hashicorp/go-multierror" - amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance" - "github.com/hashicorp/packer-plugin-sdk/acctest" - "github.com/hashicorp/packer/hcl2template/addrs" -) - -//go:embed test-fixtures/basic_amazon_bundled.pkr.hcl -var basicAmazonBundledEbsTemplate string - -func TestAccBuildBundledPlugins(t *testing.T) { - plugin := addrs.Plugin{ - Hostname: "github.com", - Namespace: "hashicorp", - Type: "amazon", - } - testCase := &acctest.PluginTestCase{ - Name: "amazon-ebs_bundled_test", - Setup: func() error { - return cleanupPluginInstallation(plugin) - }, - Teardown: func() error { - helper := amazonacc.AMIHelper{ - Region: "us-east-1", - Name: "packer-plugin-bundled-amazon-ebs-test", - } - return helper.CleanUpAmi() - }, - Template: basicAmazonBundledEbsTemplate, - Type: "amazon-ebs", - Init: false, - Check: func(buildCommand *exec.Cmd, logfile string) error { - if buildCommand.ProcessState != nil { - if buildCommand.ProcessState.ExitCode() != 0 { - return fmt.Errorf("Bad exit code. Logfile: %s", logfile) - } - } - - rawLogs, err := os.ReadFile(logfile) - if err != nil { - return fmt.Errorf("failed to read logs: %s", err) - } - - var errs error - - logs := string(rawLogs) - - if !strings.Contains(logs, "Warning: Bundled plugins used") { - errs = multierror.Append(errs, errors.New("expected warning about bundled plugins used, did not find it")) - } - - if !strings.Contains(logs, "Then run 'packer init' to manage installation of the plugins") { - errs = multierror.Append(errs, errors.New("expected suggestion about packer init in logs, did not find it.")) - } - - return errs - }, - } - - acctest.TestPlugin(t, testCase) -} - -//go:embed test-fixtures/basic_amazon_with_required_plugins.pkr.hcl -var basicAmazonRequiredPluginEbsTemplate string - -func TestAccBuildBundledPluginsWithRequiredPlugins(t *testing.T) { - plugin := addrs.Plugin{ - Hostname: "github.com", - Namespace: "hashicorp", - Type: "amazon", - } - testCase := &acctest.PluginTestCase{ - Name: "amazon-ebs_with_required_plugins_test", - Setup: func() error { - return cleanupPluginInstallation(plugin) - }, - Teardown: func() error { - helper := amazonacc.AMIHelper{ - Region: "us-east-1", - Name: "packer-plugin-required-plugin-amazon-ebs-test", - } - return helper.CleanUpAmi() - }, - Template: basicAmazonRequiredPluginEbsTemplate, - Type: "amazon-ebs", - Init: false, - Check: func(buildCommand *exec.Cmd, logfile string) error { - if buildCommand.ProcessState != nil { - if buildCommand.ProcessState.ExitCode() != 1 { - return fmt.Errorf("Bad exit code. Logfile: %s", logfile) - } - } - - rawLogs, err := os.ReadFile(logfile) - if err != nil { - return fmt.Errorf("failed to read logs: %s", err) - } - - var errs error - - logs := string(rawLogs) - - if strings.Contains(logs, "Warning: Bundled plugins used") { - errs = multierror.Append(errs, errors.New("did not expect warning about bundled plugins used")) - } - - if !strings.Contains(logs, "Missing plugins") { - errs = multierror.Append(errs, errors.New("expected error about plugins required and not installed, did not find it")) - } - - return errs - }, - } - - acctest.TestPlugin(t, testCase) -} - -//go:embed test-fixtures/basic_amazon_bundled.json -var basicAmazonBundledEbsTemplateJSON string - -func TestAccBuildBundledPluginsJSON(t *testing.T) { - plugin := addrs.Plugin{ - Hostname: "github.com", - Namespace: "hashicorp", - Type: "amazon", - } - testCase := &acctest.PluginTestCase{ - Name: "amazon-ebs_bundled_test_json", - Setup: func() error { - return cleanupPluginInstallation(plugin) - }, - Teardown: func() error { - helper := amazonacc.AMIHelper{ - Region: "us-east-1", - Name: "packer-plugin-bundled-amazon-ebs-test-json", - } - return helper.CleanUpAmi() - }, - Template: basicAmazonBundledEbsTemplateJSON, - Type: "amazon-ebs", - Init: false, - Check: func(buildCommand *exec.Cmd, logfile string) error { - if buildCommand.ProcessState != nil { - if buildCommand.ProcessState.ExitCode() != 0 { - return fmt.Errorf("Bad exit code. Logfile: %s", logfile) - } - } - - rawLogs, err := os.ReadFile(logfile) - if err != nil { - return fmt.Errorf("failed to read logs: %s", err) - } - - var errs error - - logs := string(rawLogs) - - if !strings.Contains(logs, "Warning: Bundled plugins used") { - errs = multierror.Append(errs, errors.New("expected warning about bundled plugins, did not find it.")) - } - - if !strings.Contains(logs, "plugins with the 'packer plugins install' command") { - errs = multierror.Append(errs, errors.New("expected suggestion about packer plugins install in logs, did not find it.")) - } - - return errs - }, - } - - acctest.TestPlugin(t, testCase) -} diff --git a/acctest/plugin/component_acc_test.go b/acctest/plugin/component_acc_test.go index e78c77284c0..53a49ad229c 100644 --- a/acctest/plugin/component_acc_test.go +++ b/acctest/plugin/component_acc_test.go @@ -13,7 +13,6 @@ import ( "os/exec" "testing" - amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance" "github.com/hashicorp/packer-plugin-sdk/acctest" "github.com/hashicorp/packer/hcl2template/addrs" ) @@ -32,13 +31,6 @@ func TestAccInitAndBuildBasicAmazonAmiDatasource(t *testing.T) { Setup: func() error { return cleanupPluginInstallation(plugin) }, - Teardown: func() error { - helper := amazonacc.AMIHelper{ - Region: "us-west-2", - Name: "packer-amazon-ami-test", - } - return helper.CleanUpAmi() - }, Template: basicAmazonAmiDatasourceHCL2Template, Type: "amazon-ami", Init: true, diff --git a/acctest/plugin/plugin_acc_test.go b/acctest/plugin/plugin_acc_test.go index 6549b2129a3..b2afe7e8162 100644 --- a/acctest/plugin/plugin_acc_test.go +++ b/acctest/plugin/plugin_acc_test.go @@ -15,7 +15,6 @@ import ( "regexp" "testing" - amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance" "github.com/hashicorp/packer-plugin-sdk/acctest" "github.com/hashicorp/packer-plugin-sdk/acctest/testutils" "github.com/hashicorp/packer/hcl2template/addrs" @@ -36,13 +35,6 @@ func TestAccInitAndBuildBasicAmazonEbs(t *testing.T) { Setup: func() error { return cleanupPluginInstallation(plugin) }, - Teardown: func() error { - helper := amazonacc.AMIHelper{ - Region: "us-east-1", - Name: "packer-plugin-amazon-ebs-test", - } - return helper.CleanUpAmi() - }, Template: basicAmazonEbsHCL2Template, Type: "amazon-ebs", Init: true, diff --git a/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl b/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl index 7ff2d3127da..207530aa26f 100644 --- a/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl +++ b/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl @@ -1,7 +1,7 @@ packer { required_plugins { amazon = { - version = ">= 0.0.1" + version = "~>1" source = "github.com/hashicorp/amazon" } } @@ -25,6 +25,7 @@ source "amazon-ebs" "basic-example" { communicator = "ssh" instance_type = "t2.micro" ssh_username = "ubuntu" + skip_create_ami = true } build { diff --git a/acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl b/acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl index aa9399a9239..daaec2feb7f 100644 --- a/acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl +++ b/acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl @@ -1,18 +1,19 @@ packer { required_plugins { amazon = { - version = ">= 0.0.1" - source = "github.com/hashicorp/amazon" + version = "~> 1" + source = "github.com/hashicorp/amazon" } } } source "amazon-ebs" "basic-test" { - region = "us-east-1" - instance_type = "m3.medium" - source_ami = "ami-76b2a71e" - ssh_username = "ubuntu" - ami_name = "packer-plugin-amazon-ebs-test" + region = "us-east-1" + instance_type = "m3.medium" + source_ami = "ami-76b2a71e" + ssh_username = "ubuntu" + ami_name = "packer-plugin-amazon-ebs-test" + skip_create_ami = true } build { diff --git a/acctest/plugin/test-fixtures/basic_amazon_bundled.json b/acctest/plugin/test-fixtures/basic_amazon_bundled.json deleted file mode 100644 index f674cd130d1..00000000000 --- a/acctest/plugin/test-fixtures/basic_amazon_bundled.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "builders": [{ - "type": "amazon-ebs", - "region": "us-east-1", - "instance_type": "m3.medium", - "source_ami": "ami-76b2a71e", - "ssh_username": "ubuntu", - "ami_name": "packer-plugin-bundled-amazon-ebs-test-json" - }] -} diff --git a/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl b/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl deleted file mode 100644 index c17a09df04f..00000000000 --- a/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl +++ /dev/null @@ -1,11 +0,0 @@ -source "amazon-ebs" "basic-test" { - region = "us-east-1" - instance_type = "m3.medium" - source_ami = "ami-76b2a71e" - ssh_username = "ubuntu" - ami_name = "packer-plugin-bundled-amazon-ebs-test" -} - -build { - sources = ["source.amazon-ebs.basic-test"] -} diff --git a/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl b/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl deleted file mode 100644 index a30f85fa49e..00000000000 --- a/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl +++ /dev/null @@ -1,20 +0,0 @@ -packer { - required_plugins { - amazon = { - source = "github.com/hashicorp/amazon", - version = "~> 1" - } - } -} - -source "amazon-ebs" "basic-test" { - region = "us-east-1" - instance_type = "m3.medium" - source_ami = "ami-76b2a71e" - ssh_username = "ubuntu" - ami_name = "packer-plugin-external-amazon-ebs-test" -} - -build { - sources = ["source.amazon-ebs.basic-test"] -} diff --git a/command/exec_test.go b/command/exec_test.go index c4bf24ab157..debb2dacbf9 100644 --- a/command/exec_test.go +++ b/command/exec_test.go @@ -11,7 +11,6 @@ import ( "runtime" "testing" - "github.com/hashicorp/packer-plugin-amazon/builder/ebs" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer/builder/file" "github.com/hashicorp/packer/builder/null" @@ -121,10 +120,8 @@ func getBareComponentFinder() packer.ComponentFinder { return packer.ComponentFinder{ PluginConfig: &packer.PluginConfig{ Builders: packer.MapOfBuilder{ - "file": func() (packersdk.Builder, error) { return &file.Builder{}, nil }, - "null": func() (packersdk.Builder, error) { return &null.Builder{}, nil }, - "amazon-ebs": func() (packersdk.Builder, error) { return &ebs.Builder{}, nil }, - "azure-arm": func() (packersdk.Builder, error) { return &ebs.Builder{}, nil }, + "file": func() (packersdk.Builder, error) { return &file.Builder{}, nil }, + "null": func() (packersdk.Builder, error) { return &null.Builder{}, nil }, }, Provisioners: packer.MapOfProvisioner{ "shell-local": func() (packersdk.Provisioner, error) { return &shell_local.Provisioner{}, nil }, From e8d5436228567492bc05a2b00705da79d661ee6d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 19 Oct 2023 10:58:39 -0400 Subject: [PATCH 100/156] Remove functions for detecting plugin usage With the removal of vendored_plugins we are no longer interested in tacking bundled plugins usage. For plugins such as file, null, or anything bultin into Packer we don't track because there is no way to install them outside of Packer, for now. --- command/build.go | 2 - command/meta.go | 117 ------------------------------------ command/validate.go | 2 - command/vendored_plugins.go | 108 --------------------------------- config.go | 4 -- 5 files changed, 233 deletions(-) delete mode 100644 command/vendored_plugins.go diff --git a/command/build.go b/command/build.go index 94361807407..c9f7a537d1c 100644 --- a/command/build.go +++ b/command/build.go @@ -94,8 +94,6 @@ func (c *BuildCommand) RunContext(buildCtx context.Context, cla *BuildArgs) int } diags = packerStarter.Initialize(packer.InitializeOptions{}) - bundledDiags := c.DetectBundledPlugins(packerStarter) - diags = append(bundledDiags, diags...) ret = writeDiags(c.Ui, nil, diags) if ret != 0 { return ret diff --git a/command/meta.go b/command/meta.go index 455478e2188..0e464ccc36d 100644 --- a/command/meta.go +++ b/command/meta.go @@ -11,7 +11,6 @@ import ( "os" "strings" - "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclparse" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template" @@ -169,84 +168,6 @@ func (m *Meta) GetConfigFromJSON(cla *MetaArgs) (packer.Handler, int) { return core, ret } -func (m *Meta) DetectBundledPlugins(handler packer.Handler) hcl.Diagnostics { - var plugins []string - - switch h := handler.(type) { - case *packer.Core: - plugins = m.detectBundledPluginsJSON(h) - case *hcl2template.PackerConfig: - plugins = m.detectBundledPluginsHCL2(handler.(*hcl2template.PackerConfig)) - } - - if len(plugins) == 0 { - return nil - } - - packer.CheckpointReporter.SetBundledUsage() - - buf := &strings.Builder{} - buf.WriteString("This template relies on the use of plugins bundled into the Packer binary.\n") - buf.WriteString("The practice of bundling external plugins into Packer will be removed in an upcoming version.\n\n") - switch h := handler.(type) { - case *packer.Core: - buf.WriteString("To remove this warning and ensure builds keep working you can install these external plugins with the 'packer plugins install' command\n\n") - - for _, plugin := range plugins { - fmt.Fprintf(buf, "* packer plugins install %s\n", plugin) - } - - buf.WriteString("\nAlternatively, if you upgrade your templates to HCL2, you can use 'packer init' with a 'required_plugins' block to automatically install external plugins.\n\n") - fmt.Fprintf(buf, "You can try HCL2 by running 'packer hcl2_upgrade %s'", h.Template.Path) - case *hcl2template.PackerConfig: - buf.WriteString("To remove this warning, add the following section to your template:\n") - buf.WriteString(m.fixRequiredPlugins(h)) - buf.WriteString("\nThen run 'packer init' to manage installation of the plugins") - } - - return hcl.Diagnostics{ - &hcl.Diagnostic{ - Severity: hcl.DiagWarning, - Summary: "Bundled plugins used", - Detail: buf.String(), - }, - } -} - -func (m *Meta) detectBundledPluginsJSON(core *packer.Core) []string { - bundledPlugins := map[string]struct{}{} - - tmpl := core.Template - if tmpl == nil { - panic("No template parsed. This is a Packer bug which should be reported, please open an issue on the project's issue tracker.") - } - - for _, b := range tmpl.Builders { - builderType := fmt.Sprintf("packer-builder-%s", b.Type) - if bundledStatus[builderType] { - bundledPlugins[builderType] = struct{}{} - } - } - - for _, p := range tmpl.Provisioners { - provisionerType := fmt.Sprintf("packer-provisioner-%s", p.Type) - if bundledStatus[provisionerType] { - bundledPlugins[provisionerType] = struct{}{} - } - } - - for _, pps := range tmpl.PostProcessors { - for _, pp := range pps { - postProcessorType := fmt.Sprintf("packer-post-processor-%s", pp.Type) - if bundledStatus[postProcessorType] { - bundledPlugins[postProcessorType] = struct{}{} - } - } - } - - return compileBundledPluginList(bundledPlugins) -} - var knownPluginPrefixes = map[string]string{ "amazon": "github.com/hashicorp/amazon", "ansible": "github.com/hashicorp/ansible", @@ -306,44 +227,6 @@ func (m *Meta) fixRequiredPlugins(config *hcl2template.PackerConfig) string { return generateRequiredPluginsBlock(retPlugins) } -func (m *Meta) detectBundledPluginsHCL2(config *hcl2template.PackerConfig) []string { - bundledPlugins := map[string]struct{}{} - - for _, b := range config.Builds { - for _, src := range b.Sources { - builderType := fmt.Sprintf("packer-builder-%s", src.Type) - if bundledStatus[builderType] { - bundledPlugins[builderType] = struct{}{} - } - } - - for _, p := range b.ProvisionerBlocks { - provisionerType := fmt.Sprintf("packer-provisioner-%s", p.PType) - if bundledStatus[provisionerType] { - bundledPlugins[provisionerType] = struct{}{} - } - } - - for _, pps := range b.PostProcessorsLists { - for _, pp := range pps { - postProcessorType := fmt.Sprintf("packer-post-processor-%s", pp.PType) - if bundledStatus[postProcessorType] { - bundledPlugins[postProcessorType] = struct{}{} - } - } - } - } - - for _, ds := range config.Datasources { - dsType := fmt.Sprintf("packer-datasource-%s", ds.Type) - if bundledStatus[dsType] { - bundledPlugins[dsType] = struct{}{} - } - } - - return compileBundledPluginList(bundledPlugins) -} - func generateRequiredPluginsBlock(plugins []string) string { if len(plugins) == 0 { return "" diff --git a/command/validate.go b/command/validate.go index 5e40a5f9530..9747dabf95c 100644 --- a/command/validate.go +++ b/command/validate.go @@ -74,8 +74,6 @@ func (c *ValidateCommand) RunContext(ctx context.Context, cla *ValidateArgs) int diags = packerStarter.Initialize(packer.InitializeOptions{ SkipDatasourcesExecution: !cla.EvaluateDatasources, }) - bundledDiags := c.DetectBundledPlugins(packerStarter) - diags = append(bundledDiags, diags...) ret = writeDiags(c.Ui, nil, diags) if ret != 0 { return ret diff --git a/command/vendored_plugins.go b/command/vendored_plugins.go deleted file mode 100644 index 5853e34cac4..00000000000 --- a/command/vendored_plugins.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package command - -import ( - "log" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - // Previously core-bundled components, split into their own plugins but - // still vendored with Packer for now. Importing as library instead of - // forcing use of packer init. -) - -// VendoredDatasources are datasource components that were once bundled with the -// Packer core, but are now being imported from their counterpart plugin repos -var VendoredDatasources = map[string]packersdk.Datasource{} - -// VendoredBuilders are builder components that were once bundled with the -// Packer core, but are now being imported from their counterpart plugin repos -var VendoredBuilders = map[string]packersdk.Builder{} - -// VendoredProvisioners are provisioner components that were once bundled with the -// Packer core, but are now being imported from their counterpart plugin repos -var VendoredProvisioners = map[string]packersdk.Provisioner{} - -// VendoredPostProcessors are post-processor components that were once bundled with the -// Packer core, but are now being imported from their counterpart plugin repos -var VendoredPostProcessors = map[string]packersdk.PostProcessor{} - -// bundledStatus is used to know if one of the bundled components is loaded from -// an external plugin, or from the bundled plugins. -// -// We keep track of this to produce a warning if a user relies on one -// such plugin, as they will be removed in a later version of Packer. -var bundledStatus = map[string]bool{} - -// TrackBundledPlugin marks a component as loaded from Packer's bundled plugins -// instead of from an externally loaded plugin. -// -// NOTE: `pluginName' must be in the format `packer--' -func TrackBundledPlugin(pluginName string) { - _, exists := bundledStatus[pluginName] - if !exists { - return - } - - bundledStatus[pluginName] = true -} - -var componentPluginMap = map[string]string{} - -// compileBundledPluginList returns a list of plugins to import in a config -// -// This only works on bundled plugins and serves as a way to inform users that -// they should not rely on a bundled plugin anymore, but give them recommendations -// on how to manage those plugins instead. -func compileBundledPluginList(componentMap map[string]struct{}) []string { - plugins := map[string]struct{}{} - for component := range componentMap { - plugin, ok := componentPluginMap[component] - if !ok { - log.Printf("Unknown bundled plugin component: %q", component) - continue - } - - plugins[plugin] = struct{}{} - } - - pluginList := make([]string, 0, len(plugins)) - for plugin := range plugins { - pluginList = append(pluginList, plugin) - } - - return pluginList -} - -// Upon init lets load up any plugins that were vendored manually into the default -// set of plugins. -func init() { - for k, v := range VendoredDatasources { - if _, ok := Datasources[k]; ok { - continue - } - Datasources[k] = v - } - - for k, v := range VendoredBuilders { - if _, ok := Builders[k]; ok { - continue - } - Builders[k] = v - } - - for k, v := range VendoredProvisioners { - if _, ok := Provisioners[k]; ok { - continue - } - Provisioners[k] = v - } - - for k, v := range VendoredPostProcessors { - if _, ok := PostProcessors[k]; ok { - continue - } - PostProcessors[k] = v - } -} diff --git a/config.go b/config.go index 6688d6a74a5..d4dab230e86 100644 --- a/config.go +++ b/config.go @@ -153,7 +153,6 @@ func (c *config) discoverInternalComponents() error { for builder := range command.Builders { builder := builder if !c.Plugins.Builders.Has(builder) { - command.TrackBundledPlugin(fmt.Sprintf("packer-builder-%s", builder)) bin := fmt.Sprintf("%s%splugin%spacker-builder-%s", packerPath, PACKERSPACE, PACKERSPACE, builder) c.Plugins.Builders.Set(builder, func() (packersdk.Builder, error) { @@ -165,7 +164,6 @@ func (c *config) discoverInternalComponents() error { for provisioner := range command.Provisioners { provisioner := provisioner if !c.Plugins.Provisioners.Has(provisioner) { - command.TrackBundledPlugin(fmt.Sprintf("packer-provisioner-%s", provisioner)) bin := fmt.Sprintf("%s%splugin%spacker-provisioner-%s", packerPath, PACKERSPACE, PACKERSPACE, provisioner) c.Plugins.Provisioners.Set(provisioner, func() (packersdk.Provisioner, error) { @@ -177,7 +175,6 @@ func (c *config) discoverInternalComponents() error { for postProcessor := range command.PostProcessors { postProcessor := postProcessor if !c.Plugins.PostProcessors.Has(postProcessor) { - command.TrackBundledPlugin(fmt.Sprintf("packer-post-processor-%s", postProcessor)) bin := fmt.Sprintf("%s%splugin%spacker-post-processor-%s", packerPath, PACKERSPACE, PACKERSPACE, postProcessor) c.Plugins.PostProcessors.Set(postProcessor, func() (packersdk.PostProcessor, error) { @@ -189,7 +186,6 @@ func (c *config) discoverInternalComponents() error { for dataSource := range command.Datasources { dataSource := dataSource if !c.Plugins.DataSources.Has(dataSource) { - command.TrackBundledPlugin(fmt.Sprintf("packer-datasource-%s", dataSource)) bin := fmt.Sprintf("%s%splugin%spacker-datasource-%s", packerPath, PACKERSPACE, PACKERSPACE, dataSource) c.Plugins.DataSources.Set(dataSource, func() (packersdk.Datasource, error) { From da061169bc3cf46b36f3cb55b3cec9cddc5cd22a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 19 Oct 2023 11:00:41 -0400 Subject: [PATCH 101/156] cmd/hcl2_upgrade: Don't error when using a HashiCorp plugin that is not installed This change updates hcl2_upgrade to not flag known plugin components, those used for generating the required plugins block, when upgrading a legacy JSON template to HCL2. Any unknown plugins will be installed after running packer init on the generated template so we don't error. We may want to suggest running packer init to install any missing plugins. * Move knownPluginPrefixes into the hcl2_upgrade command --- command/hcl2_upgrade.go | 132 +++++++++++++++++++++-------------- command/hcl2_upgrade_test.go | 24 +++---- command/meta.go | 87 ----------------------- 3 files changed, 91 insertions(+), 152 deletions(-) diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index 8295e4e8ae0..3393ee86bad 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -29,42 +29,6 @@ import ( "github.com/zclconf/go-cty/cty" ) -type HCL2UpgradeCommand struct { - Meta -} - -func (c *HCL2UpgradeCommand) Run(args []string) int { - ctx, cleanup := handleTermInterrupt(c.Ui) - defer cleanup() - - cfg, ret := c.ParseArgs(args) - if ret != 0 { - return ret - } - - return c.RunContext(ctx, cfg) -} - -func (c *HCL2UpgradeCommand) ParseArgs(args []string) (*HCL2UpgradeArgs, int) { - var cfg HCL2UpgradeArgs - flags := c.Meta.FlagSet("hcl2_upgrade") - flags.Usage = func() { c.Ui.Say(c.Help()) } - cfg.AddFlagSets(flags) - if err := flags.Parse(args); err != nil { - return &cfg, 1 - } - args = flags.Args() - if len(args) != 1 { - flags.Usage() - return &cfg, 1 - } - cfg.Path = args[0] - if cfg.OutputFile == "" { - cfg.OutputFile = cfg.Path + ".pkr.hcl" - } - return &cfg, 0 -} - const ( hcl2UpgradeFileHeader = `# This file was autogenerated by the 'packer hcl2_upgrade' command. We # recommend double checking that everything is correct before going forward. We @@ -130,6 +94,59 @@ var ( strftime = false ) +// knownPlugins represent the HashiCorp maintained plugins the we can confidently +// construct a required plugins block for. +var knownPlugins = map[string]string{ + "amazon": "github.com/hashicorp/amazon", + "ansible": "github.com/hashicorp/ansible", + "azure": "github.com/hashicorp/azure", + "docker": "github.com/hashicorp/docker", + "googlecompute": "github.com/hashicorp/googlecompute", + "qemu": "github.com/hashicorp/qemu", + "vagrant": "github.com/hashicorp/vagrant", + "vmware": "github.com/hashicorp/vmware", + "vsphere": "github.com/hashicorp/vsphere", +} + +// unknownPluginName represents any plugin not in knownPlugins or bundled into Packer +const unknownPluginName string = "unknown" + +type HCL2UpgradeCommand struct { + Meta +} + +func (c *HCL2UpgradeCommand) Run(args []string) int { + ctx, cleanup := handleTermInterrupt(c.Ui) + defer cleanup() + + cfg, ret := c.ParseArgs(args) + if ret != 0 { + return ret + } + + return c.RunContext(ctx, cfg) +} + +func (c *HCL2UpgradeCommand) ParseArgs(args []string) (*HCL2UpgradeArgs, int) { + var cfg HCL2UpgradeArgs + flags := c.Meta.FlagSet("hcl2_upgrade") + flags.Usage = func() { c.Ui.Say(c.Help()) } + cfg.AddFlagSets(flags) + if err := flags.Parse(args); err != nil { + return &cfg, 1 + } + args = flags.Args() + if len(args) != 1 { + flags.Usage() + return &cfg, 1 + } + cfg.Path = args[0] + if cfg.OutputFile == "" { + cfg.OutputFile = cfg.Path + ".pkr.hcl" + } + return &cfg, 0 +} + type BlockParser interface { Parse(*template.Template) error Write(*bytes.Buffer) @@ -169,7 +186,6 @@ func (c *HCL2UpgradeCommand) RunContext(_ context.Context, cla *HCL2UpgradeArgs) tpl := core.Template // Parse blocks - packerBlock := &PackerParser{ WithAnnotations: cla.WithAnnotations, } @@ -827,28 +843,28 @@ func gatherPluginsFromTemplate(tpl *template.Template) []string { plugins := map[string]struct{}{} for _, b := range tpl.Builders { - for prefix, plugin := range knownPluginPrefixes { - if strings.HasPrefix(b.Type, prefix) { - plugins[plugin] = struct{}{} - } + name := knownPluginComponent(b.Type) + if name == unknownPluginName { + continue } + plugins[knownPlugins[name]] = struct{}{} } for _, p := range tpl.Provisioners { - for prefix, plugin := range knownPluginPrefixes { - if strings.HasPrefix(p.Type, prefix) { - plugins[plugin] = struct{}{} - } + name := knownPluginComponent(p.Type) + if name == unknownPluginName { + continue } + plugins[knownPlugins[name]] = struct{}{} } for _, pps := range tpl.PostProcessors { for _, pp := range pps { - for prefix, plugin := range knownPluginPrefixes { - if strings.HasPrefix(pp.Type, prefix) { - plugins[plugin] = struct{}{} - } + name := knownPluginComponent(pp.Type) + if name == unknownPluginName { + continue } + plugins[knownPlugins[name]] = struct{}{} } } @@ -1182,18 +1198,17 @@ type SourceParser struct { } func (p *SourceParser) Parse(tpl *template.Template) error { - var unknownBuilders []string if p.out == nil { p.out = []byte{} } + + var unknownBuilders []string for i, builderCfg := range p.Builders { sourcesContent := hclwrite.NewEmptyFile() body := sourcesContent.Body() - body.AppendNewline() - if !p.BuilderPlugins.Has(builderCfg.Type) { + if !p.BuilderPlugins.Has(builderCfg.Type) && knownPluginComponent(builderCfg.Type) == unknownPluginName { unknownBuilders = append(unknownBuilders, builderCfg.Type) - } if builderCfg.Name == "" || builderCfg.Name == builderCfg.Type { builderCfg.Name = fmt.Sprintf("autogenerated_%d", i+1) @@ -1206,9 +1221,11 @@ func (p *SourceParser) Parse(tpl *template.Template) error { p.out = append(p.out, transposeTemplatingCalls(sourcesContent.Bytes())...) } + // TODO update to output to stderr as opposed to having the command exit 1 if len(unknownBuilders) > 0 { return fmt.Errorf("unknown builder type(s): %v\n", unknownBuilders) } + return nil } @@ -1412,3 +1429,12 @@ func fixQuoting(old string) string { return string(body) } + +func knownPluginComponent(component string) string { + for prefix := range knownPlugins { + if strings.HasPrefix(component, prefix) { + return prefix + } + } + return unknownPluginName +} diff --git a/command/hcl2_upgrade_test.go b/command/hcl2_upgrade_test.go index 487d99999cb..9a3833f909e 100644 --- a/command/hcl2_upgrade_test.go +++ b/command/hcl2_upgrade_test.go @@ -19,22 +19,22 @@ func Test_hcl2_upgrade(t *testing.T) { exitCode int exitEarly bool }{ - {folder: "unknown_builder", flags: []string{}, exitCode: 1}, - {folder: "complete", flags: []string{"-with-annotations"}}, - {folder: "without-annotations", flags: []string{}}, - {folder: "minimal", flags: []string{"-with-annotations"}}, - {folder: "source-name", flags: []string{"-with-annotations"}}, - {folder: "error-cleanup-provisioner", flags: []string{"-with-annotations"}}, - {folder: "aws-access-config", flags: []string{}}, - {folder: "escaping", flags: []string{}}, - {folder: "vsphere_linux_options_and_network_interface", exitCode: 1, flags: []string{}}, + {folder: "unknown_builder", flags: []string{}, exitCode: 1}, // warn for unknown components not tracked in knownPluginPrefixes + {folder: "complete", flags: []string{"-with-annotations"}, exitCode: 0}, + {folder: "without-annotations", flags: []string{}, exitCode: 0}, + {folder: "minimal", flags: []string{"-with-annotations"}, exitCode: 0}, + {folder: "source-name", flags: []string{"-with-annotations"}, exitCode: 0}, + {folder: "error-cleanup-provisioner", flags: []string{"-with-annotations"}, exitCode: 0}, + {folder: "aws-access-config", flags: []string{}, exitCode: 0}, + {folder: "escaping", flags: []string{}, exitCode: 0}, + {folder: "vsphere_linux_options_and_network_interface", flags: []string{}, exitCode: 0}, //do not warn for known uninstalled plugins components {folder: "nonexistent", flags: []string{}, exitCode: 1, exitEarly: true}, {folder: "placeholders", flags: []string{}, exitCode: 0}, {folder: "ami_test", flags: []string{}, exitCode: 0}, {folder: "azure_shg", flags: []string{}, exitCode: 0}, - {folder: "variables-only", flags: []string{}}, - {folder: "variables-with-variables", flags: []string{}}, - {folder: "complete-variables-with-template-engine", flags: []string{}}, + {folder: "variables-only", flags: []string{}, exitCode: 0}, + {folder: "variables-with-variables", flags: []string{}, exitCode: 0}, + {folder: "complete-variables-with-template-engine", flags: []string{}, exitCode: 0}, {folder: "undeclared-variables", flags: []string{}, exitCode: 0}, {folder: "varfile-with-no-variables-block", flags: []string{}, exitCode: 0}, {folder: "bundled-plugin-used", flags: []string{}, exitCode: 0}, diff --git a/command/meta.go b/command/meta.go index 0e464ccc36d..9807df78b5d 100644 --- a/command/meta.go +++ b/command/meta.go @@ -9,7 +9,6 @@ import ( "fmt" "io" "os" - "strings" "github.com/hashicorp/hcl/v2/hclparse" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" @@ -167,89 +166,3 @@ func (m *Meta) GetConfigFromJSON(cla *MetaArgs) (packer.Handler, int) { } return core, ret } - -var knownPluginPrefixes = map[string]string{ - "amazon": "github.com/hashicorp/amazon", - "ansible": "github.com/hashicorp/ansible", - "azure": "github.com/hashicorp/azure", - "docker": "github.com/hashicorp/docker", - "googlecompute": "github.com/hashicorp/googlecompute", - "qemu": "github.com/hashicorp/qemu", - "vagrant": "github.com/hashicorp/vagrant", - "vmware": "github.com/hashicorp/vmware", - "vsphere": "github.com/hashicorp/vsphere", -} - -func (m *Meta) fixRequiredPlugins(config *hcl2template.PackerConfig) string { - plugins := map[string]struct{}{} - - for _, b := range config.Builds { - for _, b := range b.Sources { - for prefix, plugin := range knownPluginPrefixes { - if strings.HasPrefix(b.Type, prefix) { - plugins[plugin] = struct{}{} - } - } - } - - for _, p := range b.ProvisionerBlocks { - for prefix, plugin := range knownPluginPrefixes { - if strings.HasPrefix(p.PType, prefix) { - plugins[plugin] = struct{}{} - } - } - } - - for _, pps := range b.PostProcessorsLists { - for _, pp := range pps { - for prefix, plugin := range knownPluginPrefixes { - if strings.HasPrefix(pp.PType, prefix) { - plugins[plugin] = struct{}{} - } - } - } - } - } - - for _, ds := range config.Datasources { - for prefix, plugin := range knownPluginPrefixes { - if strings.HasPrefix(ds.Type, prefix) { - plugins[plugin] = struct{}{} - } - } - } - - retPlugins := make([]string, 0, len(plugins)) - for plugin := range plugins { - retPlugins = append(retPlugins, plugin) - } - - return generateRequiredPluginsBlock(retPlugins) -} - -func generateRequiredPluginsBlock(plugins []string) string { - if len(plugins) == 0 { - return "" - } - - buf := &strings.Builder{} - buf.WriteString(` -packer { - required_plugins {`) - - for _, plugin := range plugins { - pluginName := strings.Replace(plugin, "github.com/hashicorp/", "", 1) - fmt.Fprintf(buf, ` - %s = { - source = %q - version = "~> 1" - }`, pluginName, plugin) - } - - buf.WriteString(` - } -} -`) - - return buf.String() -} From 3c8de6e5ad7e57ddac084ee4f15f5b18d6064022 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 25 Oct 2023 16:45:32 -0400 Subject: [PATCH 102/156] plugins: install SHA256SUM file with 0644 perms When invoking `packer plugins install' to install a plugin, or `packer init', the checksum file would be installed with 0555 permissions. This led in turn to further attempts at installing the plugin will succeed, but the checksum file would not be updated, as it was marked non-writable by the owner of the file, leading potentially to a situation where the plugin binary and the checksum would be out-of-sync, but could not be updated unless the user changed it. To avoid such a problem, we write the checksum file with 0644 permissions, so the owner can read/write, while the other users can only read it. --- packer/plugin-getter/plugins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/plugin-getter/plugins.go b/packer/plugin-getter/plugins.go index f6ca5c4abfe..c9fbd0b9d97 100644 --- a/packer/plugin-getter/plugins.go +++ b/packer/plugin-getter/plugins.go @@ -713,7 +713,7 @@ func (pr *Requirement) InstallLatest(opts InstallOptions) (*Installation, error) log.Printf("[WARNING] %v, ignoring", err) } - if err := os.WriteFile(outputFileName+checksum.Checksummer.FileExt(), []byte(hex.EncodeToString(cs)), 0555); err != nil { + if err := os.WriteFile(outputFileName+checksum.Checksummer.FileExt(), []byte(hex.EncodeToString(cs)), 0644); err != nil { err := fmt.Errorf("failed to write local binary checksum file: %s", err) errs = multierror.Append(errs, err) log.Printf("[WARNING] %v, ignoring", err) From d47cbe7f485ee4a5e5fa16042d18503bfae0bcec Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 25 Oct 2023 16:06:45 -0400 Subject: [PATCH 103/156] command: remove SHA256SUM file on plugin removal When a user invokes `packer plugins remove', the plugin binary gets removed, but not the corresponding SHA256SUM file. This patch changes this so that when a binary is removed, so is its SHA256SUM file. --- command/plugins_remove.go | 6 ++++++ command/plugins_remove_test.go | 21 ++++++--------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/command/plugins_remove.go b/command/plugins_remove.go index 07993f21a4e..624a632e525 100644 --- a/command/plugins_remove.go +++ b/command/plugins_remove.go @@ -6,6 +6,7 @@ package command import ( "context" "crypto/sha256" + "fmt" "os" "runtime" "strings" @@ -95,6 +96,11 @@ func (c *PluginsRemoveCommand) RunContext(buildCtx context.Context, args []strin c.Ui.Error(err.Error()) return 1 } + shasumFile := fmt.Sprintf("%s_SHA256SUM", installation.BinaryPath) + if err := os.Remove(shasumFile); err != nil { + c.Ui.Error(fmt.Sprintf("failed to remove %s: %s", shasumFile, err)) + c.Ui.Error("You may need to remove it manually") + } c.Ui.Message(installation.BinaryPath) } diff --git a/command/plugins_remove_test.go b/command/plugins_remove_test.go index 61273487632..dcaafb98e5d 100644 --- a/command/plugins_remove_test.go +++ b/command/plugins_remove_test.go @@ -68,7 +68,6 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { want: 0, dirFiles: map[string][]string{ "darwin": { - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe", @@ -77,7 +76,6 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { "linux": { "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe_SHA256SUM", }, @@ -86,13 +84,12 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe_SHA256SUM", }, }[runtime.GOOS], expectedPackerConfigDirHashAfterRemove: map[string]string{ - "darwin": "h1:IMsWPgJZzRhn80t78zE45003gFKN6EXq562/wjaCrKE=", - "linux": "h1:Ez7SU1GZLvNGJmoTm9PeFIwHv9fvEgzZAZTMl6874iM=", - "windows": "h1:RrXlhy9tG9Bi3c2aOzjx/FLLyVNQolcY+MAr4V1etRI=", + "darwin": "h1:IKDdst8f0nMAS9T9t85fhuvDCe8lYytiZ/vooW1OWeI=", + "linux": "h1:h3t4iDYGbNtouHAJ1vPsE7d8n+6W5K4VlXTxhrQx2DA=", + "windows": "h1:NpETtGlu1hVMJe5bflPmyAhnL4iDvoIwA//uWhxtkDU=", }[runtime.GOOS], }, { @@ -118,8 +115,6 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { want: 0, dirFiles: map[string][]string{ "darwin": { - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_darwin_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64", @@ -134,8 +129,6 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_darwin_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_darwin_amd64_SHA256SUM", - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_windows_amd64.exe", @@ -150,14 +143,12 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64_SHA256SUM", - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe_SHA256SUM", - "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_windows_amd64.exe_SHA256SUM", }, }[runtime.GOOS], expectedPackerConfigDirHashAfterRemove: map[string]string{ - "darwin": "h1:FBBGQ1SKngN9PvF98awv8TZcKaS+CKzJmQoS7vuSXqY=", - "linux": "h1:F8lN4Q3sv45ig8r1BLOS/wFuQQy6tSfmuIJf3fnbD5k=", - "windows": "h1:DOfH6WR1eJNLJcaL8ar8j1xu2WB7Jcn6oG7LGEvNBZI=", + "darwin": "h1:A6wlL62bUD06NF/1ND5E0o4omXhusB2T8N5ZNe2JVbg=", + "linux": "h1:SuTX0k2sknjDrL3PYgR1JajbGcs1qWIV2XvZAYSMsHw=", + "windows": "h1:NI8aJVAKdIyCXHuGDj6kTu5++6yvCz4oAswIhkL3wFc=", }[runtime.GOOS], }, { From 452e855dd9a4e593de5b92f75a424c85fc54ee86 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 23 Oct 2023 11:52:47 -0400 Subject: [PATCH 104/156] Update README * Add BUSL 1.1 license badge * Update links to learn tutorials * Removed dated getting started example --- README.md | 97 ++++++++++++------------------------------------------- 1 file changed, 21 insertions(+), 76 deletions(-) diff --git a/README.md b/README.md index c6a6703d72a..05a280b2b85 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,8 @@ # Packer - +[![License: BUSL-1.1](https://img.shields.io/badge/License-BUSL--1.1-yellow.svg)](LICENSE) [![Build Status](https://github.com/hashicorp/packer/actions/workflows/build.yml/badge.svg)](https://github.com/hashicorp/packer/actions/workflows/build.yml) [![Discuss](https://img.shields.io/badge/discuss-packer-3d89ff?style=flat)](https://discuss.hashicorp.com/c/packer) -[![PkgGoDev](https://pkg.go.dev/badge/github.com/hashicorp/packer)](https://pkg.go.dev/github.com/hashicorp/packer) -[![GoReportCard][report-badge]][report] - -[github-badge]: https://github.com/hashicorp/packer/actions/workflows/build.yml/badge.svg -[appveyor-badge]: https://ci.appveyor.com/api/projects/status/miavlgnp989e5obc/branch/master?svg=true -[godoc-badge]: https://godoc.org/github.com/hashicorp/packer?status.svg -[godoc]: https://godoc.org/github.com/hashicorp/packer -[report-badge]: https://goreportcard.com/badge/github.com/hashicorp/packer -[report]: https://goreportcard.com/report/github.com/hashicorp/packer +===

@@ -23,79 +15,31 @@ from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer -comes out of the box with support for many platforms, the full list of which can -be found at https://www.packer.io/docs/builders. - -Support for other platforms can be added via plugins. +supports various platforms through external plugin integrations, the full list of which can +be found at https://developer.hashicorp.com/packer/integrations. -The images that Packer creates can easily be turned into -[Vagrant](http://www.vagrantup.com) boxes. +The images that Packer creates can easily be turned into [Vagrant](http://www.vagrantup.com) boxes. ## Quick Start -**Note:** There is a great -[introduction and getting started guide](https://learn.hashicorp.com/tutorials/packer/get-started-install-cli) -for those with a bit more patience. Otherwise, the quick start below -will get you up and running quickly, at the sacrifice of not explaining some -key points. - -First, [download a pre-built Packer -binary](https://www.packer.io/downloads.html) for your operating system or -[compile Packer -yourself](https://github.com/hashicorp/packer/blob/main/.github/CONTRIBUTING.md#setting-up-go). - -After Packer is installed, create your first template, which tells Packer -what platforms to build images for and how you want to build them. In our -case, we'll create a simple AMI that has Redis pre-installed. - -Save this file as `quick-start.pkr.hcl`. Export your AWS credentials as the -`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables. - -```hcl -variable "access_key" { - type = string - default = "${env("AWS_ACCESS_KEY_ID")}" -} - -variable "secret_key" { - type = string - default = "${env("AWS_SECRET_ACCESS_KEY")}" - sensitive = true -} - -locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } - -source "amazon-ebs" "quick-start" { - access_key = "${var.access_key}" - ami_name = "packer-example ${local.timestamp}" - instance_type = "t2.micro" - region = "us-east-1" - secret_key = "${var.secret_key}" - source_ami = "ami-af22d9b9" - ssh_username = "ubuntu" -} - -build { - sources = ["source.amazon-ebs.quick-start"] -} -``` - -Next, tell Packer to build the image: - -``` -$ packer build quick-start.pkr.hcl -... -``` - -Packer will build an AMI according to the "quick-start" template. The AMI -will be available in your AWS account. To delete the AMI, you must manually -delete it using the [AWS console](https://console.aws.amazon.com/). Packer -builds your images, it does not manage their lifecycle. Where they go, how -they're run, etc., is up to you. +### Packer + +There is a great [introduction and getting started guide](https://learn.hashicorp.com/tutorials/packer/get-started-install-cli) +for building a Docker image on your local machine without using any paid cloud resources. + +Alternatively, you can refer to [getting started with AWS](https://developer.hashicorp.com/packer/tutorials/aws-get-started) to +learn how to build a machine image for an external cloud provider. + +### HCP Packer + +HCP Packer registry stores Packer image metadata, enabling you to track your image lifecycle. + +To get started with building an AWS machine image to HCP Packer for referencing in Terraform refer +to the collection of [HCP Packer Tutorials](https://developer.hashicorp.com/packer/tutorials/hcp-get-started). ## Documentation -Comprehensive documentation is viewable on the Packer website at https://www.packer.io/docs. +Comprehensive documentation is viewable on the Packer website at https://developer.hashicorp.com/packer/docs. ## Contributing to Packer @@ -118,3 +62,4 @@ What does **unmaintained** mean? If you are interested in maintaining an unmaintained or archived plugin, please reach out to us at packer@hashicorp.com. + From 71aa2f3f96691e43ec9e12351313345d2e6dd21a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 23 Oct 2023 12:03:51 -0400 Subject: [PATCH 105/156] Bump required Go version in CONTRIBUTING guide --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 86e030cce3b..60063f93b23 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -70,7 +70,7 @@ runtime in order to build packer. 1. This project always releases from the latest version of golang. [Install go](https://golang.org/doc/install#install) To properly build from -source, you need to have golang >= v1.18 +source, you need to have golang >= v1.20 ## Setting up Packer for dev From 0ec424aa250295da8e9ea7e917dacbb9dcdac4d1 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 30 Oct 2023 07:50:53 -0400 Subject: [PATCH 106/156] Fix broken link to Consul's environment variables page (#12673) --- .../templates/hcl_templates/functions/contextual/consul.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/templates/hcl_templates/functions/contextual/consul.mdx b/website/content/docs/templates/hcl_templates/functions/contextual/consul.mdx index da66b1bc44a..fff91894f2f 100644 --- a/website/content/docs/templates/hcl_templates/functions/contextual/consul.mdx +++ b/website/content/docs/templates/hcl_templates/functions/contextual/consul.mdx @@ -36,4 +36,4 @@ This will load the key stored at the path `myservice/version` from consul. The configuration for consul (address, tokens, ...) must be specified as environment variables, as specified in the -[Documentation](/consul/docs/commands#environment-variables). +[Documentation](/consul/commands#environment-variables). From c528681dde756e0f833b42014044aa02270ed7c6 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 27 Oct 2023 15:48:14 -0400 Subject: [PATCH 107/156] docs: amend HCL templates/functions docs The HCL2 docs on built-in functions contains a link to a non-existent section of the expressions page, so we update it to link to the general page, and to the string interpolation section, since it is a common use case. --- .../docs/templates/hcl_templates/functions/index.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/docs/templates/hcl_templates/functions/index.mdx b/website/content/docs/templates/hcl_templates/functions/index.mdx index eb64615db6f..0a9ee2a9eee 100644 --- a/website/content/docs/templates/hcl_templates/functions/index.mdx +++ b/website/content/docs/templates/hcl_templates/functions/index.mdx @@ -18,9 +18,9 @@ arguments in parentheses: max(5, 12, 9) ``` -For more details on syntax, see -[_Function Calls_](/packer/docs/templates/hcl_templates/expressions#function-calls) -on the Expressions page. +For information on invoking functions in string literals, refer to the +[String Literals](https://developer.hashicorp.com/packer/docs/templates/hcl_templates/expressions#string-literals) section +in the HCL2 expressions documentation. The HCL language does not support user-defined functions, and so only the functions built in to the language are available for use. The documentation includes all of the available built-in functions. From f221a799d8dd4b09380a6106fccba6e550650797 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 26 Oct 2023 16:46:15 -0400 Subject: [PATCH 108/156] command: error on invalid plugins remove If a user attempts to remove a plugin through the `packer plugins remove' subcommand, and the specified plugin is not installed, the command succeeds, but does nothing, and exits silently. This is not clear what is happening, and arguably, calling a command that does nothing, not even explain what went wrong, is not intuitive. Because of that, this commit changes how the command behaves in this case, stating what went wrong, and exiting with a non-zero status. --- command/plugins_remove.go | 9 +++++++++ command/plugins_remove_test.go | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/command/plugins_remove.go b/command/plugins_remove.go index 624a632e525..5c13636f5c6 100644 --- a/command/plugins_remove.go +++ b/command/plugins_remove.go @@ -104,5 +104,14 @@ func (c *PluginsRemoveCommand) RunContext(buildCtx context.Context, args []strin c.Ui.Message(installation.BinaryPath) } + if len(installations) == 0 { + errMsg := fmt.Sprintf("No installed plugin found matching the plugin constraints %s", args[0]) + if len(args) == 2 { + errMsg = fmt.Sprintf("%s %s", errMsg, args[1]) + } + c.Ui.Error(errMsg) + return 1 + } + return 0 } diff --git a/command/plugins_remove_test.go b/command/plugins_remove_test.go index dcaafb98e5d..4149ceaeb9c 100644 --- a/command/plugins_remove_test.go +++ b/command/plugins_remove_test.go @@ -47,7 +47,7 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { expectedPackerConfigDirHashBeforeRemove: "h1:Q5qyAOdD43hL3CquQdVfaHpOYGf0UsZ/+wVA9Ry6cbA=", packerConfigDir: cfg.dir("1_pkr_plugins_config"), pluginSourceArgs: []string{"github.com/sylviamoss/comment", "v0.2.19"}, - want: 0, + want: 1, dirFiles: nil, expectedPackerConfigDirHashAfterRemove: "h1:Q5qyAOdD43hL3CquQdVfaHpOYGf0UsZ/+wVA9Ry6cbA=", }, @@ -158,7 +158,7 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { expectedPackerConfigDirHashBeforeRemove: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", packerConfigDir: cfg.dir("3_pkr_plugins_config"), pluginSourceArgs: []string{"example.com/sylviamoss/comment", "v0.2.19"}, - want: 0, + want: 1, dirFiles: nil, expectedPackerConfigDirHashAfterRemove: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", }, From 19c14fd1e2be96f5d7e4310ce1eb7f40557ba292 Mon Sep 17 00:00:00 2001 From: ygXXII <16456434+ygxxii@users.noreply.github.com> Date: Thu, 2 Nov 2023 17:36:36 +0800 Subject: [PATCH 109/156] docs: fix aws_secretsmanager Title Name (#12678) Just a simple doc title fix. --- .../hcl_templates/functions/contextual/aws_secretsmanager.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/templates/hcl_templates/functions/contextual/aws_secretsmanager.mdx b/website/content/docs/templates/hcl_templates/functions/contextual/aws_secretsmanager.mdx index edc09053a52..73d5b06fcf5 100644 --- a/website/content/docs/templates/hcl_templates/functions/contextual/aws_secretsmanager.mdx +++ b/website/content/docs/templates/hcl_templates/functions/contextual/aws_secretsmanager.mdx @@ -5,7 +5,7 @@ description: >- stores. --- -# `aws_secretsmanager_key` Function +# `aws_secretsmanager` Function Secrets can be read from the [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) and used within your template From 98176f54297b3d6fde4dee8aec08c94de71a67fd Mon Sep 17 00:00:00 2001 From: hc-github-team-es-release-engineering <82989873+hc-github-team-es-release-engineering@users.noreply.github.com> Date: Tue, 7 Nov 2023 16:40:47 -0800 Subject: [PATCH 110/156] Update LICENSE text --- LICENSE | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index 73957dc7d75..f7d6cdd08cf 100644 --- a/LICENSE +++ b/LICENSE @@ -5,10 +5,40 @@ Parameters Licensor: HashiCorp, Inc. Licensed Work: Packer 1.10.0. The Licensed Work is (c) 2023 HashiCorp, Inc. -Additional Use Grant: You may make production use of the Licensed Work, - provided such use does not include offering the Licensed Work - to third parties on a hosted or embedded basis which is - competitive with HashiCorp's products. +Additional Use Grant: You may make production use of the Licensed Work, provided + Your use does not include offering the Licensed Work to third + parties on a hosted or embedded basis in order to compete with + HashiCorp’s paid version(s) of the Licensed Work. For purposes + of this license: + + A “competitive offering” is a Product that is offered to third + parties on a paid basis, including through paid support + arrangements, that significantly overlaps with the capabilities + of HashiCorp’s paid version(s) of the Licensed Work. If Your + Product is not a competitive offering when You first make it + generally available, it will not become a competitive offering + later due to HashiCorp releasing a new version of the Licensed + Work with additional capabilities. In addition, Products that + are not provided on a paid basis are not competitive. + + “Product” means software that is offered to end users to manage + in their own environments or offered as a service on a hosted + basis. + + “Embedded” means including the source code or executable code + from the Licensed Work in a competitive offering. “Embedded” + also means packaging the competitive offering in such a way + that the Licensed Work must be accessed or downloaded for the + competitive offering to operate. + + Hosting or using the Licensed Work(s) for internal purposes + within an organization is not considered a competitive + offering. HashiCorp considers your organization to include all + of your affiliates under common control. + + For binding interpretive guidance on using HashiCorp products + under the Business Source License, please visit our FAQ. + (https://www.hashicorp.com/license-faq) Change Date: Four years from the date the Licensed Work is published. Change License: MPL 2.0 From edaa10e0a03e85b24846e3581ca080e0086c15b3 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 8 Nov 2023 14:56:08 -0500 Subject: [PATCH 111/156] Update CHANGELOG --- CHANGELOG.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5810f01c34d..aa0b870091e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,44 @@ -## 1.9.5 (Upcoming) +## 1.10.0 (Upcoming) + +### NOTES: +This release contains breaking changes for those users who may be relying on + Packer bundling plugins for Amazon, Ansibe, Azure, Docker, GoogleCompute, + Qemu, Vagrant, VirtualBox, VMmare, and vSphere. As specified in the [recent + announcement](https://www.hashicorp.com/blog/announcing-the-removal-of- + bundled- plugins-in-hashicorp-packer) the plugins will no longer be shipped + alongside Packer. Users are encouraged to use `packer init` or `packer + plugins [...]` for managing required plugins needed for executing their + builds.[GH-12660](https://github.com/hashicorp/packer/pull/12660) + +### PLUGINS: + +* Removed all HashiCorp vendored plugins from being bundled into the Packer binary. + [GH-12660](https://github.com/hashicorp/packer/pull/12660) +* packer-plugin-hcloud: The Hetzner Cloud plugin has been handed over to the + Hetzner integrations team. New releases for this plugin are available at + https://github.com/hetznercloud/packer-plugin-hcloud. Existing references + to the plugin will continue to work but users are advised to update the + `required_plugins` block to use the new plugin source address. + ``` + required_plugins { + parallels = { + source = "github.com/hetznercloud/hcloud" + version = "~> 1" + } + } + ``` + +### IMPROVEMENTS: +* cmd/plugins: install SHA256SUM file with 0644 perms. + [GH-12265](https://github.com/hashicorp/packer/pull/12661) +* cmd/plugins: remove SHA256SUM file on plugin removal. + [GH-12267](https://github.com/hashicorp/packer/pull/12667) +* cmd/plugins: remove will error if it fails to find the plugin being selected + for removal. [GH-12269](https://github.com/hashicorp/packer/pull/12669) + +### BUG FIXES: +* Bump Go to 1.20.10 to Address CVE-2023-44487 / CVE-2023-39325. + [GH-12261](https://github.com/hashicorp/packer/pull/12661) ## 1.9.4 (August 18, 2023) From c703d2e73d7429382fada8db51fc01b0e0127e82 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 8 Nov 2023 15:07:02 -0500 Subject: [PATCH 112/156] Fix notes section in CHANGELOG --- CHANGELOG.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa0b870091e..5604f0603c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,29 @@ ## 1.10.0 (Upcoming) ### NOTES: -This release contains breaking changes for those users who may be relying on - Packer bundling plugins for Amazon, Ansibe, Azure, Docker, GoogleCompute, - Qemu, Vagrant, VirtualBox, VMmare, and vSphere. As specified in the [recent - announcement](https://www.hashicorp.com/blog/announcing-the-removal-of- - bundled- plugins-in-hashicorp-packer) the plugins will no longer be shipped - alongside Packer. Users are encouraged to use `packer init` or `packer - plugins [...]` for managing required plugins needed for executing their - builds.[GH-12660](https://github.com/hashicorp/packer/pull/12660) +This release contains breaking changes for those users who may be relying on plugins previously bundled into Packer. +As specified in the [Bundled Plugins Removal announcement](https://www.hashicorp.com/blog/announcing-the-removal-of-bundled-plugins-in-hashicorp-packer) HashiCorp maintained plugins +will no longer be shipped with Packer. Users are encouraged to use `packer init` or `packer plugins [...]` for managing required plugins needed for executing their +builds. [GH-12660](https://github.com/hashicorp/packer/pull/12660) + +The affected plugins include: +* packer-plugin-amazon +* packer-plugin-ansible +* packer-plugin-azure +* packer-plugin-docker +* packer-plugin-googlcompute +* packer-plugin-qemu +* packer-plugin-vagrant +* packer-plugin-virtualbox +* packer-plugin-vmware +* packer-plugin-vsphere ### PLUGINS: * Removed all HashiCorp vendored plugins from being bundled into the Packer binary. - [GH-12660](https://github.com/hashicorp/packer/pull/12660) +[GH-12660](https://github.com/hashicorp/packer/pull/12660) * packer-plugin-hcloud: The Hetzner Cloud plugin has been handed over to the - Hetzner integrations team. New releases for this plugin are available at + Hetzner integrations team. New releases for this plugin are available at https://github.com/hetznercloud/packer-plugin-hcloud. Existing references to the plugin will continue to work but users are advised to update the `required_plugins` block to use the new plugin source address. From b3280493e04acc421b4f1e469c7458d0e312024d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 8 Nov 2023 18:51:07 -0500 Subject: [PATCH 113/156] Update CHANGELOG --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5604f0603c8..b9e28b19262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,15 +38,15 @@ The affected plugins include: ### IMPROVEMENTS: * cmd/plugins: install SHA256SUM file with 0644 perms. - [GH-12265](https://github.com/hashicorp/packer/pull/12661) + [GH-12665](https://github.com/hashicorp/packer/pull/12665) * cmd/plugins: remove SHA256SUM file on plugin removal. - [GH-12267](https://github.com/hashicorp/packer/pull/12667) + [GH-12666](https://github.com/hashicorp/packer/pull/12666) * cmd/plugins: remove will error if it fails to find the plugin being selected - for removal. [GH-12269](https://github.com/hashicorp/packer/pull/12669) + for removal. [GH-12669](https://github.com/hashicorp/packer/pull/12669) ### BUG FIXES: * Bump Go to 1.20.10 to Address CVE-2023-44487 / CVE-2023-39325. - [GH-12261](https://github.com/hashicorp/packer/pull/12661) + [GH-12661](https://github.com/hashicorp/packer/pull/12661) ## 1.9.4 (August 18, 2023) From 360df8f25700f008096fcbb9ec2e0a0dce52f3e7 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 8 Nov 2023 18:53:35 -0500 Subject: [PATCH 114/156] scripts/prepare_changelog: Replace python for with gh and jq commands This change uses the GitHub CLI to obtain all pull-requests merged after the latest release to help with updating the Packer CHANGELOG. --- scripts/prepare_changelog.sh | 64 +++++++++++------------------------- 1 file changed, 19 insertions(+), 45 deletions(-) diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh index be9049eca78..851d4ffd3ac 100755 --- a/scripts/prepare_changelog.sh +++ b/scripts/prepare_changelog.sh @@ -4,78 +4,52 @@ LAST_RELEASE=$1 -DO_PR_CHECK=1 set -o pipefail -is_doc_or_tech_debt_pr(){ - if ! (($+commands[jq])); then - DO_PR_CHECK=0 - echo "jq not found" - return 1 - fi - out=$(python3 -m json.tool < pull.json \ - | jq '[.labels[].name == "docs" or .labels[].name == "tech-debt" or .labels[].name == "website"] | any') - grep -q true <<< $out - return $? -} - if [ -z $LAST_RELEASE ]; then echo "you need to give the previous release version. prepare_changelog.sh v" exit 1 fi +if [ -z "$(which jq)" ]; then + echo "jq command not found" + return 1 +fi + +if [ -z "$(which jq)" ]; then + echo "gh command not found" + return 1 +fi + get_prs(){ - # git log v0.10.2...c3861d167533fb797b0fae0c380806625712e5f7 | - git log HEAD...${LAST_RELEASE} --first-parent --oneline --grep="Merge pull request #[0-9]\+" --grep="(#[0-9]\+)$" | - grep -o "#\([0-9]\+\)" | awk -F\# '{print $2}' | while read line + release_time="$(gh release view --json "createdAt" --jq '.createdAt' ${LAST_RELEASE})" + gh pr list -s merged -S "merged:>=$release_time -label:documentation -label:automated -label:tech-debt -label:website -label:legal -label:docs -author:hc-github-team-packer" --json "number" --jq '.[]|.number' \ + | while read line do - grep -q "GH-${line}" CHANGELOG.md - if [ $? -ne 0 ]; then + if grep -q "GH-${line}" CHANGELOG.md; then echo $line fi done | while read PR_NUM do - if [[ -z "${GITHUB_TOKEN}" ]] || [[ -z "${GITHUB_USERNAME}" ]] ; then - out=$(curl -fsS "https://api.github.com/repos/hashicorp/packer/issues/${PR_NUM}" -o pull.json) - else - # authenticated call - out=$(curl -u ${GITHUB_USERNAME}:${GITHUB_TOKEN} -fsS "https://api.github.com/repos/hashicorp/packer/issues/${PR_NUM}" -o pull.json) - fi - exy="$?" - if [ $exy -ne 0 ]; then + out=$(gh pr view ${PR_NUM} --json "title,labels,url" > pull.json) + if [ "$?" -ne 0 ]; then echo "bad response from github: manually check PR ${PR_NUM}" continue fi - if (($DO_PR_CHECK)) && is_doc_or_tech_debt_pr; then - echo "Skipping PR ${PR_NUM}: labeled as tech debt, docs or website. (waiting a second so we don't get rate-limited...)" - continue - fi - echo "$(python3 -m json.tool < pull.json | jq -r '.title') - [GH-${PR_NUM}](https://github.com/hashicorp/packer/pull/${PR_NUM})" + echo "$(jq -r '.title' < pull.json) - [GH-${PR_NUM}](https://github.com/hashicorp/packer/pull/${PR_NUM})" + rm -f pull.json done } -#is_doc_or_tech_debt_pr 52061111 -# is_doc_or_tech_debt_pr 5206 # non-doc pr -#is_doc_or_tech_debt_pr 5434 # doc pr -#echo $? -#exit - -# prpid=$! -# trap 'kill -9 ${prpid}; exit' INT TERM - get_prs | while read line; do echo $line if [[ "$line" =~ "bad" ]]; then exit 1 - elif [[ "$line" =~ "Skipping" ]]; then - sleep 1 # GH will rate limit us if we have several in a row - continue fi - rm -f pull.json + echo "Press enter to continue with next entry.." vared -ch ok done - #TODO: just generate it automatically using PR titles and tags From 631ed14dc65c2687fa0d22093a2eb27b8d738f78 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 10 Nov 2023 09:34:33 -0500 Subject: [PATCH 115/156] scripts/prepare_changelog:Update to output entries not in CHANGELOG.md --- scripts/prepare_changelog.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh index 851d4ffd3ac..a10b9972b6a 100755 --- a/scripts/prepare_changelog.sh +++ b/scripts/prepare_changelog.sh @@ -28,8 +28,9 @@ get_prs(){ | while read line do if grep -q "GH-${line}" CHANGELOG.md; then - echo $line + continue fi + echo $line done | while read PR_NUM do out=$(gh pr view ${PR_NUM} --json "title,labels,url" > pull.json) @@ -48,7 +49,7 @@ get_prs | while read line; do if [[ "$line" =~ "bad" ]]; then exit 1 fi - echo "Press enter to continue with next entry.." + echo "Press enter to continue with next entry." vared -ch ok done From 4b1553c7da7fa7bf94cbfcd6177ef4620014a35f Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 8 Nov 2023 21:25:00 -0500 Subject: [PATCH 116/156] Bump Go to 1.20.11 to mitigate against insecure Windows path parsing This change address CVE-2023-45283. There have been no reported issues with Packer but we are bumping given its usage of the path/filepath pkg. --- .go-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.go-version b/.go-version index acdfc7930c8..4bb1a22f8ec 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.10 +1.20.11 From 85e9e22bde643f2149457810f13390ba5ca9fe44 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 10 Nov 2023 10:27:40 -0500 Subject: [PATCH 117/156] Update CHANGELOG --- CHANGELOG.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9e28b19262..90ae33569dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,13 @@ The affected plugins include: * packer-plugin-vmware * packer-plugin-vsphere +### SECURITY: +* Bump Go to 1.20.11 CVE-2023-45283. There have been no reported issues with + Packer but we are bumping given its usage of the path/filepath pkg. + [GH-12690](https://github.com/hashicorp/packer/pull/12690) +* Bump Go to 1.20.10 to Address CVE-2023-44487 / CVE-2023-39325. + [GH-12661](https://github.com/hashicorp/packer/pull/12661) + ### PLUGINS: * Removed all HashiCorp vendored plugins from being bundled into the Packer binary. @@ -37,16 +44,21 @@ The affected plugins include: ``` ### IMPROVEMENTS: +* cmd/init: warn users running `packer ini` on configuration templates with a + missing required_plugins blocks. + [GH-12638](https://github.com/hashicorp/packer/pull/12638) * cmd/plugins: install SHA256SUM file with 0644 perms. [GH-12665](https://github.com/hashicorp/packer/pull/12665) * cmd/plugins: remove SHA256SUM file on plugin removal. [GH-12666](https://github.com/hashicorp/packer/pull/12666) * cmd/plugins: remove will error if it fails to find the plugin being selected for removal. [GH-12669](https://github.com/hashicorp/packer/pull/12669) - -### BUG FIXES: -* Bump Go to 1.20.10 to Address CVE-2023-44487 / CVE-2023-39325. - [GH-12661](https://github.com/hashicorp/packer/pull/12661) +* core/hcl: rework to remove the recursive execution of data sources with other + data source dependencies. + [GH-12608](https://github.com/hashicorp/packer/pull/12608) +* core: Update version output for `packer -v` and `packer --version` to match + `packer version`. + [GH-12569](https://github.com/hashicorp/packer/pull/12569) ## 1.9.4 (August 18, 2023) From 2b7bfaea571b8e2d25ec04124436f69a38530623 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 10 Nov 2023 10:32:10 -0500 Subject: [PATCH 118/156] Apply suggestions from code review Co-authored-by: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com> --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90ae33569dc..447935f4a91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,8 +44,8 @@ The affected plugins include: ``` ### IMPROVEMENTS: -* cmd/init: warn users running `packer ini` on configuration templates with a - missing required_plugins blocks. +* cmd/init: warn users running `packer init` on configuration templates with a + missing `required_plugins` blocks. [GH-12638](https://github.com/hashicorp/packer/pull/12638) * cmd/plugins: install SHA256SUM file with 0644 perms. [GH-12665](https://github.com/hashicorp/packer/pull/12665) From ebc1317307cd3c702d106e8a8a44061cde3ee23e Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 10 Nov 2023 11:39:23 -0500 Subject: [PATCH 119/156] Bumped product version to 1.11.0. --- version/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/VERSION b/version/VERSION index 81c871de46b..169f19b4901 100644 --- a/version/VERSION +++ b/version/VERSION @@ -1 +1 @@ -1.10.0 +1.11.0 \ No newline at end of file From a118b5489e8d0600f6864b394b36aa6e1f00431b Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 10 Nov 2023 11:42:44 -0500 Subject: [PATCH 120/156] Bumped product version to 1.11.0 --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 2df08d2d71b..a7eec6fd4bc 100644 --- a/version/version.go +++ b/version/version.go @@ -22,7 +22,7 @@ var ( // A pre-release marker for the version can also be specified (e.g -dev). If this is omitted // The main version number that is being run at the moment. - Version = "1.10.0" + Version = "1.11.0" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release From c59edfa433c55fdee2a701c4e1132af3847f58a9 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 10 Nov 2023 14:13:16 -0500 Subject: [PATCH 121/156] Remove dangling upgrade external plugins script --- scripts/upgrade_plugins.sh | 68 -------------------------------------- 1 file changed, 68 deletions(-) delete mode 100755 scripts/upgrade_plugins.sh diff --git a/scripts/upgrade_plugins.sh b/scripts/upgrade_plugins.sh deleted file mode 100755 index 961f8ed804d..00000000000 --- a/scripts/upgrade_plugins.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/zsh -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - - -## This script is to be run before a Packer release in order to update -## all vendored plugins to the latest available release. -## The SDK is included in the plugin list and will be upgraded as well if a -## newest version is available. -## This script should be run in packer's root. - -declare -a plugins=( - "hashicorp/packer-plugin-alicloud" - "hashicorp/packer-plugin-amazon" - "hashicorp/packer-plugin-ansible" - "hashicorp/packer-plugin-azure" - "hashicorp/packer-plugin-chef" - "hashicorp/packer-plugin-cloudstack" - "hashicorp/packer-plugin-converge" - "digitalocean/packer-plugin-digitalocean" - "hashicorp/packer-plugin-docker" - "hashicorp/packer-plugin-googlecompute" - "hashicorp/packer-plugin-hcloud" - "hashicorp/packer-plugin-hyperone" - "hashicorp/packer-plugin-hyperv" - "hashicorp/packer-plugin-jdcloud" - "hashicorp/packer-plugin-linode" - "hashicorp/packer-plugin-lxc" - "hashicorp/packer-plugin-lxd" - "hashicorp/packer-plugin-ncloud" - "hashicorp/packer-plugin-openstack" - "hashicorp/packer-plugin-oneandone" - "hashicorp/packer-plugin-parallels" - "hashicorp/packer-plugin-profitbricks" - "hashicorp/packer-plugin-proxmox" - "hashicorp/packer-plugin-puppet" - "hashicorp/packer-plugin-qemu" - "hashicorp/packer-plugin-sdk" - "hashicorp/packer-plugin-tencentcloud" - "hashicorp/packer-plugin-triton" - "hashicorp/packer-plugin-ucloud" - "hashicorp/packer-plugin-vagrant" - "hashicorp/packer-plugin-virtualbox" - "hashicorp/packer-plugin-vmware" - "hashicorp/packer-plugin-vsphere" - "hashicorp/packer-plugin-yandex" -) - -## now loop through the above plugin array -## update the plugins and the SDK to the latest available version -for i in "${plugins[@]}" -do - happy=false - while ! $happy - do - echo "upgrading $i" - output=$(go get -d github.com/$i) - happy=true - if [[ $output == *"443: Connection refused"* ]]; then - echo "Try again after 5 seconds" - sleep 5 - happy=false - fi - done - sleep 1 -done - -go mod tidy -compat=1.18 From cc22e282ac110b291301f0364d958ddf072544e1 Mon Sep 17 00:00:00 2001 From: hc-github-team-packer <84862055+hc-github-team-packer@users.noreply.github.com> Date: Fri, 10 Nov 2023 16:29:36 -0500 Subject: [PATCH 122/156] Bumped product version to 1.12.0. --- version/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/VERSION b/version/VERSION index 169f19b4901..32bd932f355 100644 --- a/version/VERSION +++ b/version/VERSION @@ -1 +1 @@ -1.11.0 \ No newline at end of file +1.12.0 \ No newline at end of file From c138ce533e5af2791daa0b5d909139c61c501602 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 10 Nov 2023 16:32:19 -0500 Subject: [PATCH 123/156] Revert "Bumped product version to 1.12.0." This reverts commit cc22e282ac110b291301f0364d958ddf072544e1. The action successfully works now for the future release branch. --- version/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/VERSION b/version/VERSION index 32bd932f355..169f19b4901 100644 --- a/version/VERSION +++ b/version/VERSION @@ -1 +1 @@ -1.12.0 \ No newline at end of file +1.11.0 \ No newline at end of file From c245b1fb7c87fdf2e655887d49f8ad75c59b7e2b Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 15 Nov 2023 09:26:29 -0500 Subject: [PATCH 124/156] deps: Bump github.com/hashicorp/hcp-sdk-go to v0.73.0 * Updates cloud-resource-management API to use sable * Removes duplicate imports of the same SDK packages --- go.mod | 23 ++++++++-------- go.sum | 46 +++++++++++++++++--------------- internal/hcp/api/client.go | 14 +++++----- internal/hcp/api/client_test.go | 2 +- internal/hcp/api/mock_service.go | 15 +++++------ 5 files changed, 51 insertions(+), 49 deletions(-) diff --git a/go.mod b/go.mod index 5e353017141..79fa0f030cb 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e github.com/dsnet/compress v0.0.1 github.com/go-git/go-git/v5 v5.4.2 - github.com/go-openapi/runtime v0.25.0 + github.com/go-openapi/runtime v0.26.0 github.com/gobwas/glob v0.2.3 github.com/gofrs/flock v0.8.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -22,7 +22,7 @@ require ( github.com/hashicorp/go-uuid v1.0.2 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/hcl/v2 v2.14.1 - github.com/hashicorp/hcp-sdk-go v0.36.0 + github.com/hashicorp/hcp-sdk-go v0.73.0 github.com/hashicorp/packer-plugin-amazon v1.2.1 github.com/hashicorp/packer-plugin-sdk v0.4.0 github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 @@ -41,14 +41,14 @@ require ( github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pkg/sftp v1.13.2 // indirect github.com/posener/complete v1.2.3 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.4 github.com/ulikunitz/xz v0.5.10 github.com/zclconf/go-cty v1.10.0 github.com/zclconf/go-cty-yaml v1.0.1 golang.org/x/crypto v0.14.0 // indirect golang.org/x/mod v0.8.0 golang.org/x/net v0.17.0 - golang.org/x/oauth2 v0.11.0 + golang.org/x/oauth2 v0.13.0 golang.org/x/sync v0.3.0 golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect @@ -59,7 +59,7 @@ require ( ) require ( - github.com/go-openapi/strfmt v0.21.3 + github.com/go-openapi/strfmt v0.21.7 github.com/oklog/ulid v1.3.1 github.com/pierrec/lz4/v4 v4.1.18 github.com/shirou/gopsutil/v3 v3.23.4 @@ -83,7 +83,7 @@ require ( github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/armon/go-metrics v0.3.9 // indirect github.com/armon/go-radix v1.0.0 // indirect - github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go v1.44.114 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.0 // indirect @@ -100,12 +100,12 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/errors v0.20.3 // indirect + github.com/go-openapi/errors v0.20.4 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/loads v0.21.2 // indirect github.com/go-openapi/spec v0.20.8 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/go-openapi/validate v0.22.1 // indirect github.com/gofrs/uuid v4.0.0+incompatible // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -167,11 +167,12 @@ require ( github.com/tklauser/numcpus v0.6.0 // indirect github.com/ugorji/go/codec v1.2.6 // indirect github.com/xanzy/ssh-agent v0.3.0 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.mongodb.org/mongo-driver v1.11.0 // indirect + go.mongodb.org/mongo-driver v1.11.3 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.11.1 // indirect - go.opentelemetry.io/otel/trace v1.11.1 // indirect + go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/otel/trace v1.14.0 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index f693b73893e..deccf73b146 100644 --- a/go.sum +++ b/go.sum @@ -70,8 +70,8 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.30.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= @@ -187,8 +187,8 @@ github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9Qy github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= -github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= +github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= +github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -198,21 +198,22 @@ github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXym github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= -github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= +github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= +github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= +github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= +github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= @@ -389,8 +390,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= -github.com/hashicorp/hcp-sdk-go v0.36.0 h1:B1qvnsStyYQyuEudgPrpMdheEC/zTeHRhyF1UwpYTJQ= -github.com/hashicorp/hcp-sdk-go v0.36.0/go.mod h1:mJHPFD1Rs62bieKNVXUiFQlF76NCGACKqHu9a8ihcFk= +github.com/hashicorp/hcp-sdk-go v0.73.0 h1:KjizNN/53nu4YkrDZ24xKjy4EgFt9b3nk1vgfAmgwUk= +github.com/hashicorp/hcp-sdk-go v0.73.0/go.mod h1:k/wgUsKSa2OzWBM5/Pj5ST0YwFGpgC4O5EtCq882jSw= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC7AO2g= @@ -653,8 +654,9 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= @@ -679,6 +681,8 @@ github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+ github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= @@ -692,16 +696,16 @@ github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgK go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.11.0 h1:FZKhBSTydeuffHj9CBjXlR8vQLee1cQyTWYPA6/tqiE= -go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.11.3 h1:Ql6K6qYHEzB6xvu4+AU0BoRoqf9vFPcc4o7MUIdPW8Y= +go.mongodb.org/mongo-driver v1.11.3/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= -go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= -go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= -go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= -go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -773,8 +777,8 @@ golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/internal/hcp/api/client.go b/internal/hcp/api/client.go index 5c8c851ae40..97a749a33bf 100644 --- a/internal/hcp/api/client.go +++ b/internal/hcp/api/client.go @@ -11,12 +11,10 @@ import ( "os" "time" - "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" packerSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" - organizationSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/client/organization_service" - projectSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/client/project_service" - "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" - rmmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" + organizationSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/client/organization_service" + projectSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/client/project_service" + rmmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/models" "github.com/hashicorp/hcp-sdk-go/httpclient" "github.com/hashicorp/packer/internal/hcp/env" "github.com/hashicorp/packer/version" @@ -166,13 +164,13 @@ func (c *Client) loadProjectID() error { } // getOldestProject retrieves the oldest project from a list based on its created_at time. -func getOldestProject(projects []*models.HashicorpCloudResourcemanagerProject) (*models.HashicorpCloudResourcemanagerProject, error) { +func getOldestProject(projects []*rmmodels.HashicorpCloudResourcemanagerProject) (*rmmodels.HashicorpCloudResourcemanagerProject, error) { if len(projects) == 0 { return nil, fmt.Errorf("no project found") } oldestTime := time.Now() - var oldestProj *models.HashicorpCloudResourcemanagerProject + var oldestProj *rmmodels.HashicorpCloudResourcemanagerProject for _, proj := range projects { projTime := time.Time(proj.CreatedAt) if projTime.Before(oldestTime) { @@ -186,7 +184,7 @@ func getOldestProject(projects []*models.HashicorpCloudResourcemanagerProject) ( // ValidateRegistryForProject validates that there is an active registry associated to the configured organization and project ids. // A successful validation will result in a nil response. All other response represent an invalid registry error request or a registry not found error. func (client *Client) ValidateRegistryForProject() error { - params := packer_service.NewPackerServiceGetRegistryParams() + params := packerSvc.NewPackerServiceGetRegistryParams() params.LocationOrganizationID = client.OrganizationID params.LocationProjectID = client.ProjectID diff --git a/internal/hcp/api/client_test.go b/internal/hcp/api/client_test.go index bb952375bf9..7868feca440 100644 --- a/internal/hcp/api/client_test.go +++ b/internal/hcp/api/client_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-openapi/strfmt" - "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/models" ) func TestGetOldestProject(t *testing.T) { diff --git a/internal/hcp/api/mock_service.go b/internal/hcp/api/mock_service.go index f9b427cbf29..ac01c94d002 100644 --- a/internal/hcp/api/mock_service.go +++ b/internal/hcp/api/mock_service.go @@ -9,7 +9,6 @@ import ( "strconv" "github.com/go-openapi/runtime" - "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" packerSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/models" "google.golang.org/grpc/codes" @@ -52,7 +51,7 @@ func NewMockPackerClientService() *MockPackerClientService { return &m } -func (svc *MockPackerClientService) PackerServiceCreateBucket(params *packerSvc.PackerServiceCreateBucketParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceCreateBucketOK, error) { +func (svc *MockPackerClientService) PackerServiceCreateBucket(params *packerSvc.PackerServiceCreateBucketParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceCreateBucketOK, error) { if svc.BucketAlreadyExist { return nil, status.Error(codes.AlreadyExists, fmt.Sprintf("Code:%d %s", codes.AlreadyExists, codes.AlreadyExists.String())) @@ -79,7 +78,7 @@ func (svc *MockPackerClientService) PackerServiceCreateBucket(params *packerSvc. return ok, nil } -func (svc *MockPackerClientService) PackerServiceUpdateBucket(params *packerSvc.PackerServiceUpdateBucketParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceUpdateBucketOK, error) { +func (svc *MockPackerClientService) PackerServiceUpdateBucket(params *packerSvc.PackerServiceUpdateBucketParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceUpdateBucketOK, error) { if svc.TrackCalledServiceMethods { svc.UpdateBucketCalled = true } @@ -87,7 +86,7 @@ func (svc *MockPackerClientService) PackerServiceUpdateBucket(params *packerSvc. return packerSvc.NewPackerServiceUpdateBucketOK(), nil } -func (svc *MockPackerClientService) PackerServiceCreateIteration(params *packerSvc.PackerServiceCreateIterationParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceCreateIterationOK, error) { +func (svc *MockPackerClientService) PackerServiceCreateIteration(params *packerSvc.PackerServiceCreateIterationParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceCreateIterationOK, error) { if svc.IterationAlreadyExist { return nil, status.Error(codes.AlreadyExists, fmt.Sprintf("Code:%d %s", codes.AlreadyExists, codes.AlreadyExists.String())) } @@ -116,7 +115,7 @@ func (svc *MockPackerClientService) PackerServiceCreateIteration(params *packerS return ok, nil } -func (svc *MockPackerClientService) PackerServiceGetIteration(params *packerSvc.PackerServiceGetIterationParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceGetIterationOK, error) { +func (svc *MockPackerClientService) PackerServiceGetIteration(params *packerSvc.PackerServiceGetIterationParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceGetIterationOK, error) { if !svc.IterationAlreadyExist { return nil, status.Error(codes.AlreadyExists, fmt.Sprintf("Code:%d %s", codes.Aborted, codes.Aborted.String())) } @@ -164,7 +163,7 @@ func (svc *MockPackerClientService) PackerServiceGetIteration(params *packerSvc. return ok, nil } -func (svc *MockPackerClientService) PackerServiceCreateBuild(params *packerSvc.PackerServiceCreateBuildParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceCreateBuildOK, error) { +func (svc *MockPackerClientService) PackerServiceCreateBuild(params *packerSvc.PackerServiceCreateBuildParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceCreateBuildOK, error) { if params.BucketSlug == "" { return nil, errors.New("No valid BucketSlug was passed in") } @@ -197,7 +196,7 @@ func (svc *MockPackerClientService) PackerServiceCreateBuild(params *packerSvc.P return ok, nil } -func (svc *MockPackerClientService) PackerServiceUpdateBuild(params *packerSvc.PackerServiceUpdateBuildParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceUpdateBuildOK, error) { +func (svc *MockPackerClientService) PackerServiceUpdateBuild(params *packerSvc.PackerServiceUpdateBuildParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceUpdateBuildOK, error) { if params.BuildID == "" { return nil, errors.New("No valid BuildID was passed in") } @@ -223,7 +222,7 @@ func (svc *MockPackerClientService) PackerServiceUpdateBuild(params *packerSvc.P return ok, nil } -func (svc *MockPackerClientService) PackerServiceListBuilds(params *packerSvc.PackerServiceListBuildsParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceListBuildsOK, error) { +func (svc *MockPackerClientService) PackerServiceListBuilds(params *packerSvc.PackerServiceListBuildsParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceListBuildsOK, error) { status := models.HashicorpCloudPackerBuildStatusUNSET images := make([]*models.HashicorpCloudPackerImage, 0) From 7951607e5e01a10ff2d1dcc72cfee0222dd97ced Mon Sep 17 00:00:00 2001 From: Sarah Date: Wed, 22 Nov 2023 13:14:38 +0000 Subject: [PATCH 125/156] Remove release-engineering as codeowners --- CODEOWNERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 0efb6b1ac47..b92152c7348 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -2,5 +2,3 @@ # release configuration -/.release/ @hashicorp/release-engineering -/.github/workflows/build.yml @hashicorp/release-engineering From 9b2d9f4fb38ae71470a488a865e393973cb321dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Nov 2023 19:24:33 +0000 Subject: [PATCH 126/156] build(deps): bump github.com/hashicorp/hcp-sdk-go from 0.73.0 to 0.74.0 Bumps [github.com/hashicorp/hcp-sdk-go](https://github.com/hashicorp/hcp-sdk-go) from 0.73.0 to 0.74.0. - [Release notes](https://github.com/hashicorp/hcp-sdk-go/releases) - [Changelog](https://github.com/hashicorp/hcp-sdk-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/hcp-sdk-go/compare/v0.73.0...v0.74.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/hcp-sdk-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 28 ++++++------- go.sum | 126 +++++++++++++++------------------------------------------ 2 files changed, 46 insertions(+), 108 deletions(-) diff --git a/go.mod b/go.mod index 79fa0f030cb..81e73b1e8d6 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/hashicorp/go-uuid v1.0.2 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/hcl/v2 v2.14.1 - github.com/hashicorp/hcp-sdk-go v0.73.0 + github.com/hashicorp/hcp-sdk-go v0.74.0 github.com/hashicorp/packer-plugin-amazon v1.2.1 github.com/hashicorp/packer-plugin-sdk v0.4.0 github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 @@ -45,14 +45,14 @@ require ( github.com/ulikunitz/xz v0.5.10 github.com/zclconf/go-cty v1.10.0 github.com/zclconf/go-cty-yaml v1.0.1 - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/mod v0.8.0 - golang.org/x/net v0.17.0 - golang.org/x/oauth2 v0.13.0 + golang.org/x/crypto v0.15.0 // indirect + golang.org/x/mod v0.9.0 + golang.org/x/net v0.18.0 + golang.org/x/oauth2 v0.14.0 golang.org/x/sync v0.3.0 - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/term v0.14.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.6.0 google.golang.org/api v0.128.0 // indirect google.golang.org/grpc v1.59.0 @@ -101,12 +101,12 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/analysis v0.21.4 // indirect github.com/go-openapi/errors v0.20.4 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/spec v0.20.8 // indirect + github.com/go-openapi/spec v0.20.9 // indirect github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-openapi/validate v0.22.1 // indirect + github.com/go-openapi/validate v0.22.2 // indirect github.com/gofrs/uuid v4.0.0+incompatible // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -140,7 +140,6 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect github.com/kr/fs v0.1.0 // indirect - github.com/kr/pretty v0.3.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect @@ -158,7 +157,6 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shoenig/go-m1cpu v0.1.5 // indirect @@ -169,7 +167,7 @@ require ( github.com/xanzy/ssh-agent v0.3.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.mongodb.org/mongo-driver v1.11.3 // indirect + go.mongodb.org/mongo-driver v1.12.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.14.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect diff --git a/go.sum b/go.sum index deccf73b146..03510c07293 100644 --- a/go.sum +++ b/go.sum @@ -36,8 +36,6 @@ github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugX github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= @@ -181,70 +179,42 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= -github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8= +github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= -github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-openapi/validate v0.22.2 h1:Lda8nadL/5kIvS5mdXCAIuZ7IVXvKFIppLnw+EZh+n0= +github.com/go-openapi/validate v0.22.2/go.mod h1:kVxh31KbfsxU8ZyoHaDbLBWU5CnMdqBUEtadQ2G4d5M= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -390,8 +360,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= -github.com/hashicorp/hcp-sdk-go v0.73.0 h1:KjizNN/53nu4YkrDZ24xKjy4EgFt9b3nk1vgfAmgwUk= -github.com/hashicorp/hcp-sdk-go v0.73.0/go.mod h1:k/wgUsKSa2OzWBM5/Pj5ST0YwFGpgC4O5EtCq882jSw= +github.com/hashicorp/hcp-sdk-go v0.74.0 h1:41AS+wk78UgB4wM6oAwkB7lMSmOUQTOYQ9pT2Gc2glA= +github.com/hashicorp/hcp-sdk-go v0.74.0/go.mod h1:5GwdT+HGhEQsh4n1yK+RADnQkfOo6vHgr2BpYUt2t9U= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC7AO2g= @@ -429,14 +399,11 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -449,7 +416,6 @@ github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgo github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kortschak/utter v0.0.0-20190412033250-50fe362e6560/go.mod h1:oDr41C7kH9wvAikWyFhr6UFr8R7nelpmCF5XR5rL7I8= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -457,8 +423,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -472,8 +437,6 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 h1:2ZKn+w/BJeL43sCxI2jhPLRv73oVVOjEKZjKkflyqxg= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= @@ -568,7 +531,6 @@ github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db/go.mod h1 github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= @@ -608,12 +570,7 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= @@ -631,13 +588,11 @@ github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c= github.com/shoenig/test v0.6.3/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -657,7 +612,6 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= @@ -677,10 +631,10 @@ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgq github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= @@ -693,11 +647,9 @@ github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0 github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= -go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.11.3 h1:Ql6K6qYHEzB6xvu4+AU0BoRoqf9vFPcc4o7MUIdPW8Y= -go.mongodb.org/mongo-driver v1.11.3/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= +go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= +go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= @@ -715,10 +667,8 @@ golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -728,8 +678,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= @@ -742,8 +692,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -769,21 +719,19 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= +golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -802,12 +750,10 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -825,7 +771,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -835,12 +780,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -848,8 +793,9 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= @@ -860,11 +806,7 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -935,7 +877,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -957,7 +898,6 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= From efe182b221e6b5fe6c0c654b3b46dc007c87fd4f Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 22 Nov 2023 14:57:29 -0500 Subject: [PATCH 127/156] packer: link to docs if a component is missing When a user invokes packer for a build or validation, the template being processed needs components to be present for Packer to process it without error. If the component cannot be found from the plugins loaded (or from the components bundled with Packer), Packer errors, and the command fails. This is expected, but the error message does not suggest anything to fix the error, potantially leaving users confused at the problem. This commit suggests either a replacement (in case of a typo), or points to the web documentation for Packer, specifically the integrations, so they can look for the plugin they're missing, and install it, so subsequent invocations of Packer work. --- hcl2template/plugin.go | 59 +++++++++++++++++++++++++++++++++++++++--- packer/core.go | 53 ++++++++++++++++++++++++++++++++++++- 2 files changed, 107 insertions(+), 5 deletions(-) diff --git a/hcl2template/plugin.go b/hcl2template/plugin.go index 323263596f8..321616017b6 100644 --- a/hcl2template/plugin.go +++ b/hcl2template/plugin.go @@ -133,10 +133,22 @@ func (cfg *PackerConfig) initializeBlocks() hcl.Diagnostics { // its body. srcUsage := &(build.Sources[i]) if !cfg.parser.PluginConfig.Builders.Has(srcUsage.Type) { + detail := fmt.Sprintf( + "The %s %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ + "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ + "https://developer.hashicorp.com/packer/integrations?filter=%s", + buildSourceLabel, + srcUsage.Type, + strings.Split(srcUsage.Type, "-")[0], + ) + + if sugg := didyoumean.NameSuggestion(srcUsage.Type, cfg.parser.PluginConfig.Builders.List()); sugg != "" { + detail = fmt.Sprintf("Did you mean to use %q?", sugg) + } diags = append(diags, &hcl.Diagnostic{ Summary: "Unknown " + buildSourceLabel + " type " + srcUsage.Type, Subject: &build.HCL2Ref.DefRange, - Detail: fmt.Sprintf("known builders: %v", cfg.parser.PluginConfig.Builders.List()), + Detail: detail, Severity: hcl.DiagError, }) continue @@ -169,10 +181,23 @@ func (cfg *PackerConfig) initializeBlocks() hcl.Diagnostics { for _, provBlock := range build.ProvisionerBlocks { if !cfg.parser.PluginConfig.Provisioners.Has(provBlock.PType) { + detail := fmt.Sprintf( + "The %s %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ + "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ + "https://developer.hashicorp.com/packer/integrations?filter=%s", + buildProvisionerLabel, + provBlock.PType, + strings.Split(provBlock.PType, "-")[0], + ) + + if sugg := didyoumean.NameSuggestion(provBlock.PType, cfg.parser.PluginConfig.Provisioners.List()); sugg != "" { + detail = fmt.Sprintf("Did you mean to use %q?", sugg) + } + diags = append(diags, &hcl.Diagnostic{ Summary: fmt.Sprintf("Unknown "+buildProvisionerLabel+" type %q", provBlock.PType), Subject: provBlock.HCL2Ref.TypeRange.Ptr(), - Detail: fmt.Sprintf("known "+buildProvisionerLabel+"s: %v", cfg.parser.PluginConfig.Provisioners.List()), + Detail: detail, Severity: hcl.DiagError, }) } @@ -180,10 +205,23 @@ func (cfg *PackerConfig) initializeBlocks() hcl.Diagnostics { if build.ErrorCleanupProvisionerBlock != nil { if !cfg.parser.PluginConfig.Provisioners.Has(build.ErrorCleanupProvisionerBlock.PType) { + detail := fmt.Sprintf( + "The %s %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ + "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ + "https://developer.hashicorp.com/packer/integrations?filter=%s", + buildErrorCleanupProvisionerLabel, + build.ErrorCleanupProvisionerBlock.PType, + strings.Split(build.ErrorCleanupProvisionerBlock.PType, "-")[0], + ) + + if sugg := didyoumean.NameSuggestion(build.ErrorCleanupProvisionerBlock.PType, cfg.parser.PluginConfig.Provisioners.List()); sugg != "" { + detail = fmt.Sprintf("Did you mean to use %q?", sugg) + } + diags = append(diags, &hcl.Diagnostic{ Summary: fmt.Sprintf("Unknown "+buildErrorCleanupProvisionerLabel+" type %q", build.ErrorCleanupProvisionerBlock.PType), Subject: build.ErrorCleanupProvisionerBlock.HCL2Ref.TypeRange.Ptr(), - Detail: fmt.Sprintf("known "+buildErrorCleanupProvisionerLabel+"s: %v", cfg.parser.PluginConfig.Provisioners.List()), + Detail: detail, Severity: hcl.DiagError, }) } @@ -192,10 +230,23 @@ func (cfg *PackerConfig) initializeBlocks() hcl.Diagnostics { for _, ppList := range build.PostProcessorsLists { for _, ppBlock := range ppList { if !cfg.parser.PluginConfig.PostProcessors.Has(ppBlock.PType) { + detail := fmt.Sprintf( + "The %s %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ + "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ + "https://developer.hashicorp.com/packer/integrations?filter=%s", + buildPostProcessorLabel, + ppBlock.PType, + strings.Split(ppBlock.PType, "-")[0], + ) + + if sugg := didyoumean.NameSuggestion(ppBlock.PType, cfg.parser.PluginConfig.PostProcessors.List()); sugg != "" { + detail = fmt.Sprintf("Did you mean to use %q?", sugg) + } + diags = append(diags, &hcl.Diagnostic{ Summary: fmt.Sprintf("Unknown "+buildPostProcessorLabel+" type %q", ppBlock.PType), Subject: ppBlock.HCL2Ref.TypeRange.Ptr(), - Detail: fmt.Sprintf("known "+buildPostProcessorLabel+"s: %v", cfg.parser.PluginConfig.PostProcessors.List()), + Detail: detail, Severity: hcl.DiagError, }) } diff --git a/packer/core.go b/packer/core.go index 732f026360f..4803f1de474 100644 --- a/packer/core.go +++ b/packer/core.go @@ -18,6 +18,7 @@ import ( multierror "github.com/hashicorp/go-multierror" version "github.com/hashicorp/go-version" hcl "github.com/hashicorp/hcl/v2" + "github.com/hashicorp/packer-plugin-sdk/didyoumean" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" @@ -218,15 +219,33 @@ func (c *Core) BuildNames(only, except []string) []string { func (c *Core) generateCoreBuildProvisioner(rawP *template.Provisioner, rawName string) (CoreBuildProvisioner, error) { // Get the provisioner cbp := CoreBuildProvisioner{} + + if !c.components.PluginConfig.Provisioners.Has(rawP.Type) { + err := fmt.Errorf( + "The provisioner %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ + "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ + "https://developer.hashicorp.com/packer/integrations?filter=%s", + rawP.Type, + strings.Split(rawP.Type, "-")[0], + ) + + if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Builders.List()); sugg != "" { + err = fmt.Errorf("Did you mean to use %q?", sugg) + } + + return cbp, err + } + provisioner, err := c.components.PluginConfig.Provisioners.Start(rawP.Type) if err != nil { return cbp, fmt.Errorf( "error initializing provisioner '%s': %s", rawP.Type, err) } + // Seems unlikely that a provisioner doesn't start successfully without error if provisioner == nil { return cbp, fmt.Errorf( - "provisioner type not found: %s", rawP.Type) + "provisioner failed to be started and did not error: %s", rawP.Type) } // Get the configuration @@ -335,6 +354,22 @@ func (c *Core) Build(n string) (packersdk.Build, error) { // For reference, the builtin BuilderStore is generated in // packer/config.go in the Discover() func. + if !c.components.PluginConfig.Builders.Has(configBuilder.Type) { + err := fmt.Errorf( + "The builder %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ + "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ + "https://developer.hashicorp.com/packer/integrations?filter=%s", + configBuilder.Type, + strings.Split(configBuilder.Type, "-")[0], + ) + + if sugg := didyoumean.NameSuggestion(configBuilder.Type, c.components.PluginConfig.Builders.List()); sugg != "" { + err = fmt.Errorf("Did you mean to use %q?", sugg) + } + + return nil, err + } + // the Start command launches the builder plugin of the given type without // calling Prepare() or passing any build-specific details. builder, err := c.components.PluginConfig.Builders.Start(configBuilder.Type) @@ -396,6 +431,22 @@ func (c *Core) Build(n string) (packersdk.Build, error) { break } + if !c.components.PluginConfig.PostProcessors.Has(rawP.Type) { + err := fmt.Errorf( + "The post-processor %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ + "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ + "https://developer.hashicorp.com/packer/integrations?filter=%s", + rawP.Type, + strings.Split(rawP.Type, "-")[0], + ) + + if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.PostProcessors.List()); sugg != "" { + err = fmt.Errorf("Did you mean to use %q?", sugg) + } + + return nil, err + } + // Get the post-processor postProcessor, err := c.components.PluginConfig.PostProcessors.Start(rawP.Type) if err != nil { From 311ba90f7a32fb5feae633ffaa08123a8ad9fb00 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 22 Nov 2023 21:12:45 -0500 Subject: [PATCH 128/156] Update Acceptance Test to include BuilderSet This change initializes a MapOfBuilders with the test builder to fix a panic with checking if the initialized BuilderSet has an entry for the test builder. --- acctest/testing.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acctest/testing.go b/acctest/testing.go index dd18be1a365..f88d2dde3e9 100644 --- a/acctest/testing.go +++ b/acctest/testing.go @@ -136,6 +136,9 @@ func Test(t TestT, c TestCase) { Components: packer.ComponentFinder{ PluginConfig: &packer.PluginConfig{ Builders: TestBuilderSet{ + BuilderSet: packersdk.MapOfBuilder{ + "test": func() (packersdk.Builder, error) { return c.Builder, nil }, + }, StartFn: func(n string) (packersdk.Builder, error) { if n == "test" { return c.Builder, nil From 17ff50896e01fb749a939a493f4404b95f7814bc Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 22 Nov 2023 21:14:32 -0500 Subject: [PATCH 129/156] Update didyoumean to call provisioners.List() --- packer/core.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/core.go b/packer/core.go index 4803f1de474..7a56dc06cc5 100644 --- a/packer/core.go +++ b/packer/core.go @@ -229,7 +229,7 @@ func (c *Core) generateCoreBuildProvisioner(rawP *template.Provisioner, rawName strings.Split(rawP.Type, "-")[0], ) - if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Builders.List()); sugg != "" { + if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Provisioners.List()); sugg != "" { err = fmt.Errorf("Did you mean to use %q?", sugg) } From c90ea91e05cbf2cd5748132685d78156b0546d2f Mon Sep 17 00:00:00 2001 From: hc-github-team-es-release-engineering <82989873+hc-github-team-es-release-engineering@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:16:33 -0800 Subject: [PATCH 130/156] Update LICENSE --- LICENSE | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/LICENSE b/LICENSE index f7d6cdd08cf..91ed1781f82 100644 --- a/LICENSE +++ b/LICENSE @@ -1,32 +1,33 @@ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved. -“Business Source License” is a trademark of MariaDB Corporation Ab. +"Business Source License" is a trademark of MariaDB Corporation Ab. Parameters Licensor: HashiCorp, Inc. -Licensed Work: Packer 1.10.0. The Licensed Work is (c) 2023 HashiCorp, Inc. +Licensed Work: Packer Version 1.10.0 or later. The Licensed Work is (c) 2024 + HashiCorp, Inc. Additional Use Grant: You may make production use of the Licensed Work, provided Your use does not include offering the Licensed Work to third parties on a hosted or embedded basis in order to compete with - HashiCorp’s paid version(s) of the Licensed Work. For purposes + HashiCorp's paid version(s) of the Licensed Work. For purposes of this license: - A “competitive offering” is a Product that is offered to third + A "competitive offering" is a Product that is offered to third parties on a paid basis, including through paid support arrangements, that significantly overlaps with the capabilities - of HashiCorp’s paid version(s) of the Licensed Work. If Your + of HashiCorp's paid version(s) of the Licensed Work. If Your Product is not a competitive offering when You first make it generally available, it will not become a competitive offering later due to HashiCorp releasing a new version of the Licensed Work with additional capabilities. In addition, Products that are not provided on a paid basis are not competitive. - “Product” means software that is offered to end users to manage + "Product" means software that is offered to end users to manage in their own environments or offered as a service on a hosted basis. - “Embedded” means including the source code or executable code - from the Licensed Work in a competitive offering. “Embedded” + "Embedded" means including the source code or executable code + from the Licensed Work in a competitive offering. "Embedded" also means packaging the competitive offering in such a way that the Licensed Work must be accessed or downloaded for the competitive offering to operate. @@ -85,7 +86,7 @@ Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License). TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE. From 708653c843a063817c558f763b412c9195a238d4 Mon Sep 17 00:00:00 2001 From: hc-github-team-es-release-engineering <82989873+hc-github-team-es-release-engineering@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:37:32 -0800 Subject: [PATCH 131/156] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 91ed1781f82..0918b4a93f4 100644 --- a/LICENSE +++ b/LICENSE @@ -4,7 +4,7 @@ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved. Parameters Licensor: HashiCorp, Inc. -Licensed Work: Packer Version 1.10.0 or later. The Licensed Work is (c) 2024 +Licensed Work: Packer Version 1.10.0 or later. The Licensed Work is (c) 2023 HashiCorp, Inc. Additional Use Grant: You may make production use of the Licensed Work, provided Your use does not include offering the Licensed Work to third From 8c7b97331b59ec5fa6b2e68acba30e4142670f51 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 27 Nov 2023 16:37:43 -0500 Subject: [PATCH 132/156] hcl2: don't show an empty source on var errors If a variable is defined and overriden in the packer command-line, but there's a problem during the evaluation of this override (type error typically), we show an error message which details the problem. This message points to a temporary in-memory HCL2 "file" that we use for parsing and evaluating the expression for the variable, but since it's virtual, there's no point in using this as the source for the error, as it will always yield "line 0" and no contents. So, in order to limit confusion here, we remove the source for this error message. --- hcl2template/types.variables.go | 1 - 1 file changed, 1 deletion(-) diff --git a/hcl2template/types.variables.go b/hcl2template/types.variables.go index 33df28a84ee..b3754e8f111 100644 --- a/hcl2template/types.variables.go +++ b/hcl2template/types.variables.go @@ -741,7 +741,6 @@ func (cfg *PackerConfig) collectInputVariableValues(env []string, files []*hcl.F Severity: hcl.DiagError, Summary: "Invalid argument value for -var variable", Detail: fmt.Sprintf("The received arg value for %s is not compatible with the variable's type constraint: %s.", name, err), - Subject: expr.Range().Ptr(), }) val = cty.DynamicVal } From ebaf831562948ad606b8f9059eacc6f29147a96d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 28 Nov 2023 15:01:04 -0500 Subject: [PATCH 133/156] cmd/hcl2upgrade: Add VirtualBox as known plugin --- command/hcl2_upgrade.go | 1 + 1 file changed, 1 insertion(+) diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index 3393ee86bad..08ffa767e99 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -104,6 +104,7 @@ var knownPlugins = map[string]string{ "googlecompute": "github.com/hashicorp/googlecompute", "qemu": "github.com/hashicorp/qemu", "vagrant": "github.com/hashicorp/vagrant", + "virtualbox": "github.com/hashicorp/virtualbox", "vmware": "github.com/hashicorp/vmware", "vsphere": "github.com/hashicorp/vsphere", } From 2aad17044029904385a63c24d8891bba8777dc4e Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 28 Nov 2023 13:10:16 -0500 Subject: [PATCH 134/156] Bumps github.com/hashicorp/packer-plugin-sdk from 0.4.0 to 0.5.2 --- go.mod | 62 ++++++------ go.sum | 306 +++++++++++++++++---------------------------------------- 2 files changed, 124 insertions(+), 244 deletions(-) diff --git a/go.mod b/go.mod index 81e73b1e8d6..af9e82838a5 100644 --- a/go.mod +++ b/go.mod @@ -17,43 +17,42 @@ require ( github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840 - github.com/hashicorp/go-getter/v2 v2.2.0 + github.com/hashicorp/go-getter/v2 v2.2.1 github.com/hashicorp/go-multierror v1.1.1 - github.com/hashicorp/go-uuid v1.0.2 + github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/hcl/v2 v2.14.1 + github.com/hashicorp/hcl/v2 v2.19.1 github.com/hashicorp/hcp-sdk-go v0.74.0 github.com/hashicorp/packer-plugin-amazon v1.2.1 - github.com/hashicorp/packer-plugin-sdk v0.4.0 + github.com/hashicorp/packer-plugin-sdk v0.5.2 github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 github.com/klauspost/compress v1.13.6 // indirect github.com/klauspost/pgzip v1.2.5 github.com/masterzen/winrm v0.0.0-20210623064412-3b76017826b0 github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mattn/go-tty v0.0.0-20191112051231-74040eebce08 - github.com/mitchellh/cli v1.1.2 + github.com/mitchellh/cli v1.1.5 github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff // indirect github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/mapstructure v1.5.0 github.com/mitchellh/panicwrap v1.0.0 github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784 github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db // indirect - github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pkg/sftp v1.13.2 // indirect github.com/posener/complete v1.2.3 github.com/stretchr/testify v1.8.4 github.com/ulikunitz/xz v0.5.10 - github.com/zclconf/go-cty v1.10.0 + github.com/zclconf/go-cty v1.13.3 github.com/zclconf/go-cty-yaml v1.0.1 golang.org/x/crypto v0.15.0 // indirect - golang.org/x/mod v0.9.0 + golang.org/x/mod v0.13.0 golang.org/x/net v0.18.0 golang.org/x/oauth2 v0.14.0 - golang.org/x/sync v0.3.0 + golang.org/x/sync v0.4.0 golang.org/x/sys v0.14.0 // indirect golang.org/x/term v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.6.0 + golang.org/x/tools v0.14.0 google.golang.org/api v0.128.0 // indirect google.golang.org/grpc v1.59.0 ) @@ -73,15 +72,16 @@ require ( github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/sprig v2.22.0+incompatible // indirect + github.com/Masterminds/semver/v3 v3.1.1 // indirect + github.com/Masterminds/sprig/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.4.16 // indirect github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect github.com/acomagu/bufpipe v1.0.3 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-cidr v1.0.1 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/armon/go-metrics v0.3.9 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/armon/go-metrics v0.4.1 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go v1.44.114 // indirect @@ -90,12 +90,13 @@ require ( github.com/bmatcuk/doublestar v1.1.5 // indirect github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/chzyer/test v1.0.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect github.com/emirpasic/gods v1.12.0 // indirect - github.com/fatih/color v1.12.0 // indirect + github.com/fatih/color v1.14.1 // indirect github.com/go-git/gcfg v1.5.0 // indirect github.com/go-git/go-billy/v5 v5.3.1 // indirect + github.com/go-jose/go-jose/v3 v3.0.0 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -109,30 +110,29 @@ require ( github.com/go-openapi/validate v0.22.2 // indirect github.com/gofrs/uuid v4.0.0+incompatible // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.0.1 // indirect github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.1 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/aws-sdk-go-base v0.7.1 // indirect - github.com/hashicorp/consul/api v1.10.1 // indirect + github.com/hashicorp/consul/api v1.25.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter/gcs/v2 v2.2.0 // indirect - github.com/hashicorp/go-getter/s3/v2 v2.2.0 // indirect - github.com/hashicorp/go-hclog v0.16.2 // indirect + github.com/hashicorp/go-getter/gcs/v2 v2.2.1 // indirect + github.com/hashicorp/go-getter/s3/v2 v2.2.1 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect + github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/serf v0.9.5 // indirect - github.com/hashicorp/vault/api v1.1.1 // indirect - github.com/hashicorp/vault/sdk v0.2.1 // indirect - github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect + github.com/hashicorp/serf v0.10.1 // indirect + github.com/hashicorp/vault/api v1.10.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect @@ -144,8 +144,8 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect github.com/matryer/is v1.4.0 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.13 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -154,13 +154,15 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shoenig/go-m1cpu v0.1.5 // indirect + github.com/shopspring/decimal v1.2.0 // indirect github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect + github.com/spf13/cast v1.3.1 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/ugorji/go/codec v1.2.6 // indirect @@ -171,6 +173,7 @@ require ( go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.14.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect + golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -179,10 +182,11 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect - gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) go 1.20 + +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.3 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/go.sum b/go.sum index 03510c07293..dbb79b38c77 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= @@ -12,7 +11,6 @@ cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+K cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= @@ -22,18 +20,15 @@ github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nu github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 h1:w0E0fgc1YafGEh5cROhlROMWXiNoZqApk2PDN0M1+Ns= github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.1 h1:n6EPaDyLSvCEa3frruQvAiHuNp2dhBlMSmkEr+HuzGc= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= @@ -46,22 +41,20 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antchfx/xmlquery v1.3.5 h1:I7TuBRqsnfFuL11ruavGm911Awx9IqSdiU6W/ztSmVw= github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ= -github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0 h1:JaCC8jz0zdMLk2m+qCCVLLLM/PL93p84w4pK3aJWj60= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-cidr v1.0.1 h1:NmIwLZ/KdsjIUlhf+/Np40atNXm/+lZ5txfTJ/SpF+U= github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= -github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -70,8 +63,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.30.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.44.114 h1:plIkWc/RsHr3DXBj4MEw9sEW4CcL/e2ryokc+CKyq1I= github.com/aws/aws-sdk-go v1.44.114/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= @@ -87,7 +78,6 @@ github.com/biogo/hts v1.4.3 h1:vir2yUTiRkPvtp6ZTpzh9lWTKQJZXJKZ563rpAQAsRM= github.com/biogo/hts v1.4.3/go.mod h1:eW40HJ1l2ExK9C+yvvoRSftInqWsf3ue+zAEjzCGWjA= github.com/bmatcuk/doublestar v1.1.5 h1:2bNwBOmhyFEFcoB3tGvTD5xanq+4kyOZlB8wFYbMjkk= github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -109,32 +99,17 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200709052629-daa8e1ccc0bc/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.4.2-0.20200319182547-c7ad2b866182/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI= github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ= -github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 h1:0bp6/GrNOrTDtSXe9YYGCwf8jp5Fb/b+4a6MTRm4qzY= +github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6 h1:zWydSUQBJApHwpQ4guHi+mGyQN/8yN6xbKWdDtL3ZNM= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -145,17 +120,13 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE= -github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= @@ -166,10 +137,10 @@ github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6 github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= +github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= -github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -212,31 +183,24 @@ github.com/go-openapi/validate v0.22.2 h1:Lda8nadL/5kIvS5mdXCAIuZ7IVXvKFIppLnw+E github.com/go-openapi/validate v0.22.2/go.mod h1:kVxh31KbfsxU8ZyoHaDbLBWU5CnMdqBUEtadQ2G4d5M= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -250,11 +214,8 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -283,16 +244,14 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.4 h1:uGy6JWR/uMIILU8wbf+ github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 h1:BpJ2o0OR5FV7vrkDYfXYVJQeMNWa8RhklZOpW2ITAIQ= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE= github.com/hashicorp/aws-sdk-go-base v0.7.1 h1:7s/aR3hFn74tYPVihzDyZe7y/+BorN70rr9ZvpV3j3o= github.com/hashicorp/aws-sdk-go-base v0.7.1/go.mod h1:2fRjWDv3jJBeN6mVWFHV6hFTNeFBx2gpDLQaZNxUVAY= -github.com/hashicorp/consul/api v1.10.1 h1:MwZJp86nlnL+6+W1Zly4JUuVn9YHhMggBirMpHGD7kw= -github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= +github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -304,96 +263,80 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840 h1:kgvybwEeu0SXktbB2y3uLHX9lklLo+nzUwh59A3jzQc= github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840/go.mod h1:Abjk0jbRkDaNCzsRhOv2iDCofYpX1eVsjozoiK63qLA= -github.com/hashicorp/go-getter/gcs/v2 v2.2.0 h1:oo6LVXva9I4CZzv531mn/FY5gtRx540I6eWwJVPWA4o= -github.com/hashicorp/go-getter/gcs/v2 v2.2.0/go.mod h1:oDHNhZN2Gf6UqfIol4S9PkbzMFlf8rBctrJvAHDTtOM= -github.com/hashicorp/go-getter/s3/v2 v2.2.0 h1:JGZihrdkZnuw+bDf8BnxuRLPwi0cfL2mwRlWA2lREAg= -github.com/hashicorp/go-getter/s3/v2 v2.2.0/go.mod h1:hj0uM2nGIi0rln/VcvxjaQYQg3WGssfUh/ya5jA555g= -github.com/hashicorp/go-getter/v2 v2.2.0 h1:vLenCsJqB5oNE141xKtT6cajhwAE8dneiNgzZA3oOqs= -github.com/hashicorp/go-getter/v2 v2.2.0/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-getter/gcs/v2 v2.2.1 h1:yZgDXYy5m4xogJV8hXzX5S/fM/rjJnBz+EzTeFrfLEM= +github.com/hashicorp/go-getter/gcs/v2 v2.2.1/go.mod h1:xzT3sNmGRipCRMpWz24fYHMvgb4MRn/smg5k2mhJ7Bo= +github.com/hashicorp/go-getter/s3/v2 v2.2.1 h1:Psuhz6iuCxJOd3kGinK46x+4BzcJgwff8BId7CuGPYU= +github.com/hashicorp/go-getter/s3/v2 v2.2.1/go.mod h1:KDqfEPgpwZIy+1sAplFX231CE+M6wdL5Q/j6OMbKSnw= +github.com/hashicorp/go-getter/v2 v2.2.1 h1:2JXqPZs1Jej67RtdTi0YZaEB2hEFB3fkBA4cPYKQwFQ= +github.com/hashicorp/go-getter/v2 v2.2.1/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.6.2/go.mod h1:gEx6HMUGxYYhJScX7W1Il64m6cc2C1mDaW3NQ9sY1FY= -github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4= github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= -github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/hcp-sdk-go v0.74.0 h1:41AS+wk78UgB4wM6oAwkB7lMSmOUQTOYQ9pT2Gc2glA= github.com/hashicorp/hcp-sdk-go v0.74.0/go.mod h1:5GwdT+HGhEQsh4n1yK+RADnQkfOo6vHgr2BpYUt2t9U= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC7AO2g= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/packer-plugin-amazon v1.2.1 h1:0Xqr8KsTJJhIo0vvjqPYrVMgyVxNRuYH4DeB5m/WAtw= github.com/hashicorp/packer-plugin-amazon v1.2.1/go.mod h1:qlp0h5TWVGgcPzN9mSxPiEAwOUOW3XU/zep0pGd0ZsM= -github.com/hashicorp/packer-plugin-sdk v0.4.0 h1:UyLYe0y02D9wkOQ3FeeZWyFg2+mx2vLuWRGUL5xt50I= -github.com/hashicorp/packer-plugin-sdk v0.4.0/go.mod h1:uNhU3pmjM2ejgHYce/g4J+sa5rh81iYQztpGvGa5FOs= -github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/vault/api v1.0.5-0.20200519221902-385fac77e20f/go.mod h1:euTFbi2YJgwcju3imEt919lhJKF68nN1cQPq3aA+kBE= -github.com/hashicorp/vault/api v1.1.1 h1:907ld+Z9cALyvbZK2qUX9cLwvSaEQsMVQB3x2KE8+AI= -github.com/hashicorp/vault/api v1.1.1/go.mod h1:29UXcn/1cLOPHQNMWA7bCz2By4PSd0VKPAydKXS5yN0= -github.com/hashicorp/vault/sdk v0.1.14-0.20200519221530-14615acda45f/go.mod h1:WX57W2PwkrOPQ6rVQk+dy5/htHIaB4aBM70EwKThu10= -github.com/hashicorp/vault/sdk v0.2.1 h1:S4O6Iv/dyKlE9AUTXGa7VOvZmsCvg36toPKgV4f2P4M= -github.com/hashicorp/vault/sdk v0.2.1/go.mod h1:WfUiO1vYzfBkz1TmoE4ZGU7HD0T0Cl/rZwaxjBkgN4U= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 h1:brI5vBRUlAlM34VFmnLPwjnCL/FxAJp9XvOdX6Zt+XE= -github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hashicorp/packer-plugin-sdk v0.5.2 h1:N+9qzkZLkjR0bgY+l5wFvrTN0G/Mf9f7g2yLsrDjmFI= +github.com/hashicorp/packer-plugin-sdk v0.5.2/go.mod h1:0LRUBS6CPClHvq6zPoGRi7C+cZDAIEaW4CeH4LhWWuc= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hashicorp/vault/api v1.10.0 h1:/US7sIjWN6Imp4o/Rj1Ce2Nr5bki/AXi9vAW3p2tOJQ= +github.com/hashicorp/vault/api v1.10.0/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 h1:IPJ3dvxmJ4uczJe5YQdrYB16oTJlGSC/OyZDqUk9xX4= github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -406,9 +349,6 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -429,7 +369,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -448,27 +387,30 @@ github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwM github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= -github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-tty v0.0.0-20191112051231-74040eebce08 h1:8YAWbq7rJqfbc6IaAvA2eCQuOQvf6Bs4vHKcOyWw//E= github.com/mattn/go-tty v0.0.0-20191112051231-74040eebce08/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26 h1:gPxPSwALAeHJSjarOs00QjVdV9QoBvc1D2ujQUr5BzU= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/cli v1.1.2 h1:PvH+lL2B7IQ101xQL63Of8yFS2y+aDlsFcsqNc+u/Kw= -github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= +github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= +github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -478,8 +420,6 @@ github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff h1:bFJ74ac7ZK/jyis github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff/go.mod h1:g7SZj7ABpStq3tM4zqHiVEG5un/DZ1+qJJKO7qx1EvU= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= @@ -488,8 +428,6 @@ github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTS github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -506,24 +444,14 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/nywilken/go-cty v1.13.3 h1:03U99oXf3j3g9xgqAE3YGpixCjM8Mg09KZ0Ji9LzX0o= +github.com/nywilken/go-cty v1.13.3/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db h1:9uViuKtx1jrlXLBW/pMnhOfzn3iSEdLase/But/IZRU= @@ -531,40 +459,32 @@ github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db/go.mod h1 github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= -github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.2 h1:taJnKntsWgU+qae21Rx52lIwndAdKrj0mfUNQsz1z4Q= github.com/pkg/sftp v1.13.2/go.mod h1:LzqnAvaD5TWeNBsZpfKxSYn1MbjWwOsCIAFFJbpIsK8= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -575,7 +495,6 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= @@ -586,15 +505,15 @@ github.com/shoenig/go-m1cpu v0.1.5 h1:LF57Z/Fpb/WdGLjt2HZilNnmZOxg/q2bSKTQhgbrLr github.com/shoenig/go-m1cpu v0.1.5/go.mod h1:Wwvst4LR89UxjeFtLRMrpgRiyY4xPsejnVZym39dbAQ= github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c= github.com/shoenig/test v0.6.3/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -607,6 +526,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= @@ -624,10 +544,8 @@ github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxW github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -641,16 +559,12 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7Jul github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v1.4.0/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0qXAFGQ= -github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= @@ -659,18 +573,15 @@ go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvx go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= @@ -683,42 +594,35 @@ golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -731,53 +635,50 @@ golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74Ow golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= @@ -789,32 +690,25 @@ golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -824,12 +718,9 @@ google.golang.org/api v0.128.0 h1:RjPESny5CnQRn9V6siglged+DZCgfu9l6mO9dkX9VOg= google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= @@ -839,15 +730,10 @@ google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1: google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -867,7 +753,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -877,13 +762,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= -gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -900,7 +778,5 @@ gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 263821ac2599123b7fd7aa1a8559fe0b3050f68d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 28 Nov 2023 13:01:10 -0500 Subject: [PATCH 135/156] hcl2template/functions: Add Non-null refinements for various functions cty's new "refinements" concept allows us to reduce the range of unknown values from our functions. This initial changeset focuses only on declaring which functions are guaranteed to return a non-null result, which is a helpful baseline refinement because it allows "== null" and "!= null" tests to produce known results even when the given value is otherwise unknown. This commit also includes some updates to test results that are now refined based on cty's own built-in refinement behaviors, just as a result of us having updated cty in the previous commit. --- hcl2template/function/datetime.go | 35 ++++++++++++++++------------ hcl2template/function/env.go | 3 ++- hcl2template/function/index.go | 3 ++- hcl2template/function/length.go | 1 + hcl2template/function/length_test.go | 18 ++++++++------ hcl2template/function/refinements.go | 9 +++++++ 6 files changed, 45 insertions(+), 24 deletions(-) create mode 100644 hcl2template/function/refinements.go diff --git a/hcl2template/function/datetime.go b/hcl2template/function/datetime.go index 066db18db39..a2b0cc9d17c 100644 --- a/hcl2template/function/datetime.go +++ b/hcl2template/function/datetime.go @@ -12,19 +12,20 @@ import ( "github.com/zclconf/go-cty/cty/function" ) -// InitTime is the UTC time when this package was initialized. It is +// initTime is the UTC time when this package was initialized. It is // used as the timestamp for all configuration templates so that they // match for a single build. -var InitTime time.Time +var initTime time.Time func init() { - InitTime = time.Now().UTC() + initTime = time.Now().UTC() } // TimestampFunc constructs a function that returns a string representation of the current date and time. var TimestampFunc = function.New(&function.Spec{ - Params: []function.Parameter{}, - Type: function.StaticReturnType(cty.String), + Params: []function.Parameter{}, + Type: function.StaticReturnType(cty.String), + RefineResult: refineNotNull, Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { return cty.StringVal(time.Now().UTC().Format(time.RFC3339)), nil }, @@ -40,42 +41,46 @@ func Timestamp() (cty.Value, error) { } // LegacyIsotimeFunc constructs a function that returns a string representation -// of the current date and time using golang's datetime formatting. +// of the current date and time using the Go language datetime formatting syntax. var LegacyIsotimeFunc = function.New(&function.Spec{ Params: []function.Parameter{}, VarParam: &function.Parameter{ Name: "format", Type: cty.String, }, - Type: function.StaticReturnType(cty.String), + Type: function.StaticReturnType(cty.String), + RefineResult: refineNotNull, Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { if len(args) > 1 { return cty.StringVal(""), fmt.Errorf("too many values, 1 needed: %v", args) - } else if len(args) == 0 { - return cty.StringVal(InitTime.Format(time.RFC3339)), nil + } + if len(args) == 0 { + return cty.StringVal(initTime.Format(time.RFC3339)), nil } format := args[0].AsString() - return cty.StringVal(InitTime.Format(format)), nil + return cty.StringVal(initTime.Format(format)), nil }, }) // LegacyStrftimeFunc constructs a function that returns a string representation -// of the current date and time using golang's strftime datetime formatting. +// of the current date and time using the Go language strftime datetime formatting syntax. var LegacyStrftimeFunc = function.New(&function.Spec{ Params: []function.Parameter{}, VarParam: &function.Parameter{ Name: "format", Type: cty.String, }, - Type: function.StaticReturnType(cty.String), + Type: function.StaticReturnType(cty.String), + RefineResult: refineNotNull, Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { if len(args) > 1 { return cty.StringVal(""), fmt.Errorf("too many values, 1 needed: %v", args) - } else if len(args) == 0 { - return cty.StringVal(InitTime.Format(time.RFC3339)), nil + } + if len(args) == 0 { + return cty.StringVal(initTime.Format(time.RFC3339)), nil } format := args[0].AsString() - return cty.StringVal(strftime.Format(format, InitTime)), nil + return cty.StringVal(strftime.Format(format, initTime)), nil }, }) diff --git a/hcl2template/function/env.go b/hcl2template/function/env.go index 34c09a8b921..b6c36e68494 100644 --- a/hcl2template/function/env.go +++ b/hcl2template/function/env.go @@ -21,7 +21,8 @@ var EnvFunc = function.New(&function.Spec{ AllowUnknown: false, }, }, - Type: function.StaticReturnType(cty.String), + Type: function.StaticReturnType(cty.String), + RefineResult: refineNotNull, Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { key := args[0].AsString() value := os.Getenv(key) diff --git a/hcl2template/function/index.go b/hcl2template/function/index.go index cb4f0c51921..8aade576ded 100644 --- a/hcl2template/function/index.go +++ b/hcl2template/function/index.go @@ -23,7 +23,8 @@ var IndexFunc = function.New(&function.Spec{ Type: cty.DynamicPseudoType, }, }, - Type: function.StaticReturnType(cty.Number), + Type: function.StaticReturnType(cty.Number), + RefineResult: refineNotNull, Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) { if !(args[0].Type().IsListType() || args[0].Type().IsTupleType()) { return cty.NilVal, errors.New("argument must be a list or tuple") diff --git a/hcl2template/function/length.go b/hcl2template/function/length.go index 23b5969af10..f2b83dad925 100644 --- a/hcl2template/function/length.go +++ b/hcl2template/function/length.go @@ -29,6 +29,7 @@ var LengthFunc = function.New(&function.Spec{ return cty.Number, errors.New("argument must be a string, a collection type, or a structural type") } }, + RefineResult: refineNotNull, Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { coll := args[0] collTy := args[0].Type() diff --git a/hcl2template/function/length_test.go b/hcl2template/function/length_test.go index 0a68c126c51..9bae3886f74 100644 --- a/hcl2template/function/length_test.go +++ b/hcl2template/function/length_test.go @@ -5,6 +5,7 @@ package function import ( "fmt" + "math" "testing" "github.com/zclconf/go-cty/cty" @@ -69,11 +70,15 @@ func TestLength(t *testing.T) { }, { cty.UnknownVal(cty.List(cty.Bool)), - cty.UnknownVal(cty.Number), + cty.UnknownVal(cty.Number).Refine(). + NotNull(). + NumberRangeLowerBound(cty.Zero, true). + NumberRangeUpperBound(cty.NumberIntVal(math.MaxInt), true). + NewValue(), }, { cty.DynamicVal, - cty.UnknownVal(cty.Number), + cty.UnknownVal(cty.Number).RefineNotNull(), }, { cty.StringVal("hello"), @@ -118,11 +123,10 @@ func TestLength(t *testing.T) { }, { cty.UnknownVal(cty.String), - cty.UnknownVal(cty.Number), - }, - { - cty.DynamicVal, - cty.UnknownVal(cty.Number), + cty.UnknownVal(cty.Number).Refine(). + NotNull(). + NumberRangeLowerBound(cty.Zero, true). + NewValue(), }, } diff --git a/hcl2template/function/refinements.go b/hcl2template/function/refinements.go new file mode 100644 index 00000000000..99314d7ee48 --- /dev/null +++ b/hcl2template/function/refinements.go @@ -0,0 +1,9 @@ +package function + +import ( + "github.com/zclconf/go-cty/cty" +) + +func refineNotNull(b *cty.RefinementBuilder) *cty.RefinementBuilder { + return b.NotNull() +} From 083243c119f13d7af655eabcf1d79835df18f897 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 29 Nov 2023 13:16:13 -0500 Subject: [PATCH 136/156] Bump github.com/go-jose/go-jose/v3 to address GO-2023-2334 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index af9e82838a5..8b8d0a2f210 100644 --- a/go.mod +++ b/go.mod @@ -96,7 +96,7 @@ require ( github.com/fatih/color v1.14.1 // indirect github.com/go-git/gcfg v1.5.0 // indirect github.com/go-git/go-billy/v5 v5.3.1 // indirect - github.com/go-jose/go-jose/v3 v3.0.0 // indirect + github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect diff --git a/go.sum b/go.sum index dbb79b38c77..27c538c47c5 100644 --- a/go.sum +++ b/go.sum @@ -137,8 +137,8 @@ github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6 github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= +github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= From aad03ba12b44e2175ae947eedc5817f5f5f853c6 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 27 Nov 2023 16:55:43 -0500 Subject: [PATCH 137/156] docs: reorg plugins installation tabs In order to better document packer plugins installation methods, and since `packer plugins install' is not really manual, we split in two sections the "manual installation". As this is legacy, we stop documenting how to install single-component plugins, and reword the documentation for manually installing a plugin. --- .../content/docs/plugins/install-plugins.mdx | 80 +++++-------------- 1 file changed, 19 insertions(+), 61 deletions(-) diff --git a/website/content/docs/plugins/install-plugins.mdx b/website/content/docs/plugins/install-plugins.mdx index 0460e6c561c..c885d53665c 100644 --- a/website/content/docs/plugins/install-plugins.mdx +++ b/website/content/docs/plugins/install-plugins.mdx @@ -19,12 +19,8 @@ This page explains how to install custom external plugins. Refer to [External Pl ## Installation Guides -Choose the tab that corresponds to the type of plugin you want to install. If you are not sure, check the plugin's name. -- Multi-component plugin names have the prefix `packer-plugin-`. -- Single-component plugin names have a prefix containing the component type, like `packer-provisioner-` or `packer-builder`. - - + -> **Note:** Only _multi-component plugin binaries_ -- plugins named packer-plugin-\*, like the `packer-plugin-amazon` -- are expected to work with @@ -198,72 +194,34 @@ Packer will error if you set the `packer-plugin-` prefix in a `source`. This will avoid conflicting with other plugins for other tools, like Terraform. - - --> The [`packer plugins`](/packer/docs/commands/plugins), available from Packer v1.8.0, command allows -you to install plugins without going through `init`. + -```shell -packer plugins install github.com/hashicorp/vagrant -``` - -## Plugin Installation Workflow Plugin installation via `packer plugins install` works similar to that of the `packer init` command, with the following exceptions no `required_plugins` block required and can be used with both legacy JSON and HCL2 templates. -* [`packer plugins install`](/packer/docs/commands/plugins) will install plugins in the **last** directory -in the following numbered list. - -1. `PACKER_PLUGINS_PATH` if set will be the sole location for installing plugins. All other -plugin directories will be ignored. -1. `PACKER_CONFIG_DIR`\plugins on Windows systems, or `PACKER_CONFIG_DIR`/plugins on all other systems. - - -For manual installation of plugin binaries, without the `packer plugins` command, please continue reading. +-> The [`packer plugins`](/packer/docs/commands/plugins), available from Packer v1.8.0, command allows +you to install plugins without going through `init`. -The easiest way to manually install a plugin is to name it correctly, then place -it in the proper directory. To name a plugin correctly, make sure the binary is -named `packer-plugin-NAME`. For example, `packer-plugin-amazon` for a "plugin" -binary named "amazon". This binary will make one or more components available to -use. Valid types for plugins are down this page. - -The valid types for plugins are: - -- `plugin` - A plugin binary that can contain one or more of each Packer component - type. - -- `builder` - Plugins responsible for building images for a specific - platform. - -- `post-processor` - A post-processor responsible for taking an artifact from - a builder and turning it into something else. - -- `provisioner` - A provisioner to install software on images created by a - builder. +```shell +packer plugins install github.com/hashicorp/vagrant +``` +The command will install the plugin in the `PACKER_CONFIG_DIR` set, or its +default location, which depends on the OS/environment, as documented in +[Configuring Packer](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory). - - -The easiest way to manually install a plugin is to name it correctly, then place -it in the proper directory. To name a plugin correctly, make sure the binary is -named `packer-COMPONENT-NAME`. For example, `packer-provisioner-comment` for a "plugin" -binary named "comment". This binary will make a single provisioner named `comment` available to -use. Valid types for plugins are down this page. - -The valid types for plugins are: - -- `plugin` - A plugin binary that can contain one or more of each Packer component - type. - -- `builder` - Plugins responsible for building images for a specific - platform. + -- `post-processor` - A post-processor responsible for taking an artifact from - a builder and turning it into something else. +If you have obtained or built a plugin binary for your OS/Architecture and want to +use it with Packer, you can install it manually. For Packer to load the plugin, +it must be named with the convention `packer-plugin-NAME`, and placed in Packer's plugin +directory, as documented in +[Configuring Packer](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory). -- `provisioner` - A provisioner to install software on images created by a - builder. +For example, if your configuration directory is located in `~/.config/packer`, +you can copy the binary to `~/.config/plugins/packer-plugin-NAME`, and +Packer will be able to load it afterwards. From 35d20c25b92ddb6fc0ba04c78625f10cb0b2168e Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 28 Nov 2023 10:49:17 -0500 Subject: [PATCH 138/156] docs: rm implicit github urls from install guide This section is redundant with the explanations given above, and can therefore be removed from the docs. --- .../content/docs/plugins/install-plugins.mdx | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/website/content/docs/plugins/install-plugins.mdx b/website/content/docs/plugins/install-plugins.mdx index c885d53665c..fad795bbb59 100644 --- a/website/content/docs/plugins/install-plugins.mdx +++ b/website/content/docs/plugins/install-plugins.mdx @@ -149,8 +149,8 @@ various outputs, like error messages. * [`packer init`](/packer/docs/commands/init) will install plugins in the **last** directory in the following numbered list. -1. `PACKER_PLUGIN_PATH` if set will be the sole location for installing plugins. All other -plugin directories will be ignored. +1. `PACKER_PLUGIN_PATH` if set will be the sole location for installing plugins. All other +plugin directories will be ignored. 1. `PACKER_CONFIG_DIR`\plugins on Windows systems, or `PACKER_CONFIG_DIR`/plugins on all other systems. * During the initialization of Packer, any plugin required in the @@ -173,26 +173,6 @@ The SHA256SUM file will be automatically generated when a plugin is installed vi was installed manually into `PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/` then the file `PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64_SHA256SUM` must be generated manually as well. -## Implicit Github urls - -Using the following example : - -```hcl - required_plugins { - happycloud = { - version = ">= 2.7.0" - source = "github.com/azr/happycloud" - } - } -``` - -The plugin getter will look for plugins located at: - -- github.com/azr/packer-plugin-happycloud - -Packer will error if you set the `packer-plugin-` prefix in a `source`. This -will avoid conflicting with other plugins for other tools, like Terraform. - From 24430e27be03f7fe4d7a52b3a98861e1d17a8fe9 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 29 Nov 2023 09:55:58 -0500 Subject: [PATCH 139/156] docs: reorganise plugin installation docs The current documentation about installing plugins does not explain (outside of the `packer init' section) how Packer discovers plugins, what the expected file system hierarchy should be, and the quirk of how this takes precedence over the rest when `required_plugins' is specified. This commit addresses that by reorganising the page to highlight general usage questions on sources and plugins, and simplifies the tabs below to only highlight installation methods. --- .../content/docs/plugins/install-plugins.mdx | 202 ++++++++++-------- 1 file changed, 113 insertions(+), 89 deletions(-) diff --git a/website/content/docs/plugins/install-plugins.mdx b/website/content/docs/plugins/install-plugins.mdx index fad795bbb59..1c2b602823f 100644 --- a/website/content/docs/plugins/install-plugins.mdx +++ b/website/content/docs/plugins/install-plugins.mdx @@ -8,34 +8,113 @@ page_title: Install Plugins Packer plugins are separate, standalone applications that perform tasks during each build. -You do not need to install the builder, provisioner, or -post-processor components that ship with the Packer binary. Packer automatically knows how to find and launch these built-in plugins. +You do not need to install the components that ship with the Packer binary. +Packer automatically knows how to find and launch these built-in plugins. This page explains how to install custom external plugins. Refer to [External Plugins](/packer/plugins) for a list of available plugins and their documentation. -## Plugin Loading Order +Depending on the template type you're using (HCL2 or legacy JSON), the methods for installing plugins may differ. -@include "plugins/plugin-location.mdx" +If you're using HCL2, `packer init` is recommended as you can install all your requirements with one +command, and those requirements are explicitly documented in the template. + +`packer plugins install` is also used to automate the installation from a source, and will need to +be repeated for as many plugins as you need. +We recommend this for JSON as the template cannot contain the information about the required plugins. + +Finally, you can manually install any plugin. This is mostly useful if you're in an environment with +restricted internet access, or if you're installing non-final versions of plugins. + +Refer to the [Installation Guides](#installation-guides) section of this page for information about +each, including usage examples. + +The remainder of this document will serve as documentation on how Packer interacts with plugins. +We encourage you to read this to get familiar with this process, as it will help you troubleshoot +your builds if you encounter problems with that. + +## Source Addresses + +A plugin's source address is its global identifier. It also tells Packer where +to download it. + +Source addresses consist of three parts delimited by slashes (`/`), as +follows: + +`//` + +- **Hostname:** The hostname of the location/service that + distributes the plugin. Currently, the only valid "hostname" is github.com, + but we plan to eventually support plugins downloaded from other domains. + +- **Namespace:** An organizational namespace within the specified host. + This often is the organization that publishes the plugin. + +- **Type:** A short name for the platform or system the plugin manages. The + type is usually the plugin's preferred local name. + +For example, the fictional `myawesomecloud` plugin could belong to the +`hashicorp` namespace on `github.com`, so its `source` could be +`github.com/hashicorp/myawesomecloud`, + +-> Note: the actual _repository_ that myawesomecloud comes from must always have +the name format `github.com/hashicorp/packer-plugin-myawesomecloud`, but the +`required_plugins` block omits the redundant `packer-plugin-` repository prefix +for brevity. + +The source address with all three components given explicitly is called the +plugin's _fully-qualified address_. You will see fully-qualified address in +various outputs, like error messages. + +## Plugin Loading Workflow + +At initialization, Packer attempts to discover the plugins installed locally. The +logic follows what's described in Configuring Packer's +[plugin directory](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory) +section. + +While Packer is not verbose during this step, you can peek into what it is discovering +with `PACKER_LOG=1` enabled, where you can find log lines similar to the following: + +```shell +[TRACE] discovering plugins in [...] +[INFO] Discovered potential plugin: [...] +``` + +This logic however is ignored when plugins are defined in `required_plugins` blocks; +instead, for every plugin required in this way, Packer will only consider them if they're +installed in Packer's plugin directory, under a directory hierarchy that matches the +source, with the plugin name respecting a convention. + +For example, if we install the `github.com/hashicorp/amazon` plugin in version 1.2.8 through +either `packer init` or `packer plugins install`, this will yield the following (in a +Linux x86_64 environment): + +```shell + +└── github.com + └── hashicorp + └── amazon + ├── packer-plugin-amazon_v1.2.8_x5.0_linux_amd64 + └── packer-plugin-amazon_v1.2.8_x5.0_linux_amd64_SHA256SUM +``` + +Both the plugin's binary, and the related SHA256SUM file must be placed alongside +each other for Packer to consider them for a `required_plugins` constraint. ## Installation Guides --> **Note:** Only _multi-component plugin binaries_ -- plugins named -packer-plugin-\*, like the `packer-plugin-amazon` -- are expected to work with -Packer init. The legacy `builder`, `post-processor` and `provisioner` plugin -types will continue to be detected but Packer cannot install them automatically. -If a plugin you use has not been upgraded to use the multi-component plugin -architecture, contact your maintainer to request an upgrade. +In order to use `packer init` for managing installation of your plugins, there are +two steps required. -## Create a required_plugins block +First, add a [`required_plugins`](/packer/docs/templates/hcl_templates/blocks/packer#specifying-plugin-requirements) +block to your [packer block](/packer/docs/templates/hcl_templates/blocks/packer). -1. Add a - [`required_plugins`](/packer/docs/templates/hcl_templates/blocks/packer#specifying-plugin-requirements) - block to your [packer block](/packer/docs/templates/hcl_templates/blocks/packer). Each block will tell Packer what version(s) of a - particular plugin can be installed. Make sure to set a valid [version - constraint string](/packer/docs/templates/hcl_templates/blocks/packer#version-constraints). +Each block will tell Packer what version(s) of a particular plugin can be installed. +Make sure to set a valid +[version constraint string](/packer/docs/templates/hcl_templates/blocks/packer#version-constraints). Here is an example `required_plugins` block: @@ -54,17 +133,18 @@ packer { } ``` -2. Run [`packer init`](/packer/docs/commands/init) from your project directory (the - directory containing your Packer templates) to install all missing plugin - binaries. Given the above example, Packer will try to look for a GitHub - repository owned by user or organization `azr` named - `packer-plugin-myawesomecloud` and `packer-plugin-happycloud`. +Once your template contains those `required_plugins`, run +[`packer init`](/packer/docs/commands/init) to install all missing plugin +binaries. +Given the above example, Packer will try to look for a GitHub +repository owned by user or organization `azr` named +`packer-plugin-myawesomecloud` and `packer-plugin-happycloud`. ## Names and Addresses Each plugin has two identifiers: -- A `source` address, which is necessary when requiring a plugin not bundled with the Packer binary. +- A `source` address, which is where the plugin is downloaded from. - A unique **local name**, which is used everywhere else in a Packer configuration. ## Local Names @@ -111,81 +191,21 @@ source "foo-ebs" "example" { } ``` -## Source Addresses - -A plugin's source address is its global identifier. It also tells Packer where -to download it. - -Source addresses consist of three parts delimited by slashes (`/`), as -follows: - -`//` - -- **Hostname:** The hostname of the location/service that - distributes the plugin. Currently, the only valid "hostname" is github.com, - but we plan to eventually support plugins downloaded from other domains. - -- **Namespace:** An organizational namespace within the specified host. - This often is the organization that publishes the plugin. - -- **Type:** A short name for the platform or system the plugin manages. The - type is usually the plugin's preferred local name. - -For example, the fictional `myawesomecloud` plugin could belong to the -`hashicorp` namespace on `github.com`, so its `source` could be -`github.com/hashicorp/myawesomecloud`, - --> Note: the actual _repository_ that myawesomecloud comes from must always have -the name format `github.com/hashicorp/packer-plugin-myawesomecloud`, but the -`required_plugins` block omits the redundant `packer-plugin-` repository prefix -for brevity. - -The source address with all three components given explicitly is called the -plugin's _fully-qualified address_. You will see fully-qualified address in -various outputs, like error messages. - -## Plugin Installation Workflow - -* [`packer init`](/packer/docs/commands/init) will install plugins in the **last** directory -in the following numbered list. - -1. `PACKER_PLUGIN_PATH` if set will be the sole location for installing plugins. All other -plugin directories will be ignored. -1. `PACKER_CONFIG_DIR`\plugins on Windows systems, or `PACKER_CONFIG_DIR`/plugins on all other systems. - -* During the initialization of Packer, any plugin required in the -**`required_plugins`** section will be looked up in all entries of the following -list. **First** plugin found takes precedence. Two binaries of the same plugin -with two different version will be considered as two different plugins. Highest -found version matching `required_plugins` will be taken into consideration. - -During initialization, on a `darwin_amd64` system, Packer will look-up for the -following files: - -* `PACKER_PLUGIN_PATH/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` -* `PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` - -The first plugin-name/version files found will take precedence. - -For plugins located under the `github.com/azr/happycloud/` directory structure an accompanying SHA256SUM file -will be required in order for `packer init` to ensure the plugin being loaded has not been tampered with. -The SHA256SUM file will be automatically generated when a plugin is installed via `packer init` if the plugin -was installed manually into `PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/` then the file -`PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64_SHA256SUM` must be generated manually as well. - -Plugin installation via `packer plugins install` works similar to that of the `packer init` command, with the following -exceptions no `required_plugins` block required and can be used with both legacy JSON and HCL2 templates. - --> The [`packer plugins`](/packer/docs/commands/plugins), available from Packer v1.8.0, command allows -you to install plugins without going through `init`. +Plugin installation via `packer plugins install` works similar to that of the `packer init` command, but +no `required_plugins` block are required, and thus can be used with both legacy JSON and HCL2 templates. ```shell packer plugins install github.com/hashicorp/vagrant ``` +-> You can only install one plugin per invocation of the command. If you need to install + a specific version of a plugin, you can specify a version to install as an optional + argument to the command line. + e.g.: `packer plugins install "github.com/hashicorp/vagrant" "v1.0.1"` + The command will install the plugin in the `PACKER_CONFIG_DIR` set, or its default location, which depends on the OS/environment, as documented in [Configuring Packer](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory). @@ -203,5 +223,9 @@ For example, if your configuration directory is located in `~/.config/packer`, you can copy the binary to `~/.config/plugins/packer-plugin-NAME`, and Packer will be able to load it afterwards. +If you have a `required_plugins` for the plugin you're manually installing, make sure +it respects the constraints described in the [Plugin loading workflow](#plugin-loading-workflow) +section, otherwise Packer will not be able to load it. + From 327d8a4f73ad9f17c7ecceb63a94ebdf8367dbd3 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 4 Dec 2023 13:05:02 -0500 Subject: [PATCH 140/156] Update CHANGELOG for upcoming releases --- CHANGELOG.md | 79 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 447935f4a91..30979d0f987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,64 +1,93 @@ ## 1.10.0 (Upcoming) ### NOTES: -This release contains breaking changes for those users who may be relying on plugins previously bundled into Packer. -As specified in the [Bundled Plugins Removal announcement](https://www.hashicorp.com/blog/announcing-the-removal-of-bundled-plugins-in-hashicorp-packer) HashiCorp maintained plugins -will no longer be shipped with Packer. Users are encouraged to use `packer init` or `packer plugins [...]` for managing required plugins needed for executing their -builds. [GH-12660](https://github.com/hashicorp/packer/pull/12660) +This release contains breaking changes for practitioner relying on plugins + previously bundled into Packer. As specified in the [Bundled Plugins Removal announcement](https://www.hashicorp.com/blog/announcing-the-removal-of-bundled-plugins-in-hashicorp-packer) + HashiCorp maintained plugins will no longer be shipped with Packer. + Users are encouraged to use `packer init` or `packer plugins [...]` when managing required plugins + needed for executing their builds. + [GH-12660](https://github.com/hashicorp/packer/pull/12660) The affected plugins include: -* packer-plugin-amazon -* packer-plugin-ansible -* packer-plugin-azure -* packer-plugin-docker -* packer-plugin-googlcompute -* packer-plugin-qemu -* packer-plugin-vagrant -* packer-plugin-virtualbox -* packer-plugin-vmware -* packer-plugin-vsphere +* [packer-plugin-amazon](https://github.com/hashicorp/packer-plugin-amazon) +* [packer-plugin-ansible](https://github.com/hashicorp/packer-plugin-ansible) +* [packer-plugin-azure](https://github.com/hashicorp/packer-plugin-azure) +* [packer-plugin-docker](https://github.com/hashicorp/packer-plugin-docker) +* [packer-plugin-googlecompute](https://github.com/hashicorp/packer-plugin-googlecompute) +* [packer-plugin-qemu](https://github.com/hashicorp/packer-plugin-qemu) +* [packer-plugin-vagrant](https://github.com/hashicorp/packer-plugin-vagrant) +* [packer-plugin-virtualbox](https://github.com/hashicorp/packer-plugin-virtualbox) +* [packer-plugin-vmware](https://github.com/hashicorp/packer-plugin-vmware) +* [packer-plugin-vsphere](https://github.com/hashicorp/packer-plugin-vsphere) ### SECURITY: +* Bump github.com/go-jose/go-jose/v3 to address GO-2023-2334. There have been + no reported issues with Packer but we are bumping given that it is a + secondary + dependency. [GH-12723](https://github.com/hashicorp/packer/pull/12723) +* Bump Go to 1.20.10 to Address CVE-2023-44487 / CVE-2023-39325. + [GH-12661](https://github.com/hashicorp/packer/pull/12661) * Bump Go to 1.20.11 CVE-2023-45283. There have been no reported issues with Packer but we are bumping given its usage of the path/filepath pkg. [GH-12690](https://github.com/hashicorp/packer/pull/12690) -* Bump Go to 1.20.10 to Address CVE-2023-44487 / CVE-2023-39325. - [GH-12661](https://github.com/hashicorp/packer/pull/12661) +* Bump Packer Plugin SDK to v0.5.2. + [GH-12717](https://github.com/hashicorp/packer/pull/12717) ### PLUGINS: * Removed all HashiCorp vendored plugins from being bundled into the Packer binary. -[GH-12660](https://github.com/hashicorp/packer/pull/12660) +[GH-12660](https://github.com/hashicorp/packer/pull/12660), [GH-12720](https://github.com/hashicorp/packer/pull/12720) * packer-plugin-hcloud: The Hetzner Cloud plugin has been handed over to the Hetzner integrations team. New releases for this plugin are available at https://github.com/hetznercloud/packer-plugin-hcloud. Existing references to the plugin will continue to work but users are advised to update the `required_plugins` block to use the new plugin source address. ``` - required_plugins { + required_plugins { parallels = { source = "github.com/hetznercloud/hcloud" version = "~> 1" - } + } } ``` - ### IMPROVEMENTS: -* cmd/init: warn users running `packer init` on configuration templates with a +* cmd/init: Warn users running `packer init` on configuration templates with a missing `required_plugins` blocks. [GH-12638](https://github.com/hashicorp/packer/pull/12638) -* cmd/plugins: install SHA256SUM file with 0644 perms. +* cmd/plugins: Install SHA256SUM file with 0644 perms. [GH-12665](https://github.com/hashicorp/packer/pull/12665) -* cmd/plugins: remove SHA256SUM file on plugin removal. +* cmd/plugins: Remove SHA256SUM file on plugin removal. [GH-12666](https://github.com/hashicorp/packer/pull/12666) -* cmd/plugins: remove will error if it fails to find the plugin being selected +* cmd/plugins: Remove will error if it fails to find the plugin being selected for removal. [GH-12669](https://github.com/hashicorp/packer/pull/12669) -* core/hcl: rework to remove the recursive execution of data sources with other +* core/hcl2: Remove empty source file reference on unset variable errors. + [GH-12712](https://github.com/hashicorp/packer/pull/12712) +* core/hcl: Improve the recursive execution of data sources with other data source dependencies. [GH-12608](https://github.com/hashicorp/packer/pull/12608) +* core: Bump github.com/hashicorp/hcp-sdk-go from 0.73.0 to 0.74.0 - + [GH-12704](https://github.com/hashicorp/packer/pull/12704) +* core: Bump Packer Plugin SDK to v0.5.2. + [GH-12717](https://github.com/hashicorp/packer/pull/12717) +* core: Provide integration link as hint in error message if a plugin component + is unknown. [GH-12705](https://github.com/hashicorp/packer/pull/12705) * core: Update version output for `packer -v` and `packer --version` to match `packer version`. [GH-12569](https://github.com/hashicorp/packer/pull/12569) +* docs: Update plugin installation guides with supported methods for 1.10.0 and + above. [GH-12713](https://github.com/hashicorp/packer/pull/12713) + +## 1.9.5 (December 4, 2023) + +### SECURITY + +* Bump github.com/go-jose/go-jose/v3 to address GO-2023-2334. + [GH-12723](https://github.com/hashicorp/packer/pull/12723) + +### BUG FIXES: + +* Add VirtualBox as known plugin prefix to prevent endless bundled plugin warning. + [GH-12719](https://github.com/hashicorp/packer/pull/12719) ## 1.9.4 (August 18, 2023) From 6f43a82e024e8835975beb21fa848a375907ba08 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 3 Oct 2023 11:52:48 -0400 Subject: [PATCH 141/156] command: add packer plugins install path flag This new flag allows the `packer plugins install' command to install a plugin from a local binary rather than from Github. This command will only call `describe' on the plugin, and won't do any further checks for functionality. The SHA256SUM will be directly computed from the binary, so as with anything manual and potentially sourced by the community, extra care should be applied when invoking this. --- command/plugins_install.go | 237 ++++++++++++++++++++++++++++++-- command/plugins_install_test.go | 5 +- 2 files changed, 231 insertions(+), 11 deletions(-) diff --git a/command/plugins_install.go b/command/plugins_install.go index 3037c0959d0..e584ea778de 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -6,18 +6,24 @@ package command import ( "context" "crypto/sha256" + "encoding/json" + "flag" "fmt" + "io" + "os" + "os/exec" "runtime" "strings" "github.com/hashicorp/go-version" + "github.com/hashicorp/hcl/v2" + "github.com/hashicorp/packer-plugin-sdk/plugin" pluginsdk "github.com/hashicorp/packer-plugin-sdk/plugin" "github.com/hashicorp/packer/hcl2template/addrs" "github.com/hashicorp/packer/packer" plugingetter "github.com/hashicorp/packer/packer/plugin-getter" "github.com/hashicorp/packer/packer/plugin-getter/github" pkrversion "github.com/hashicorp/packer/version" - "github.com/mitchellh/cli" ) type PluginsInstallCommand struct { @@ -30,7 +36,7 @@ func (c *PluginsInstallCommand) Synopsis() string { func (c *PluginsInstallCommand) Help() string { helpText := ` -Usage: packer plugins install [] +Usage: packer plugins install [OPTIONS...] [] This command will install the most recent compatible Packer plugin matching version constraint. @@ -38,6 +44,12 @@ Usage: packer plugins install [] installed. Ex: packer plugins install github.com/hashicorp/happycloud v1.2.3 + +Options: + - path : install the plugin from a locally-sourced plugin binary. This + installs the plugin where a normal invocation would, but will + not try to download it from a web server, but instead directly + install the binary for Packer to be able to load it later on. ` return strings.TrimSpace(helpText) @@ -47,14 +59,55 @@ func (c *PluginsInstallCommand) Run(args []string) int { ctx, cleanup := handleTermInterrupt(c.Ui) defer cleanup() - return c.RunContext(ctx, args) + cmdArgs, ret := c.ParseArgs(args) + if ret != 0 { + return ret + } + + return c.RunContext(ctx, cmdArgs) +} + +type PluginsInstallArgs struct { + MetaArgs + PluginName string + PluginPath string + Version string +} + +func (pa *PluginsInstallArgs) AddFlagSets(flags *flag.FlagSet) { + flags.StringVar(&pa.PluginPath, "path", "", "install the plugin from a specific path") + pa.MetaArgs.AddFlagSets(flags) } -func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args []string) int { +func (c *PluginsInstallCommand) ParseArgs(args []string) (*PluginsInstallArgs, int) { + pa := &PluginsInstallArgs{} + + flags := c.Meta.FlagSet("plugins install") + flags.Usage = func() { c.Ui.Say(c.Help()) } + pa.AddFlagSets(flags) + err := flags.Parse(args) + if err != nil { + c.Ui.Error(fmt.Sprintf("Failed to parse options: %s", err)) + return pa, 1 + } + + args = flags.Args() if len(args) < 1 || len(args) > 2 { - return cli.RunResultHelp + c.Ui.Error(fmt.Sprintf("Invalid arguments, expected either 1 or 2 positional arguments, got %d", len(args))) + flags.Usage() + return pa, 1 + } + + if len(args) == 2 { + pa.Version = args[1] } + pa.PluginName = args[0] + + return pa, 0 +} + +func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *PluginsInstallArgs) int { opts := plugingetter.ListInstallationsOptions{ FromFolders: c.Meta.CoreConfig.Components.PluginConfig.KnownPluginFolders, BinaryInstallationOptions: plugingetter.BinaryInstallationOptions{ @@ -68,19 +121,25 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args []stri }, } - plugin, diags := addrs.ParsePluginSourceString(args[0]) + plugin, diags := addrs.ParsePluginSourceString(args.PluginName) if diags.HasErrors() { c.Ui.Error(diags.Error()) return 1 } + // If we did specify a binary to install the plugin from, we ignore + // the Github-based getter in favour of installing it directly. + if args.PluginPath != "" { + return c.InstallFromBinary(args) + } + // a plugin requirement that matches them all pluginRequirement := plugingetter.Requirement{ Identifier: plugin, } - if len(args) > 1 { - constraints, err := version.NewConstraint(args[1]) + if args.Version != "" { + constraints, err := version.NewConstraint(args.Version) if err != nil { c.Ui.Error(err.Error()) return 1 @@ -128,3 +187,165 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args []stri return 0 } + +func (c *PluginsInstallCommand) InstallFromBinary(args *PluginsInstallArgs) int { + pluginDirs := c.Meta.CoreConfig.Components.PluginConfig.KnownPluginFolders + + if len(pluginDirs) == 0 { + c.Ui.Say(`Error: cannot find a place to install the plugin to + +In order to install the plugin for later use, Packer needs to know where to +install them. + +This can be specified through the PACKER_CONFIG_DIR environment variable, +but should be automatically inferred by Packer. + +If you see this message, this is likely a Packer bug, please consider opening +an issue on our Github repo to signal it.`) + } + + pluginSlugParts := strings.Split(args.PluginName, "/") + if len(pluginSlugParts) != 3 { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Invalid plugin name specifier", + Detail: fmt.Sprintf("The plugin name specified provided (%q) does not conform to the mandated format of //.", args.PluginName), + }}) + } + + // As with the other commands, we get the last plugin directory as it + // has precedence over the others, and is where we'll install the + // plugins to. + pluginDir := pluginDirs[len(pluginDirs)-1] + + s, err := os.Stat(args.PluginPath) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Unable to find plugin to promote", + Detail: fmt.Sprintf("The plugin %q failed to be opened because of an error: %s", args.PluginName, err), + }}) + } + + if s.IsDir() { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Plugin to promote cannot be a directory", + Detail: "The packer plugin promote command can only install binaries, not directories", + }}) + } + + describeCmd, err := exec.Command(args.PluginPath, "describe").Output() + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to describe the plugin", + Detail: fmt.Sprintf("Packer failed to run %s describe: %s", args.PluginPath, err), + }}) + } + var desc plugin.SetDescription + if err := json.Unmarshal(describeCmd, &desc); err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to decode plugin describe info", + Detail: fmt.Sprintf("'%s describe' produced information that Packer couldn't decode: %s", args.PluginPath, err), + }}) + } + + // Let's override the plugin's version if we specify it in the options + // of the command + if args.Version != "" { + desc.Version = args.Version + } + + pluginBinary, err := os.Open(args.PluginPath) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to open plugin binary", + Detail: fmt.Sprintf("Failed to open plugin binary from %q: %s", args.PluginPath, err), + }}) + } + defer pluginBinary.Close() + + // We'll install the SHA256SUM file alongside the plugin, based on the + // contents of the plugin being passed. + // + // This will make our loaders happy as they require a valid checksum + // for loading plugins installed this way. + shasum := sha256.New() + _, err = io.Copy(shasum, pluginBinary) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to read plugin binary's contents", + Detail: fmt.Sprintf("Failed to read plugin binary from %q: %s", args.PluginPath, err), + }}) + } + + // At this point, we know the provided binary behaves correctly with + // describe, so it's very likely to be a plugin, let's install it. + installDir := fmt.Sprintf("%s/%s", pluginDir, args.PluginName) + err = os.MkdirAll(installDir, 0755) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to create output directory", + Detail: fmt.Sprintf("The installation directory %q failed to be created because of an error: %s", installDir, err), + }}) + } + + binaryPath := fmt.Sprintf( + "%s/packer-plugin-%s_v%s_%s_%s_%s", + installDir, + pluginSlugParts[2], + desc.Version, + desc.APIVersion, + runtime.GOOS, + runtime.GOARCH, + ) + outputPlugin, err := os.OpenFile(binaryPath, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0755) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to create plugin binary", + Detail: fmt.Sprintf("Failed to create plugin binary at %q: %s", binaryPath, err), + }}) + } + defer outputPlugin.Close() + + _, err = pluginBinary.Seek(0, 0) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to reset plugin's reader", + Detail: fmt.Sprintf("Failed to seek offset 0 while attempting to reset the buffer for the plugin to install: %s", err), + }}) + } + + _, err = io.Copy(outputPlugin, pluginBinary) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to copy plugin binary's contents", + Detail: fmt.Sprintf("Failed to copy plugin binary from %q to %q: %s", args.PluginPath, binaryPath, err), + }}) + } + + shasumPath := fmt.Sprintf("%s_SHA256SUM", binaryPath) + shaFile, err := os.OpenFile(shasumPath, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0644) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Failed to create plugin SHA256SUM file", + Detail: fmt.Sprintf("Failed to create SHA256SUM file at %q: %s", shasumPath, err), + }}) + } + defer shaFile.Close() + + fmt.Fprintf(shaFile, "%x", shasum.Sum([]byte{})) + + c.Ui.Say(fmt.Sprintf("Successfully installed plugin %s from %s to %s", args.PluginName, args.PluginPath, binaryPath)) + + return 0 +} diff --git a/command/plugins_install_test.go b/command/plugins_install_test.go index 105b9b00067..5461360c36e 100644 --- a/command/plugins_install_test.go +++ b/command/plugins_install_test.go @@ -13,7 +13,6 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/mitchellh/cli" "golang.org/x/mod/sumdb/dirhash" ) @@ -109,7 +108,7 @@ func TestPluginsInstallCommand_Run(t *testing.T) { expectedPackerConfigDirHashBeforeInstall: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", packerConfigDir: cfg.dir("4_pkr_plugins_config"), pluginSourceArgs: []string{"github.com/sylviamoss/comment", "v0.2.18", "github.com/sylviamoss/comment", "v0.2.19"}, - want: cli.RunResultHelp, + want: 1, dirFiles: nil, expectedPackerConfigDirHashAfterInstall: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", }, @@ -120,7 +119,7 @@ func TestPluginsInstallCommand_Run(t *testing.T) { expectedPackerConfigDirHashBeforeInstall: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", packerConfigDir: cfg.dir("5_pkr_plugins_config"), pluginSourceArgs: []string{}, - want: cli.RunResultHelp, + want: 1, dirFiles: nil, expectedPackerConfigDirHashAfterInstall: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", }, From a2d9c9dce4a70e7361ade0c4717b48423b686008 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 25 Oct 2023 11:56:30 -0400 Subject: [PATCH 142/156] command: add --force option to init/install The --force option for packer init and packer plugins install enforces installation of a plugin, even if it is already locally installed. This will become useful if for some reason a pre-existing plugin binary/version is already installed, and we want to overwrite it. --- command/cli.go | 2 ++ command/init.go | 14 +++++++++++--- command/plugins_install.go | 4 ++++ packer/plugin-getter/plugins.go | 5 ++++- packer/plugin-getter/plugins_test.go | 8 ++++++++ 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/command/cli.go b/command/cli.go index 4ad80440f0e..2dfc57dbd0d 100644 --- a/command/cli.go +++ b/command/cli.go @@ -104,6 +104,7 @@ type BuildArgs struct { func (ia *InitArgs) AddFlagSets(flags *flag.FlagSet) { flags.BoolVar(&ia.Upgrade, "upgrade", false, "upgrade any present plugin to the highest allowed version.") + flags.BoolVar(&ia.Force, "force", false, "force installation of a plugin, even if already installed") ia.MetaArgs.AddFlagSets(flags) } @@ -112,6 +113,7 @@ func (ia *InitArgs) AddFlagSets(flags *flag.FlagSet) { type InitArgs struct { MetaArgs Upgrade bool + Force bool } // PluginsRequiredArgs represents a parsed cli line for a `packer plugins required ` diff --git a/command/init.go b/command/init.go index 71332d57d25..2b8cdd7595a 100644 --- a/command/init.go +++ b/command/init.go @@ -11,6 +11,7 @@ import ( "runtime" "strings" + gversion "github.com/hashicorp/go-version" pluginsdk "github.com/hashicorp/packer-plugin-sdk/plugin" "github.com/hashicorp/packer/packer" plugingetter "github.com/hashicorp/packer/packer/plugin-getter" @@ -120,16 +121,21 @@ for more info.`) return 1 } - log.Printf("[TRACE] for plugin %s found %d matching installation(s)", pluginRequirement.Identifier, len(installs)) + if len(installs) > 0 { + if !cla.Force && !cla.Upgrade { + continue + } - if len(installs) > 0 && cla.Upgrade == false { - continue + if cla.Force && !cla.Upgrade { + pluginRequirement.VersionConstraints, _ = gversion.NewConstraint(fmt.Sprintf("=%s", installs[len(installs)-1].Version)) + } } newInstall, err := pluginRequirement.InstallLatest(plugingetter.InstallOptions{ InFolders: opts.FromFolders, BinaryInstallationOptions: opts.BinaryInstallationOptions, Getters: getters, + Force: cla.Force, }) if err != nil { c.Ui.Error(fmt.Sprintf("Failed getting the %q plugin:", pluginRequirement.Identifier)) @@ -163,6 +169,8 @@ Options: version, if there is a new higher one. Note that this still takes into consideration the version constraint of the config. + -force Forces installation of plugins, even if already + installed. ` return strings.TrimSpace(helpText) diff --git a/command/plugins_install.go b/command/plugins_install.go index e584ea778de..fbb2876cda5 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -50,6 +50,7 @@ Options: installs the plugin where a normal invocation would, but will not try to download it from a web server, but instead directly install the binary for Packer to be able to load it later on. + - force: forces installation of a plugin, even if it is already there. ` return strings.TrimSpace(helpText) @@ -72,10 +73,12 @@ type PluginsInstallArgs struct { PluginName string PluginPath string Version string + Force bool } func (pa *PluginsInstallArgs) AddFlagSets(flags *flag.FlagSet) { flags.StringVar(&pa.PluginPath, "path", "", "install the plugin from a specific path") + flags.BoolVar(&pa.Force, "force", false, "force installation of a plugin, even if already installed") pa.MetaArgs.AddFlagSets(flags) } @@ -168,6 +171,7 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi InFolders: opts.FromFolders, BinaryInstallationOptions: opts.BinaryInstallationOptions, Getters: getters, + Force: args.Force, }) if err != nil { diff --git a/packer/plugin-getter/plugins.go b/packer/plugin-getter/plugins.go index c9fbd0b9d97..29b34da1c04 100644 --- a/packer/plugin-getter/plugins.go +++ b/packer/plugin-getter/plugins.go @@ -244,6 +244,9 @@ type InstallOptions struct { // folder of this list. InFolders []string + // Forces installation of the plugin, even if already installed. + Force bool + BinaryInstallationOptions } @@ -582,7 +585,7 @@ func (pr *Requirement) InstallLatest(opts InstallOptions) (*Installation, error) log.Printf("[TRACE] found a pre-exising %q checksum file", potentialChecksumer.Type) // if outputFile is there and matches the checksum: do nothing more. - if err := localChecksum.ChecksumFile(localChecksum.Expected, potentialOutputFilename); err == nil { + if err := localChecksum.ChecksumFile(localChecksum.Expected, potentialOutputFilename); err == nil && !opts.Force { log.Printf("[INFO] %s v%s plugin is already correctly installed in %q", pr.Identifier, version, potentialOutputFilename) return nil, nil // success } diff --git a/packer/plugin-getter/plugins_test.go b/packer/plugin-getter/plugins_test.go index dfb28767067..513f2c4993b 100644 --- a/packer/plugin-getter/plugins_test.go +++ b/packer/plugin-getter/plugins_test.go @@ -349,6 +349,7 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, + false, BinaryInstallationOptions{ APIVersionMajor: "5", APIVersionMinor: "0", OS: "darwin", ARCH: "amd64", @@ -385,6 +386,7 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, + false, BinaryInstallationOptions{ APIVersionMajor: "5", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", @@ -430,6 +432,7 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, + false, BinaryInstallationOptions{ APIVersionMajor: "5", APIVersionMinor: "0", OS: "darwin", ARCH: "amd64", @@ -477,6 +480,7 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, + false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", @@ -527,6 +531,7 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, + false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", @@ -577,6 +582,7 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, + false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "linux", ARCH: "amd64", @@ -621,6 +627,7 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, + false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", @@ -662,6 +669,7 @@ func TestRequirement_InstallLatest(t *testing.T) { []string{ pluginFolderWrongChecksums, }, + false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", From ae5b91864c54a5e45304e7a0c25829221632854f Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 24 Nov 2023 10:56:01 -0500 Subject: [PATCH 143/156] command: reject version with --path for install To avoid plugins being installed with a specific version when a path is used for installing a plugin from a locally sourced plugin binary, we explicitly reject the combination of both a path and a version for plugins install. --- command/plugins_install.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/command/plugins_install.go b/command/plugins_install.go index fbb2876cda5..81b74cbd601 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -50,6 +50,7 @@ Options: installs the plugin where a normal invocation would, but will not try to download it from a web server, but instead directly install the binary for Packer to be able to load it later on. + This option cannot be specified with a version constraint. - force: forces installation of a plugin, even if it is already there. ` @@ -105,6 +106,12 @@ func (c *PluginsInstallCommand) ParseArgs(args []string) (*PluginsInstallArgs, i pa.Version = args[1] } + if pa.Path != "" && pa.Version != "" { + c.Ui.Error("Invalid arguments: a version cannot be specified with --path") + flags.Usage() + return pa, 1 + } + pa.PluginName = args[0] return pa, 0 @@ -256,12 +263,6 @@ an issue on our Github repo to signal it.`) }}) } - // Let's override the plugin's version if we specify it in the options - // of the command - if args.Version != "" { - desc.Version = args.Version - } - pluginBinary, err := os.Open(args.PluginPath) if err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ From e293f2d890b21fe130e4cdf53dd086778b914b55 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 24 Nov 2023 11:20:54 -0500 Subject: [PATCH 144/156] command: plugins install reject non-releases When installing a plugin with packer plugins install --path, we only accept release versions of a plugin, as otherwise the loading can be inconsistent if for example a user specifies a required_plugins block in their template, in which case the plugins will be ignored. Until we have a simpler loading scheme then, we will reject non-release versions of plugins to avoid confusion. --- command/plugins_install.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/command/plugins_install.go b/command/plugins_install.go index 81b74cbd601..f6d7b11086e 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -263,6 +263,14 @@ an issue on our Github repo to signal it.`) }}) } + if strings.Contains(desc.Version, "-") { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Invalid version", + Detail: fmt.Sprintf("Packer can only install plugin releases with this command (ex: 1.0.0), the binary's reported version is %q", desc.Version), + }}) + } + pluginBinary, err := os.Open(args.PluginPath) if err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ From 8e2a22e58391292f4af26c03c9bc147a9f588e74 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 1 Dec 2023 13:14:08 -0500 Subject: [PATCH 145/156] command: simplify local binary installation Read original binary into memory to fix case when installation destination and source were the same, resulting in an empty binary. --- command/plugins_install.go | 130 +++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 69 deletions(-) diff --git a/command/plugins_install.go b/command/plugins_install.go index f6d7b11086e..b467eee5f4d 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -4,6 +4,7 @@ package command import ( + "bytes" "context" "crypto/sha256" "encoding/json" @@ -12,6 +13,7 @@ import ( "io" "os" "os/exec" + "path/filepath" "runtime" "strings" @@ -44,12 +46,13 @@ Usage: packer plugins install [OPTIONS...] [] installed. Ex: packer plugins install github.com/hashicorp/happycloud v1.2.3 + packer plugins install --path ./packer-plugin-happycloud "github.com/hashicorp/happycloud" Options: - path : install the plugin from a locally-sourced plugin binary. This installs the plugin where a normal invocation would, but will - not try to download it from a web server, but instead directly - install the binary for Packer to be able to load it later on. + not try to download it from a remote location, and instead + install the binary in the Packer plugins path. This option cannot be specified with a version constraint. - force: forces installation of a plugin, even if it is already there. ` @@ -71,15 +74,15 @@ func (c *PluginsInstallCommand) Run(args []string) int { type PluginsInstallArgs struct { MetaArgs - PluginName string - PluginPath string - Version string - Force bool + PluginIdentifier string + PluginPath string + Version string + Force bool } func (pa *PluginsInstallArgs) AddFlagSets(flags *flag.FlagSet) { - flags.StringVar(&pa.PluginPath, "path", "", "install the plugin from a specific path") - flags.BoolVar(&pa.Force, "force", false, "force installation of a plugin, even if already installed") + flags.StringVar(&pa.PluginPath, "path", "", "install the binary specified by path as a Packer plugin.") + flags.BoolVar(&pa.Force, "force", false, "force installation of the specified plugin, even if already installed.") pa.MetaArgs.AddFlagSets(flags) } @@ -107,13 +110,12 @@ func (c *PluginsInstallCommand) ParseArgs(args []string) (*PluginsInstallArgs, i } if pa.Path != "" && pa.Version != "" { - c.Ui.Error("Invalid arguments: a version cannot be specified with --path") + c.Ui.Error("Invalid arguments: a version cannot be specified when using --path to install a local plugin binary") flags.Usage() return pa, 1 } - pa.PluginName = args[0] - + pa.PluginIdentifier = args[0] return pa, 0 } @@ -130,8 +132,11 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi }, }, } + if runtime.GOOS == "windows" { + opts.BinaryInstallationOptions.Ext = ".exe" + } - plugin, diags := addrs.ParsePluginSourceString(args.PluginName) + plugin, diags := addrs.ParsePluginSourceString(args.PluginIdentifier) if diags.HasErrors() { c.Ui.Error(diags.Error()) return 1 @@ -140,7 +145,7 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi // If we did specify a binary to install the plugin from, we ignore // the Github-based getter in favour of installing it directly. if args.PluginPath != "" { - return c.InstallFromBinary(args) + return c.InstallFromBinary(opts, plugin, args) } // a plugin requirement that matches them all @@ -157,10 +162,6 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi pluginRequirement.VersionConstraints = constraints } - if runtime.GOOS == "windows" && opts.Ext == "" { - opts.BinaryInstallationOptions.Ext = ".exe" - } - getters := []plugingetter.Getter{ &github.Getter{ // In the past some terraform plugins downloads were blocked from a @@ -199,42 +200,29 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi return 0 } -func (c *PluginsInstallCommand) InstallFromBinary(args *PluginsInstallArgs) int { - pluginDirs := c.Meta.CoreConfig.Components.PluginConfig.KnownPluginFolders - - if len(pluginDirs) == 0 { - c.Ui.Say(`Error: cannot find a place to install the plugin to - -In order to install the plugin for later use, Packer needs to know where to -install them. - -This can be specified through the PACKER_CONFIG_DIR environment variable, -but should be automatically inferred by Packer. +func (c *PluginsInstallCommand) InstallFromBinary(opts plugingetter.ListInstallationsOptions, pluginIdentifier *addrs.Plugin, args *PluginsInstallArgs) int { + // As with the other commands, we get the last plugin directory as it + // has precedence over the others, and is where we'll install the + // plugins to. + pluginDir := opts.FromFolders[len(opts.FromFolders)-1] -If you see this message, this is likely a Packer bug, please consider opening -an issue on our Github repo to signal it.`) - } + var err error - pluginSlugParts := strings.Split(args.PluginName, "/") - if len(pluginSlugParts) != 3 { + args.PluginPath, err = filepath.Abs(args.PluginPath) + if err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ Severity: hcl.DiagError, - Summary: "Invalid plugin name specifier", - Detail: fmt.Sprintf("The plugin name specified provided (%q) does not conform to the mandated format of //.", args.PluginName), + Summary: "Failed to transform path", + Detail: fmt.Sprintf("Failed to transform the given path to an absolute one: %s", err), }}) } - // As with the other commands, we get the last plugin directory as it - // has precedence over the others, and is where we'll install the - // plugins to. - pluginDir := pluginDirs[len(pluginDirs)-1] - s, err := os.Stat(args.PluginPath) if err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ Severity: hcl.DiagError, Summary: "Unable to find plugin to promote", - Detail: fmt.Sprintf("The plugin %q failed to be opened because of an error: %s", args.PluginName, err), + Detail: fmt.Sprintf("The plugin %q failed to be opened because of an error: %s", args.PluginIdentifier, err), }}) } @@ -254,6 +242,7 @@ an issue on our Github repo to signal it.`) Detail: fmt.Sprintf("Packer failed to run %s describe: %s", args.PluginPath, err), }}) } + var desc plugin.SetDescription if err := json.Unmarshal(describeCmd, &desc); err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ @@ -263,7 +252,15 @@ an issue on our Github repo to signal it.`) }}) } - if strings.Contains(desc.Version, "-") { + semver, err := version.NewSemver(desc.Version) + if err != nil { + return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Invalid version", + Detail: fmt.Sprintf("Plugin's reported version (%q) is not semver-compatible: %s", desc.Version, err), + }}) + } + if semver.Prerelease() != "" { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ Severity: hcl.DiagError, Summary: "Invalid version", @@ -279,15 +276,9 @@ an issue on our Github repo to signal it.`) Detail: fmt.Sprintf("Failed to open plugin binary from %q: %s", args.PluginPath, err), }}) } - defer pluginBinary.Close() - // We'll install the SHA256SUM file alongside the plugin, based on the - // contents of the plugin being passed. - // - // This will make our loaders happy as they require a valid checksum - // for loading plugins installed this way. - shasum := sha256.New() - _, err = io.Copy(shasum, pluginBinary) + pluginContents := bytes.Buffer{} + _, err = io.Copy(&pluginContents, pluginBinary) if err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ Severity: hcl.DiagError, @@ -295,10 +286,14 @@ an issue on our Github repo to signal it.`) Detail: fmt.Sprintf("Failed to read plugin binary from %q: %s", args.PluginPath, err), }}) } + _ = pluginBinary.Close() // At this point, we know the provided binary behaves correctly with // describe, so it's very likely to be a plugin, let's install it. - installDir := fmt.Sprintf("%s/%s", pluginDir, args.PluginName) + installDir := filepath.Join( + pluginDir, + filepath.Join(pluginIdentifier.Parts()...), + ) err = os.MkdirAll(installDir, 0755) if err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ @@ -308,15 +303,17 @@ an issue on our Github repo to signal it.`) }}) } - binaryPath := fmt.Sprintf( - "%s/packer-plugin-%s_v%s_%s_%s_%s", - installDir, - pluginSlugParts[2], + outputPrefix := fmt.Sprintf( + "packer-plugin-%s_v%s_%s", + pluginIdentifier.Type, desc.Version, desc.APIVersion, - runtime.GOOS, - runtime.GOARCH, ) + binaryPath := filepath.Join( + installDir, + outputPrefix+opts.BinaryInstallationOptions.FilenameSuffix(), + ) + outputPlugin, err := os.OpenFile(binaryPath, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0755) if err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ @@ -327,16 +324,7 @@ an issue on our Github repo to signal it.`) } defer outputPlugin.Close() - _, err = pluginBinary.Seek(0, 0) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to reset plugin's reader", - Detail: fmt.Sprintf("Failed to seek offset 0 while attempting to reset the buffer for the plugin to install: %s", err), - }}) - } - - _, err = io.Copy(outputPlugin, pluginBinary) + _, err = outputPlugin.Write(pluginContents.Bytes()) if err != nil { return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ Severity: hcl.DiagError, @@ -345,6 +333,11 @@ an issue on our Github repo to signal it.`) }}) } + // We'll install the SHA256SUM file alongside the plugin, based on the + // contents of the plugin being passed. + shasum := sha256.New() + _, _ = shasum.Write(pluginContents.Bytes()) + shasumPath := fmt.Sprintf("%s_SHA256SUM", binaryPath) shaFile, err := os.OpenFile(shasumPath, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0644) if err != nil { @@ -357,8 +350,7 @@ an issue on our Github repo to signal it.`) defer shaFile.Close() fmt.Fprintf(shaFile, "%x", shasum.Sum([]byte{})) - - c.Ui.Say(fmt.Sprintf("Successfully installed plugin %s from %s to %s", args.PluginName, args.PluginPath, binaryPath)) + c.Ui.Say(fmt.Sprintf("Successfully installed plugin %s from %s to %s", args.PluginIdentifier, args.PluginPath, binaryPath)) return 0 } From 97e2e9e637bd7025edc1a90c1df967ff42c7a319 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 4 Dec 2023 09:50:02 -0500 Subject: [PATCH 146/156] docs: add exerpt on packer plugins install --path --- command/init.go | 2 +- command/plugins_install.go | 2 +- website/content/docs/plugins/install-plugins.mdx | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/command/init.go b/command/init.go index 2b8cdd7595a..9e5b82f04ba 100644 --- a/command/init.go +++ b/command/init.go @@ -169,7 +169,7 @@ Options: version, if there is a new higher one. Note that this still takes into consideration the version constraint of the config. - -force Forces installation of plugins, even if already + -force Forces reinstallation of plugins, even if already installed. ` diff --git a/command/plugins_install.go b/command/plugins_install.go index b467eee5f4d..4d8434a2780 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -54,7 +54,7 @@ Options: not try to download it from a remote location, and instead install the binary in the Packer plugins path. This option cannot be specified with a version constraint. - - force: forces installation of a plugin, even if it is already there. + - force: forces reinstallation of plugins, even if already installed. ` return strings.TrimSpace(helpText) diff --git a/website/content/docs/plugins/install-plugins.mdx b/website/content/docs/plugins/install-plugins.mdx index 1c2b602823f..b2d97975216 100644 --- a/website/content/docs/plugins/install-plugins.mdx +++ b/website/content/docs/plugins/install-plugins.mdx @@ -227,5 +227,15 @@ If you have a `required_plugins` for the plugin you're manually installing, make it respects the constraints described in the [Plugin loading workflow](#plugin-loading-workflow) section, otherwise Packer will not be able to load it. +Starting with v1.10.0 of Packer, you can also use `packer plugins install` with the +`--path` flag to install a plugin from a binary, following the layout that is required to +work with `required_plugins` block. + +```shell +packer plugins install --path github.com/hashicorp/vagrant +``` + +-> packer plugins install --path only works with release versions of plugins. + From 91a16aa8e070a67e6c13f5aa25b19f8aaa28f229 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 5 Dec 2023 06:36:24 -0500 Subject: [PATCH 147/156] Remove migrated plugins from old plugin docs framework This change removes the following plugins from the old docs framework, as they have been fully migrated to the integrations framework. * ethanmdavidson/packer-plugin-git * linode/packer-plugin-linode * parallels/packer-plugin-parallels * ivoronin/packer-plugin-sshkey * cirruslabs/packer-plugin-tart --- website/data/plugins-manifest.json | 36 ------------------------------ 1 file changed, 36 deletions(-) diff --git a/website/data/plugins-manifest.json b/website/data/plugins-manifest.json index 5a3c0034ad6..525d5ede175 100644 --- a/website/data/plugins-manifest.json +++ b/website/data/plugins-manifest.json @@ -22,13 +22,6 @@ "version": "latest", "sourceBranch": "main" }, - { - "title": "Git", - "path": "git", - "repo": "ethanmdavidson/packer-plugin-git", - "version": "latest", - "sourceBranch": "main" - }, { "title": "Gridscale", "path": "gridscale", @@ -52,14 +45,6 @@ "pluginTier": "community", "version": "latest" }, - { - "title": "Linode", - "path": "linode", - "repo": "linode/packer-plugin-linode", - "pluginTier": "verified", - "version": "latest", - "isHcpPackerReady": true - }, { "title": "Libvirt", "path": "libvirt", @@ -90,13 +75,6 @@ "pluginTier": "verified", "isHcpPackerReady": true }, - { - "title": "Parallels", - "path": "parallels", - "repo": "parallels/packer-plugin-parallels", - "version": "latest", - "pluginTier": "verified" - }, { "title": "Scaleway", "path": "scaleway", @@ -104,20 +82,6 @@ "pluginTier": "verified", "version": "latest" }, - { - "title": "SSH Key", - "path": "sshkey", - "repo": "ivoronin/packer-plugin-sshkey", - "pluginTier": "community", - "version": "latest" - }, - { - "title": "Tart", - "path": "tart", - "repo": "cirruslabs/packer-plugin-tart", - "pluginTier": "community", - "version": "latest" - }, { "title": "UCloud", "path": "ucloud", From da97f46958d7bf51fd4d2f6427bc3d4f16edbbe5 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 4 Dec 2023 10:38:44 -0500 Subject: [PATCH 148/156] plugin-getter: don't rely only on version for list The plugins installed command list installed plugins, and prints out all their paths and versions. The results are listed in a list of unique versions, in ascending order. When listing plugins outside of a specific identifier however, because of the insertion in the list works, we only consider the version number, and ignore all subsequent insertions with the same version. This causes a problem when we have multiple plugins installed with the same version, as only the first one that is discovered (typically the one with lexicographical precedence) gets inserted, and the others are ignored. To support such a use case, we change the insertion routine to not only support versions, but also paths when finding a spot to insert the installation into. --- packer/plugin-getter/plugins.go | 18 +----- packer/plugin-getter/plugins_test.go | 56 ++++++++++++++++++- ...cker-plugin-alazon_v1.2.5_x5.0_linux_amd64 | 1 + ...n-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM | 1 + ...cker-plugin-amazon_v1.2.5_x5.0_linux_amd64 | 1 + ...n-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM | 1 + 6 files changed, 60 insertions(+), 18 deletions(-) create mode 100644 packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64 create mode 100644 packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM create mode 100644 packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64 create mode 100644 packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM diff --git a/packer/plugin-getter/plugins.go b/packer/plugin-getter/plugins.go index 29b34da1c04..d6f52ebcc22 100644 --- a/packer/plugin-getter/plugins.go +++ b/packer/plugin-getter/plugins.go @@ -177,7 +177,7 @@ func (pr Requirement) ListInstallations(opts ListInstallationsOptions) (InstallL continue } - res.InsertSortedUniq(&Installation{ + res = append(res, &Installation{ BinaryPath: path, Version: pluginVersionStr, }) @@ -206,22 +206,6 @@ func (l InstallList) String() string { return v.String() } -// InsertSortedUniq inserts the installation in the right spot in the list by -// comparing the version lexicographically. -// A Duplicate version will replace any already present version. -func (l *InstallList) InsertSortedUniq(install *Installation) { - pos := sort.Search(len(*l), func(i int) bool { return (*l)[i].Version >= install.Version }) - if len(*l) > pos && (*l)[pos].Version == install.Version { - // already detected, let's ignore any new foundings, this way any plugin - // close to cwd or the packer exec takes precedence; this will be better - // for plugin development/tests. - return - } - (*l) = append((*l), nil) - copy((*l)[pos+1:], (*l)[pos:]) - (*l)[pos] = install -} - // Installation describes a plugin installation type Installation struct { // path to where binary is installed, if installed. diff --git a/packer/plugin-getter/plugins_test.go b/packer/plugin-getter/plugins_test.go index 513f2c4993b..e13f8cb3825 100644 --- a/packer/plugin-getter/plugins_test.go +++ b/packer/plugin-getter/plugins_test.go @@ -27,6 +27,8 @@ var ( pluginFolderTwo = filepath.Join("testdata", "plugins_2") + pluginFolderThree = filepath.Join("testdata", "plugins_3") + pluginFolderWrongChecksums = filepath.Join("testdata", "wrong_checksums") ) @@ -106,8 +108,8 @@ func TestPlugin_ListInstallations(t *testing.T) { BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.5_x5.0_windows_amd64.exe"), }, { - BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), Version: "v4.5.6", + BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), }, { Version: "v4.5.7", @@ -117,10 +119,22 @@ func TestPlugin_ListInstallations(t *testing.T) { Version: "v4.5.8", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.8_x5.0_windows_amd64.exe"), }, + { + Version: "v4.5.6", + BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), + }, { Version: "v4.5.9", BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.9_x5.0_windows_amd64.exe"), }, + { + Version: "v4.5.6", + BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp copy", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), + }, + { + Version: "v4.5.9", + BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp copy", "google", "packer-plugin-google_v4.5.9_x5.0_windows_amd64.exe"), + }, }, }, @@ -188,6 +202,10 @@ func TestPlugin_ListInstallations(t *testing.T) { Version: "v1.2.3", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.3_x5.0_darwin_amd64"), }, + { + Version: "v1.2.3", + BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.3_x5.1_darwin_amd64"), + }, { Version: "v1.2.4", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.4_x5.0_darwin_amd64"), @@ -276,12 +294,48 @@ func TestPlugin_ListInstallations(t *testing.T) { Version: "v4.5.8", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.8_x5.0_windows_amd64.exe"), }, + { + Version: "v4.5.6", + BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), + }, { Version: "v4.5.9", BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.9_x5.0_windows_amd64.exe"), }, }, }, + { + "test nil identifier - multiple plugins with same version", + fields{ + Identifier: "", + }, + ListInstallationsOptions{ + []string{ + pluginFolderThree, + }, + BinaryInstallationOptions{ + APIVersionMajor: "5", APIVersionMinor: "0", + OS: "linux", ARCH: "amd64", + Checksummers: []Checksummer{ + { + Type: "sha256", + Hash: sha256.New(), + }, + }, + }, + }, + false, + []*Installation{ + { + Version: "v1.2.5", + BinaryPath: filepath.Join(pluginFolderThree, "github.com", "hashicorp", "alazon", "packer-plugin-alazon_v1.2.5_x5.0_linux_amd64"), + }, + { + Version: "v1.2.5", + BinaryPath: filepath.Join(pluginFolderThree, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.5_x5.0_linux_amd64"), + }, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64 b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64 new file mode 100644 index 00000000000..7813681f5b4 --- /dev/null +++ b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64 @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM new file mode 100644 index 00000000000..2ef9d7d4c35 --- /dev/null +++ b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM @@ -0,0 +1 @@ +ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d \ No newline at end of file diff --git a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64 b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64 new file mode 100644 index 00000000000..7813681f5b4 --- /dev/null +++ b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64 @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM new file mode 100644 index 00000000000..2ef9d7d4c35 --- /dev/null +++ b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM @@ -0,0 +1 @@ +ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d \ No newline at end of file From 4d5f1a3607fc16309d527777d165935a712d8f61 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 5 Dec 2023 09:40:19 -0500 Subject: [PATCH 149/156] Update CHANGELOG for 1.10.0 release --- CHANGELOG.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30979d0f987..81da4bcc5e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.10.0 (Upcoming) +## 1.10.1 (Upcoming) + +## 1.10.0 (December 5, 2023) ### NOTES: This release contains breaking changes for practitioner relying on plugins @@ -54,6 +56,9 @@ The affected plugins include: * cmd/init: Warn users running `packer init` on configuration templates with a missing `required_plugins` blocks. [GH-12638](https://github.com/hashicorp/packer/pull/12638) +* cmd/plugins: Add `--path` flag to `packer plugins install` subcommand to + support installation of plugins from a local binary rather than from + GitHub. [GH-12643](https://github.com/hashicorp/packer/pull/12643) * cmd/plugins: Install SHA256SUM file with 0644 perms. [GH-12665](https://github.com/hashicorp/packer/pull/12665) * cmd/plugins: Remove SHA256SUM file on plugin removal. @@ -62,8 +67,8 @@ The affected plugins include: for removal. [GH-12669](https://github.com/hashicorp/packer/pull/12669) * core/hcl2: Remove empty source file reference on unset variable errors. [GH-12712](https://github.com/hashicorp/packer/pull/12712) -* core/hcl: Improve the recursive execution of data sources with other - data source dependencies. +* core/hcl: Improve the recursive execution of data sources with other data + source dependencies. [GH-12608](https://github.com/hashicorp/packer/pull/12608) * core: Bump github.com/hashicorp/hcp-sdk-go from 0.73.0 to 0.74.0 - [GH-12704](https://github.com/hashicorp/packer/pull/12704) @@ -77,6 +82,13 @@ The affected plugins include: * docs: Update plugin installation guides with supported methods for 1.10.0 and above. [GH-12713](https://github.com/hashicorp/packer/pull/12713) +### BUG FIXES: + +* cmd/plugins: Update `packer plugin installed` to show all installed plugin + binaries, including any duplicate versions or binaries copied from a + different source URI. + [GH-12731](https://github.com/hashicorp/packer/pull/12731) + ## 1.9.5 (December 4, 2023) ### SECURITY From 72bc6c811a6ecb808bc5a746eea08fbbea37d3db Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 20 Nov 2023 14:07:07 -0500 Subject: [PATCH 150/156] Document process for registering a plugin as a Packer Integration --- .github/ISSUE_TEMPLATE/plugin_integration.md | 21 +++++ .../content/docs/plugins/creation/index.mdx | 94 +++++-------------- 2 files changed, 42 insertions(+), 73 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/plugin_integration.md diff --git a/.github/ISSUE_TEMPLATE/plugin_integration.md b/.github/ISSUE_TEMPLATE/plugin_integration.md new file mode 100644 index 00000000000..c84da673895 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/plugin_integration.md @@ -0,0 +1,21 @@ +--- +name: Plugin Integration Request +about: Open request to add your plugin as a Packer integration (https://developer.hashicorp.com/packer/integrations) +labels: integration-request +--- + +#### Description + +A written description of your plugin along with a link to the plugin repository. + +#### Integration Tier + + +#### Checklist +- [] Has valid [`metadata.hcl`](https://github.com/hashicorp/integration-template) file in plugin repository. +- [] Has added integration scripts [packer-plugin-scaffolding](https://github.com/hashicorp/packer-plugin-scoffolding) to plugin repository. +- [] Has added top-level integration README.md file to plugin `docs` directory. +- [] All plugins components have one README.md describing their usage. +- [] Has a fully synced `.web-docs` directory ready for publishing to the integrations portal. + diff --git a/website/content/docs/plugins/creation/index.mdx b/website/content/docs/plugins/creation/index.mdx index 32537f160d3..3ba19fee600 100644 --- a/website/content/docs/plugins/creation/index.mdx +++ b/website/content/docs/plugins/creation/index.mdx @@ -214,87 +214,35 @@ Here's what you need to create releases using GitHub Actions: to install a plugin using `packer init`, see the [init docs](/packer/docs/commands/init). -## Registering Plugin Documentation +## Registering Plugins -~> Note: Registering a remote plugin's plugin documentation requires the use of [Packer's plugin docs configuration](https://github.com/hashicorp/packer-plugin-scaffolding/tree/main/docs). +~> Note: Registering a remote as an integration requires the use of [Packer's plugin docs configuration](https://github.com/hashicorp/packer-plugin-scaffolding/tree/main/docs). -`packer init` allows users to require and install remote Packer plugins, those not bundled with Packer core, that have been published to GitHub automatically. -To help with the discovery of remote Packer plugins on GitHub, plugins maintainers can choose to register plugin documentation for each component directly on the [Packer Documentation Page](/packer/docs). +`packer init` allows users to require and install remote Packer plugins published to GitHub. +To help with the discovery of remote Packer plugins, plugins maintainers can choose to register their plugin as a [Packer Integration](/packer/integrations). -The registration process requires the creation of a `docs.zip` file archive containing the `.mdx` files for each of the plugin components in the remote plugin's repository. A working example can be seen at the [packer-plugin-docker repository](https://github.com/hashicorp/packer-plugin-docker/releases/latest). +The registration process requires [metadata configuration](https://github.com/hashicorp/integration-template#metadata-configuration) be added to your plugin repository for configuring the Packer integration pipeline and plugin documentation for rendering +on the [Packer Integrations](/packer/integrations) portal. -Once in place the remote plugin can be added to Packer's website builds by opening a pull-request against [hashicorp/packer](https://github.com/hashicorp/packer), with the needed configuration for pulling in the remote documentation. +The following steps are required for registering your plugin as an integration -Remote plugins will have their components listed under the respected types (i.e builders, provisioners, etc) using the names specified in the remote block configuration, and labeled with their respective [tier and namespace](/packer/docs/plugins#tiers-and-namespaces). +1. Update your plugin documentation structure according to the templated defined with the [Packer Plugin Scaffolding template]. +New plugins generated from this template may have the necessary structure in place. If so you can jump to step 4. +1. For the integrations library, only one top-level README per integration is supported. Any top-level index.mdx files that exist +within a plugins existing documentation will need to migrate to a top-level README. +1. Update your top-level integration README to include a description, plugin installation steps, available components section, and, any, additional sections +needed to inform users on how to work with your integration. Refer to [Packer scaffolding plugin](https://github.com/hashicorp/packer-plugin-scaffolding/blob/main/docs/README.md) for an example. +1. Update the top-level README for each of the components within your integration to follow the structure defined in the scaffolding template. +1. Open a request for integration issue with the Packer team - [Open Request](https://github.com/hashicorp/packer/issues/new/choose). +Please provide all the requested information to help expedite the integration request. -To register a plugin follow one of the following setups +By opening an integration request, you are asking a member of the to Packer team to review your plugin integration configuration, plugin documentation, +and, finally, to open an internal pull-request to finalize the integration setup. - - - -Documentation for a plugin is maintained within the `docs` directory and served on GitHub. - -To include plugin docs on the website, a global pre-hook has been added to the main scaffolding [.goreleaser.yml](https://github.com/hashicorp/packer-plugin-scaffolding/blob/42e5b0b1e575879b0477cb6d4291e027f4d92f85/.goreleaser.yml#L10) file, that if uncommented will generate and include a docs.zip file as part of the plugin release. - -The `docs.zip` file contains all of the `.mdx` files under the plugins root `docs/` directory that the website can consume remotely. - - - - - -You can generate the required documentation structure manually by creating a zip file called `docs.zip` of the docs directory and including that zip file in the plugin release. - -```/bin/bash -[[ -d docs/ ]] && zip -r docs.zip docs/ -``` - - - - -Once the first `docs.zip` file has been included into a release you will need to open a one time pull-request against [hashicorp/packer](https://github.com/hashicorp/packer) to register the plugin docs. - -This is done by adding the block below for the respective plugin to the file [website/data/plugins-manifest.json](https://github.com/hashicorp/packer/blob/main/website/data/plugins-manifest.json). - -```json -{ - "title": "Scaffolding", - "path": "scaffolding", - "repo": "hashicorp/packer-plugin-scaffolding", - "version": "latest", - "sourceBranch": "main" -} -``` - -If a plugin maintainer wishes to only include a specific version of released docs, then the `"version"` key in the above configuration should be set to a released version of the plugin. Otherwise it should be set to `"latest"`. - -The `"sourceBranch"` key in the above configuration ensures potential contributors can link back to source files in the plugin repository from the Packer docs site. If a `"sourceBranch"` value is not present, it will default to `"main"`. - -### Testing Plugin Documentation - -Before publishing the `docs.zip` file, you might want to preview your documentation changes. -We provide a mechanism that allows to preview how the docs will look like within -the Packer documentation. - -Follow the next steps to get the Packer website running and preview the documentation changes: - -- Get the [Packer source code](https://github.com/hashicorp/packer). Our website code is under the [website folder](https://github.com/hashicorp/packer/tree/main/website). -- Generate the `docs.zip` file. You can find above the steps to do so. -- Add the `zipFile` attribute to the plugin entry in `plugins-manifest.json`. The value should be the full path of the `docs.zip` generated. For example: - -```json -{ - "title": "Scaffolding", - "path": "scaffolding", - "repo": "hashicorp/packer-plugin-scaffolding", - "version": "latest", - "sourceBranch": "main", - "zipFile": "/Users/myuser/Packer/plugins/packer-plugin-scaffolding/docs.zip" -} -``` +Plugin integrations will be listed as a [Packer Integration](/packer/integrations), with details on how to install and use your the plugin. -- Go to the [website folder](https://github.com/hashicorp/packer/tree/main/website). - In the website README, follow the steps to [run the website with node](https://github.com/hashicorp/packer/tree/main/website#with-node). -- Once the website is up and running, the plugin documentation should be available in `http://localhost:3000/docs`. +Plugin integrations, once deployed, can be updated manually, or automatically upon a new release, by the plugin authors. Changes to the defined documentation structure +or parent repository should be communicated to the Packer team to ensure a working integration pipeline. ## Plugin Development Tips and FAQs From 97624ce26eaa4cdc303939a87ddf80a534459445 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 30 Nov 2023 17:13:55 -0500 Subject: [PATCH 151/156] Replace relative links --- website/content/docs/plugins/creation/index.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/content/docs/plugins/creation/index.mdx b/website/content/docs/plugins/creation/index.mdx index 3ba19fee600..55425367b7b 100644 --- a/website/content/docs/plugins/creation/index.mdx +++ b/website/content/docs/plugins/creation/index.mdx @@ -9,7 +9,7 @@ page_title: Extending # Developing Plugins Packer is extensible and supports plugins that let you -create and use custom builders, provisioners, post-processors, and data sources. This page explains how to develop Packer plugins. Before you begin, we recommend reviewing the Packer documentation and the instructions for [installing external plugins](/packer/docs/plugins/install-plugins). +create and use custom builders, provisioners, post-processors, and data sources. This page explains how to develop Packer plugins. Before you begin, we recommend reviewing the Packer documentation and the instructions for [installing external plugins](https://developer.hashicorp.com/packer/docs/plugins/install-plugins). ~> **Warning** This is an advanced topic. You should have strong knowledge of Packer before you start writing plugins. @@ -146,7 +146,7 @@ because the `packer init` command only supports multi-component plugins. Next, build your plugin as you would any other Go application. The resulting binary is the plugin that can be installed using -[standard installation procedures](/packer/docs/plugins#installing-plugins). +[standard installation procedures](https://developer.hashicorp.com/packer/docs/plugins#installing-plugins). This documentation explains how to implement each type of plugin interface: builders, data sources, provisioners, and post-processors. @@ -212,17 +212,17 @@ Here's what you need to create releases using GitHub Actions: releaser is working. The tag must be a valid [Semantic Version](https://semver.org/) preceded with a `v`. Once the tag is pushed, the github actions you just configured will automatically build release binaries that Packer can download using `packer init`. For more details on how to install a plugin using `packer init`, see the - [init docs](/packer/docs/commands/init). + [init docs](https://developer.hashicorp.com/packer/docs/commands/init). ## Registering Plugins ~> Note: Registering a remote as an integration requires the use of [Packer's plugin docs configuration](https://github.com/hashicorp/packer-plugin-scaffolding/tree/main/docs). `packer init` allows users to require and install remote Packer plugins published to GitHub. -To help with the discovery of remote Packer plugins, plugins maintainers can choose to register their plugin as a [Packer Integration](/packer/integrations). +To help with the discovery of remote Packer plugins, plugins maintainers can choose to register their plugin as a [Packer Integration](https://developer.hashicorp.com/packer/integrations). The registration process requires [metadata configuration](https://github.com/hashicorp/integration-template#metadata-configuration) be added to your plugin repository for configuring the Packer integration pipeline and plugin documentation for rendering -on the [Packer Integrations](/packer/integrations) portal. +on the [Packer Integrations](https://developer.hashicorp.com/packer/integrations) portal. The following steps are required for registering your plugin as an integration @@ -239,7 +239,7 @@ Please provide all the requested information to help expedite the integration re By opening an integration request, you are asking a member of the to Packer team to review your plugin integration configuration, plugin documentation, and, finally, to open an internal pull-request to finalize the integration setup. -Plugin integrations will be listed as a [Packer Integration](/packer/integrations), with details on how to install and use your the plugin. +Plugin integrations will be listed as a [Packer Integration](https://developer.hashicorp.com/packer/integrations), with details on how to install and use your the plugin. Plugin integrations, once deployed, can be updated manually, or automatically upon a new release, by the plugin authors. Changes to the defined documentation structure or parent repository should be communicated to the Packer team to ensure a working integration pipeline. From 72385d6b8a61a0e4a737f9f52c155a3472b185c6 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 1 Dec 2023 08:00:41 -0500 Subject: [PATCH 152/156] Address review feedback --- website/content/docs/plugins/creation/index.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/content/docs/plugins/creation/index.mdx b/website/content/docs/plugins/creation/index.mdx index 55425367b7b..5cb3d8d3c00 100644 --- a/website/content/docs/plugins/creation/index.mdx +++ b/website/content/docs/plugins/creation/index.mdx @@ -216,23 +216,23 @@ Here's what you need to create releases using GitHub Actions: ## Registering Plugins -~> Note: Registering a remote as an integration requires the use of [Packer's plugin docs configuration](https://github.com/hashicorp/packer-plugin-scaffolding/tree/main/docs). +~> Note: Registering a plugin as an integration requires the use of [Packer's Incofiguration configuration](https://github.com/hashicorp/packer-plugin-scaffolding/tree/main/docs). -`packer init` allows users to require and install remote Packer plugins published to GitHub. -To help with the discovery of remote Packer plugins, plugins maintainers can choose to register their plugin as a [Packer Integration](https://developer.hashicorp.com/packer/integrations). +To help with the discovery of Packer plugins, plugins maintainers can choose to register their plugin as a [Packer Integration](https://developer.hashicorp.com/packer/integrations). -The registration process requires [metadata configuration](https://github.com/hashicorp/integration-template#metadata-configuration) be added to your plugin repository for configuring the Packer integration pipeline and plugin documentation for rendering -on the [Packer Integrations](https://developer.hashicorp.com/packer/integrations) portal. +The registration process requires [metadata configuration](https://github.com/hashicorp/integration-template#metadata-configuration) be added to your plugin repository for configuring the Packer integration pipeline and +a specific directory structure for plugin documentation to be render on the [Packer Integrations](https://developer.hashicorp.com/packer/integrations) portal. -The following steps are required for registering your plugin as an integration +You can execute the following steps to register your plugin as an integration: -1. Update your plugin documentation structure according to the templated defined with the [Packer Plugin Scaffolding template]. -New plugins generated from this template may have the necessary structure in place. If so you can jump to step 4. +1. Update your plugin documentation structure according to the template defined with the [Packer Plugin Scaffolding template]. +New plugins generated from this template may have the necessary structure in place. If so you can jump to step 3. 1. For the integrations library, only one top-level README per integration is supported. Any top-level index.mdx files that exist within a plugins existing documentation will need to migrate to a top-level README. 1. Update your top-level integration README to include a description, plugin installation steps, available components section, and, any, additional sections needed to inform users on how to work with your integration. Refer to [Packer scaffolding plugin](https://github.com/hashicorp/packer-plugin-scaffolding/blob/main/docs/README.md) for an example. 1. Update the top-level README for each of the components within your integration to follow the structure defined in the scaffolding template. +1. Add the integration configuration file [metadata.hcl](https://github.com/hashicorp/packer-plugin-scaffolding/blob/main/.web-docs/metadata.hcl) to the plugins `.web-docs` directory. 1. Open a request for integration issue with the Packer team - [Open Request](https://github.com/hashicorp/packer/issues/new/choose). Please provide all the requested information to help expedite the integration request. From 2af6b5b341df6e3d94cc6eedd9594a07c22c1828 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 1 Dec 2023 13:00:41 +0000 Subject: [PATCH 153/156] backport of commit 72385d6b8a61a0e4a737f9f52c155a3472b185c6 --- .copywrite.hcl | 4 +- .github/CONTRIBUTING.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/labeler-issue-triage.yml | 2 +- .github/workflows/acceptance-test.yml | 10 +- .github/workflows/auto-close-stale-issues.yml | 2 +- .github/workflows/backport.yml | 2 +- .github/workflows/build.yml | 16 +- .../workflows/check-legacy-links-format.yml | 17 + .github/workflows/check-plugin-docs.yml | 4 +- .github/workflows/create-release-branch.yml | 2 +- .github/workflows/go-test.yml | 14 +- .github/workflows/go-validate.yml | 18 +- .github/workflows/issue-comment-created.yml | 3 +- .github/workflows/issue-migrator.yml | 2 +- .github/workflows/issues-opened.yml | 41 +- .github/workflows/jira.yml | 28 +- .github/workflows/lock.yml | 2 +- .github/workflows/nightly-release.yml | 16 +- .golangci.yml | 2 +- .release/ci.hcl | 2 +- .release/release-metadata.hcl | 2 +- .release/security-scan.hcl | 2 +- CHANGELOG.md | 100 ---- CODEOWNERS | 2 + Dockerfile | 2 +- LICENSE | 467 ++++++++++++--- README.md | 97 ++- acctest/plugin/bundled_plugin_test.go | 184 ++++++ acctest/plugin/component_acc_test.go | 10 +- acctest/plugin/plugin_acc_test.go | 10 +- .../basic-amazon-ami-datasource.pkr.hcl | 2 +- .../test-fixtures/basic-amazon-ebs.pkr.hcl | 15 +- .../test-fixtures/basic_amazon_bundled.json | 10 + .../basic_amazon_bundled.pkr.hcl | 11 + ...basic_amazon_with_required_plugins.pkr.hcl | 20 + acctest/testing.go | 5 +- acctest/testing_test.go | 2 +- background_check.go | 2 +- background_check_openbsd.go | 2 +- builder/file/artifact.go | 2 +- builder/file/artifact_test.go | 2 +- builder/file/builder.go | 2 +- builder/file/builder_test.go | 2 +- builder/file/config.go | 2 +- builder/file/config_test.go | 2 +- builder/file/version/version.go | 2 +- builder/null/artifact_export.go | 2 +- builder/null/artifact_export_test.go | 2 +- builder/null/builder.go | 2 +- builder/null/builder_test.go | 2 +- builder/null/config.go | 2 +- builder/null/config_test.go | 2 +- builder/null/ssh.go | 2 +- builder/null/version/version.go | 2 +- checkpoint.go | 2 +- cmd/generate-fixer-deprecations/main.go | 2 +- cmd/ssh-keygen/main.go | 2 +- command/build.go | 6 +- command/build_cancellation_test.go | 2 +- command/build_cleanup_script_test.go | 2 +- command/build_parallel_test.go | 2 +- command/build_test.go | 2 +- command/build_timeout_test.go | 2 +- command/build_windows_test.go | 2 +- command/cli.go | 4 +- command/command_test.go | 2 +- command/config_file_unix.go | 2 +- command/config_file_windows.go | 2 +- command/console.go | 4 +- command/console_test.go | 2 +- command/enumflag/flag.go | 2 +- command/exec_test.go | 9 +- command/fix.go | 4 +- command/fix_test.go | 2 +- command/flag-kv/flag.go | 2 +- command/flag-kv/flag_json.go | 2 +- command/flag-kv/flag_json_test.go | 2 +- command/flag-kv/flag_strings.go | 2 +- command/flag-kv/flag_strings_test.go | 2 +- command/flag-kv/flag_test.go | 2 +- command/flag-slice/flag.go | 2 +- command/flag-slice/flag_test.go | 2 +- command/fmt.go | 4 +- command/fmt_test.go | 2 +- command/hcl2_upgrade.go | 135 ++--- command/hcl2_upgrade_test.go | 26 +- command/init.go | 18 +- command/init_test.go | 2 +- command/inspect.go | 4 +- command/inspect_test.go | 2 +- command/meta.go | 197 +++++- command/plugins.go | 2 +- command/plugins_install.go | 252 +------- command/plugins_install_test.go | 7 +- command/plugins_installed.go | 2 +- command/plugins_remove.go | 17 +- command/plugins_remove_test.go | 27 +- command/plugins_required.go | 4 +- command/signal.go | 2 +- command/test_utils.go | 2 +- command/utils.go | 2 +- command/utils_test.go | 2 +- command/validate.go | 6 +- command/validate_test.go | 2 +- command/vendored_plugins.go | 303 ++++++++++ command/version.go | 2 +- command/version_test.go | 2 +- commands.go | 2 +- config.go | 6 +- config_test.go | 2 +- datasource/hcp-packer-image/data.go | 2 +- datasource/hcp-packer-iteration/data.go | 2 +- .../hcp-packer-iteration/data_acc_test.go | 2 +- datasource/http/data.go | 2 +- datasource/http/data_acc_test.go | 2 +- datasource/null/data.go | 2 +- fix/fixer.go | 2 +- fix/fixer_amazon_enhanced_networking.go | 2 +- fix/fixer_amazon_enhanced_networking_test.go | 2 +- fix/fixer_amazon_private_ip.go | 2 +- fix/fixer_amazon_private_ip_test.go | 2 +- fix/fixer_amazon_shutdown_behavior.go | 2 +- fix/fixer_amazon_shutdown_behavior_test.go | 2 +- fix/fixer_amazon_spot_price_product.go | 2 +- ...r_amazon_temporary_security_group_cidrs.go | 2 +- ...zon_temporary_security_group_cidrs_test.go | 2 +- fix/fixer_azure_exclude_from_latest.go | 2 +- fix/fixer_azure_exclude_from_latest_test.go | 2 +- fix/fixer_clean_image_name.go | 2 +- fix/fixer_clean_image_name_test.go | 2 +- fix/fixer_comm_config.go | 2 +- fix/fixer_comm_config_test.go | 2 +- fix/fixer_createtime.go | 2 +- fix/fixer_createtime_test.go | 2 +- fix/fixer_docker_email.go | 2 +- fix/fixer_galaxy_command.go | 2 +- fix/fixer_galaxy_command_test.go | 2 +- fix/fixer_hyperv_cpu_and_ram_naming.go | 2 +- fix/fixer_hyperv_deprecations.go | 2 +- fix/fixer_hyperv_deprecations_test.go | 2 +- fix/fixer_hyperv_vmxc_typo.go | 2 +- fix/fixer_hyperv_vmxc_typo_test.go | 2 +- fix/fixer_iso_checksum_type_and_url.go | 2 +- fix/fixer_iso_checksum_type_and_url_test.go | 2 +- fix/fixer_iso_md5.go | 2 +- fix/fixer_iso_md5_test.go | 2 +- fix/fixer_parallels_deprecations.go | 2 +- fix/fixer_parallels_deprecations_test.go | 2 +- fix/fixer_parallels_headless.go | 2 +- fix/fixer_parallels_headless_test.go | 2 +- fix/fixer_powershell_escapes.go | 2 +- fix/fixer_pp_docker_tag_tags.go | 2 +- fix/fixer_pp_docker_tag_tags_test.go | 2 +- fix/fixer_pp_manifest_filename.go | 2 +- fix/fixer_pp_manifest_filename_test.go | 2 +- fix/fixer_pp_vagrant_override.go | 2 +- fix/fixer_pp_vagrant_override_test.go | 2 +- fix/fixer_proxmox_type.go | 2 +- fix/fixer_proxmox_type_test.go | 2 +- fix/fixer_qemu_disk_size.go | 2 +- fix/fixer_qemu_disk_size_test.go | 2 +- fix/fixer_qemu_host_port.go | 2 +- fix/fixer_qemu_host_port_test.go | 2 +- fix/fixer_scaleway_access_key.go | 2 +- fix/fixer_scaleway_access_key_test.go | 2 +- fix/fixer_ssh_timeout.go | 2 +- fix/fixer_ssh_timeout_test.go | 2 +- fix/fixer_sshdisableagent.go | 2 +- fix/fixer_sshdisableagent_test.go | 2 +- fix/fixer_sshkeypath.go | 2 +- fix/fixer_sshkeypath_test.go | 2 +- fix/fixer_test.go | 2 +- fix/fixer_virtualbox_gaattach.go | 2 +- fix/fixer_virtualbox_gaattach_test.go | 2 +- fix/fixer_virtualbox_rename.go | 2 +- fix/fixer_virtualbox_rename_test.go | 2 +- fix/fixer_vmware_compaction.go | 2 +- fix/fixer_vmware_compaction_test.go | 2 +- fix/fixer_vmware_rename.go | 2 +- fix/fixer_vmware_rename_test.go | 2 +- fix/fixer_vsphere_network_storage.go | 2 +- fix/fixer_vsphere_network_storage_test.go | 2 +- fix/helpers.go | 2 +- go | 0 go.mod | 135 +++-- go.sum | 565 +++++++++++++----- hcl2template/addrs/doc.go | 2 +- hcl2template/addrs/input_variable.go | 2 +- hcl2template/addrs/parse_ref.go | 2 +- hcl2template/addrs/plugin.go | 2 +- hcl2template/addrs/plugin_test.go | 2 +- hcl2template/addrs/referenceable.go | 2 +- hcl2template/common_test.go | 2 +- hcl2template/components.go | 2 +- hcl2template/decode.go | 2 +- hcl2template/docs.go | 2 +- hcl2template/formatter.go | 2 +- hcl2template/formatter_test.go | 2 +- hcl2template/function/Consul.go | 2 +- hcl2template/function/aws_secretetkey.go | 2 +- hcl2template/function/datetime.go | 37 +- hcl2template/function/datetime_test.go | 2 +- hcl2template/function/env.go | 5 +- hcl2template/function/index.go | 5 +- hcl2template/function/index_test.go | 2 +- hcl2template/function/length.go | 3 +- hcl2template/function/length_test.go | 20 +- hcl2template/function/refinements.go | 9 - hcl2template/function/templatefile.go | 2 +- hcl2template/function/templatefile_test.go | 2 +- hcl2template/function/vault.go | 2 +- hcl2template/functions.go | 2 +- hcl2template/internal/mock.go | 2 +- hcl2template/parser.go | 2 +- hcl2template/plugin.go | 61 +- hcl2template/repl/format.go | 2 +- hcl2template/repl/repl.go | 2 +- hcl2template/shim/mock.go | 2 +- hcl2template/shim/values.go | 2 +- hcl2template/shim/values_test.go | 2 +- hcl2template/types.build.from.go | 2 +- hcl2template/types.build.go | 2 +- .../types.build.hcp_packer_registry.go | 2 +- .../types.build.hcp_packer_registry_test.go | 2 +- hcl2template/types.build.post-processor.go | 2 +- hcl2template/types.build.provisioners.go | 2 +- hcl2template/types.build.provisioners_test.go | 2 +- hcl2template/types.build_test.go | 2 +- hcl2template/types.datasource.go | 2 +- hcl2template/types.datasource_test.go | 2 +- hcl2template/types.hcl_post-processor.go | 2 +- hcl2template/types.hcl_provisioner.go | 2 +- hcl2template/types.hcl_ref.go | 2 +- hcl2template/types.packer_config.go | 2 +- hcl2template/types.packer_config_test.go | 2 +- hcl2template/types.required_plugins.go | 2 +- hcl2template/types.required_plugins_test.go | 2 +- hcl2template/types.source.go | 2 +- hcl2template/types.source_test.go | 2 +- hcl2template/types.variables.go | 3 +- hcl2template/types.variables_test.go | 2 +- hcl2template/utils.go | 2 +- hcl2template/version.go | 2 +- hcl2template/version_required.go | 2 +- helper/wrappedreadline/wrappedreadline.go | 2 +- .../wrappedreadline_solaris.go | 2 +- .../wrappedreadline/wrappedreadline_unix.go | 2 +- .../wrappedreadline_windows.go | 2 +- helper/wrappedstreams/streams.go | 2 +- helper/wrappedstreams/streams_other.go | 2 +- helper/wrappedstreams/streams_windows.go | 2 +- internal/hcp/api/client.go | 16 +- internal/hcp/api/client_test.go | 4 +- internal/hcp/api/errors.go | 2 +- internal/hcp/api/mock_service.go | 17 +- internal/hcp/api/service.go | 2 +- internal/hcp/env/env.go | 2 +- internal/hcp/env/env_test.go | 2 +- internal/hcp/env/variables.go | 2 +- internal/hcp/registry/artifact.go | 2 +- internal/hcp/registry/errors.go | 2 +- internal/hcp/registry/hcl.go | 2 +- internal/hcp/registry/hcp.go | 2 +- internal/hcp/registry/json.go | 2 +- internal/hcp/registry/null_registry.go | 2 +- internal/hcp/registry/registry.go | 2 +- internal/hcp/registry/types.bucket.go | 2 +- .../hcp/registry/types.bucket_service_test.go | 2 +- internal/hcp/registry/types.bucket_test.go | 2 +- internal/hcp/registry/types.builds.go | 2 +- internal/hcp/registry/types.iterations.go | 2 +- .../hcp/registry/types.iterations_test.go | 2 +- log.go | 2 +- main.go | 12 +- main_test.go | 2 +- packer/build.go | 2 +- packer/build_test.go | 2 +- packer/builder_test.go | 2 +- packer/client_test.go | 2 +- packer/cmd_builder.go | 2 +- packer/cmd_builder_test.go | 2 +- packer/cmd_datasource.go | 2 +- packer/cmd_datasource_test.go | 2 +- packer/cmd_hook.go | 2 +- packer/cmd_hook_test.go | 2 +- packer/cmd_post_processor.go | 2 +- packer/cmd_post_processor_test.go | 2 +- packer/cmd_provisioner.go | 2 +- packer/cmd_provisioner_test.go | 2 +- packer/core.go | 55 +- packer/core_test.go | 2 +- packer/maps.go | 2 +- packer/packer_test.go | 2 +- packer/plugin-getter/checksum.go | 2 +- packer/plugin-getter/docs.go | 2 +- packer/plugin-getter/github/docs.go | 2 +- packer/plugin-getter/github/getter.go | 2 +- packer/plugin-getter/plugins.go | 27 +- packer/plugin-getter/plugins_test.go | 66 +- ...cker-plugin-alazon_v1.2.5_x5.0_linux_amd64 | 1 - ...n-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM | 1 - ...cker-plugin-amazon_v1.2.5_x5.0_linux_amd64 | 1 - ...n-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM | 1 - packer/plugin.go | 2 +- packer/plugin_client.go | 2 +- packer/plugin_discover_test.go | 2 +- packer/plugin_folders.go | 2 +- packer/plugin_test.go | 2 +- packer/post_processor_mock.go | 2 +- packer/progressbar.go | 2 +- packer/progressbar_solaris.go | 2 +- packer/progressbar_test.go | 2 +- packer/provisioner.go | 2 +- packer/provisioner_test.go | 2 +- packer/provisioner_timeout.go | 2 +- packer/run_interfaces.go | 2 +- packer/telemetry.go | 2 +- packer/telemetry_test.go | 2 +- packer/testing.go | 2 +- packer/ui.go | 2 +- packer/ui_test.go | 2 +- panic.go | 2 +- post-processor/artifice/artifact.go | 2 +- post-processor/artifice/post-processor.go | 2 +- post-processor/artifice/version/version.go | 2 +- post-processor/checksum/artifact.go | 2 +- post-processor/checksum/post-processor.go | 2 +- .../checksum/post-processor_test.go | 2 +- post-processor/checksum/version/version.go | 2 +- post-processor/compress/artifact.go | 2 +- post-processor/compress/artifact_test.go | 2 +- post-processor/compress/benchmark.go | 2 +- post-processor/compress/post-processor.go | 2 +- .../compress/post-processor_test.go | 2 +- post-processor/compress/tar_fix.go | 2 +- post-processor/compress/tar_fix_go110.go | 2 +- post-processor/compress/version/version.go | 2 +- post-processor/manifest/artifact.go | 2 +- post-processor/manifest/post-processor.go | 2 +- post-processor/manifest/version/version.go | 2 +- post-processor/shell-local/post-processor.go | 2 +- .../shell-local/post-processor_test.go | 2 +- post-processor/shell-local/version/version.go | 2 +- provisioner/breakpoint/provisioner.go | 2 +- provisioner/breakpoint/version/version.go | 2 +- provisioner/file/provisioner.go | 2 +- provisioner/file/provisioner_test.go | 2 +- provisioner/file/version/version.go | 2 +- provisioner/powershell/execution_policy.go | 2 +- .../powershell/execution_policy_test.go | 2 +- provisioner/powershell/provisioner.go | 2 +- .../powershell/provisioner_acc_test.go | 2 +- provisioner/powershell/provisioner_test.go | 2 +- provisioner/powershell/version/version.go | 2 +- provisioner/shell-local/provisioner.go | 2 +- .../shell-local/provisioner_acc_test.go | 2 +- provisioner/shell-local/provisioner_test.go | 2 +- provisioner/shell-local/version/version.go | 2 +- provisioner/shell/provisioner.go | 2 +- provisioner/shell/provisioner_acc_test.go | 2 +- provisioner/shell/provisioner_test.go | 2 +- provisioner/shell/unix_reader.go | 2 +- provisioner/shell/unix_reader_test.go | 2 +- provisioner/shell/version/version.go | 2 +- provisioner/sleep/provisioner.go | 2 +- provisioner/sleep/provisioner_test.go | 2 +- provisioner/sleep/version/version.go | 2 +- provisioner/windows-restart/provisioner.go | 2 +- .../windows-restart/provisioner_test.go | 2 +- .../windows-restart/version/version.go | 2 +- provisioner/windows-shell/provisioner.go | 2 +- provisioner/windows-shell/provisioner_test.go | 2 +- provisioner/windows-shell/version/version.go | 2 +- scripts/build.ps1 | 2 +- scripts/build.sh | 2 +- scripts/codesign_example.sh | 2 +- scripts/dist.sh | 2 +- scripts/generate-plugins.go | 2 +- scripts/off_gopath.sh | 2 +- scripts/prepare_changelog.sh | 2 +- scripts/sign.sh | 2 +- scripts/sort-md-list.py | 2 +- scripts/upgrade_plugins.sh | 68 +++ scripts/vagrant-freebsd-priv-config.sh | 2 +- scripts/vagrant-freebsd-unpriv-bootstrap.sh | 2 +- scripts/vagrant-linux-priv-config.sh | 2 +- scripts/vagrant-linux-priv-go.sh | 2 +- scripts/vagrant-linux-unpriv-bootstrap.sh | 2 +- tty.go | 2 +- tty_solaris.go | 2 +- version/VERSION | 2 +- version/version.go | 4 +- website/content/docs/commands/init.mdx | 2 +- website/content/docs/community-tools.mdx | 3 - website/content/docs/index.mdx | 2 +- website/content/docs/intro/index.mdx | 2 +- website/content/docs/partnerships.mdx | 2 +- .../content/docs/plugins/install-plugins.mdx | 292 +++++---- .../guides/packer-on-cicd/trigger-tfe.mdx | 2 +- website/data/plugins-manifest.json | 36 ++ website/package-lock.json | 504 ++++++---------- 402 files changed, 2789 insertions(+), 1961 deletions(-) create mode 100644 .github/workflows/check-legacy-links-format.yml create mode 100644 acctest/plugin/bundled_plugin_test.go create mode 100644 acctest/plugin/test-fixtures/basic_amazon_bundled.json create mode 100644 acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl create mode 100644 acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl create mode 100644 command/vendored_plugins.go delete mode 100644 go delete mode 100644 hcl2template/function/refinements.go delete mode 100644 packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64 delete mode 100644 packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM delete mode 100644 packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64 delete mode 100644 packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM create mode 100755 scripts/upgrade_plugins.sh diff --git a/.copywrite.hcl b/.copywrite.hcl index 3cbd1daa501..2e86e1c3cc1 100644 --- a/.copywrite.hcl +++ b/.copywrite.hcl @@ -1,6 +1,6 @@ project { - license = "BUSL-1.1" - copyright_year = 2023 + license = "MPL-2.0" + copyright_year = 2013 header_ignore = [ "*.hcl2spec.go", # generated code specs, since they'll be wiped out until we support adding the headers at generation-time "hcl2template/testdata/**", diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 60063f93b23..86e030cce3b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -70,7 +70,7 @@ runtime in order to build packer. 1. This project always releases from the latest version of golang. [Install go](https://golang.org/doc/install#install) To properly build from -source, you need to have golang >= v1.20 +source, you need to have golang >= v1.18 ## Setting up Packer for dev diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b79897d5954..eae8012b936 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 blank_issues_enabled: false contact_links: diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index 6d9ef6d547c..1737a33b92c 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bug: - 'panic:' diff --git a/.github/workflows/acceptance-test.yml b/.github/workflows/acceptance-test.yml index 783b6bdccde..98d012cb8d4 100644 --- a/.github/workflows/acceptance-test.yml +++ b/.github/workflows/acceptance-test.yml @@ -19,7 +19,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: 'Determine Go version' id: get-go-version # We use .go-version as our source of truth for current Go @@ -40,12 +40,12 @@ jobs: # Packer GH Token for API Rate Limiting PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - name: IAM Assume Role - uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0 + uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0 with: role-to-assume: ${{ env.AWS_ROLE_ARN }} aws-region: ${{ env.AWS_REGION }} @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Send slack notification on failure - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 with: payload: | { diff --git a/.github/workflows/auto-close-stale-issues.yml b/.github/workflows/auto-close-stale-issues.yml index af4a089df5d..40b04dec196 100644 --- a/.github/workflows/auto-close-stale-issues.yml +++ b/.github/workflows/auto-close-stale-issues.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write # for actions/stale to close stale PRs runs-on: ubuntu-latest steps: - - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0 + - uses: actions/stale@a20b814fb01b71def3bd6f56e7494d667ddf28da # v8.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-issue-stale: 23 diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 8e4ebf5e0b2..bb6e5b88158 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -16,7 +16,7 @@ jobs: contents: none if: github.event.pull_request.merged runs-on: ubuntu-latest - container: hashicorpdev/backport-assistant:0.3.4 + container: hashicorpdev/backport-assistant:0.2.3 steps: - name: Backport changes to stable-website run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c15c8c6acf5..0f13bedff1b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: 'Determine Go version' id: get-go-version # We use .go-version as our source of truth for current Go @@ -44,7 +44,7 @@ jobs: product-prerelease-version: ${{ steps.set-product-version.outputs.prerelease-product-version }} set-ld-flags: ${{ steps.set-ld-flags.outputs.set-ld-flags }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: set product version id: set-product-version uses: hashicorp/actions-set-product-version@v1 @@ -67,7 +67,7 @@ jobs: filepath: ${{ steps.generate-metadata-file.outputs.filepath }} steps: - name: 'Checkout directory' - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Generate metadata file id: generate-metadata-file uses: hashicorp/actions-generate-metadata@main @@ -105,7 +105,7 @@ jobs: GOPRIVATE: "github.com/hashicorp" GO111MODULE: on steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -142,7 +142,7 @@ jobs: GO111MODULE: on steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -169,7 +169,7 @@ jobs: version: ${{ needs.set-product-version.outputs.product-version }} maintainer: "HashiCorp" homepage: "https://www.packer.io/docs" - license: "BUSL-1.1" + license: "MPL-2.0" binary: "dist/${{ env.REPO_NAME }}" deb_depends: "openssl" rpm_depends: "openssl" @@ -204,7 +204,7 @@ jobs: GO111MODULE: on steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -234,7 +234,7 @@ jobs: env: version: ${{ needs.set-product-version.outputs.product-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Docker Build (Action) uses: hashicorp/actions-docker-build@v1 with: diff --git a/.github/workflows/check-legacy-links-format.yml b/.github/workflows/check-legacy-links-format.yml new file mode 100644 index 00000000000..08c128a9f49 --- /dev/null +++ b/.github/workflows/check-legacy-links-format.yml @@ -0,0 +1,17 @@ +name: Legacy Link Format Checker + +on: + push: + paths: + - "website/content/**/*.mdx" + - "website/data/*-nav-data.json" + +jobs: + check-links: + uses: hashicorp/dev-portal/.github/workflows/docs-content-check-legacy-links-format.yml@475289345d312552b745224b46895f51cc5fc490 + with: + repo-owner: "hashicorp" + repo-name: "packer" + commit-sha: ${{ github.sha }} + mdx-directory: "website/content" + nav-data-directory: "website/data" diff --git a/.github/workflows/check-plugin-docs.yml b/.github/workflows/check-plugin-docs.yml index 00ba2851ef8..c43ae9cb33c 100644 --- a/.github/workflows/check-plugin-docs.yml +++ b/.github/workflows/check-plugin-docs.yml @@ -23,9 +23,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup Node - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: '16.x' - name: Install Dependencies diff --git a/.github/workflows/create-release-branch.yml b/.github/workflows/create-release-branch.yml index 780087058b7..0d1f4f3953c 100644 --- a/.github/workflows/create-release-branch.yml +++ b/.github/workflows/create-release-branch.yml @@ -4,7 +4,7 @@ jobs: create-branch: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: hashicorp/actions-create-release-branch@v1 with: token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 2f426d16a03..93f8eeb1ae8 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -24,7 +24,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: 'Determine Go version' id: get-go-version run: | @@ -36,8 +36,8 @@ jobs: runs-on: ubuntu-latest name: Linux go tests steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: TESTARGS="-coverprofile=coverage.txt -covermode=atomic" make ci @@ -47,8 +47,8 @@ jobs: runs-on: macos-latest name: Darwin go tests steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go test ./... -coverprofile=coverage.txt -covermode=atomic @@ -58,8 +58,8 @@ jobs: runs-on: windows-latest name: Windows go tests steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go test ./... -coverprofile=coverage.txt -covermode=atomic diff --git a/.github/workflows/go-validate.yml b/.github/workflows/go-validate.yml index a3c45f794ff..d67b3aa5151 100644 --- a/.github/workflows/go-validate.yml +++ b/.github/workflows/go-validate.yml @@ -20,7 +20,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: 'Determine Go version' id: get-go-version run: | @@ -32,8 +32,8 @@ jobs: runs-on: ubuntu-latest name: Go Mod Tidy steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go mod tidy @@ -43,10 +43,10 @@ jobs: runs-on: ubuntu-latest name: Lint steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: fetch-depth: 0 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: echo "$GITHUB_SHA" @@ -59,8 +59,8 @@ jobs: runs-on: ubuntu-latest name: Fmt check steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: make fmt-check @@ -70,8 +70,8 @@ jobs: runs-on: ubuntu-latest name: Generate check steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: make generate-check diff --git a/.github/workflows/issue-comment-created.yml b/.github/workflows/issue-comment-created.yml index a5c112d2a15..f250dc1f101 100644 --- a/.github/workflows/issue-comment-created.yml +++ b/.github/workflows/issue-comment-created.yml @@ -12,10 +12,9 @@ jobs: permissions: contents: read # for actions/checkout to fetch code issues: write # for actions-ecosystem/action-remove-labels to remove issue labels - if: ${{contains(github.event.issue.labels.*.name, 'waiting-reply') || contains(github.event.issue.labels.*.name, 'stale')}} runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0 with: github_token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/issue-migrator.yml b/.github/workflows/issue-migrator.yml index 719cfa44f2f..9acc66ee6d4 100644 --- a/.github/workflows/issue-migrator.yml +++ b/.github/workflows/issue-migrator.yml @@ -12,7 +12,7 @@ jobs: if: startsWith(github.event.label.name, 'remote-plugin/') runs-on: ubuntu-latest steps: - - uses: bflad/action-migrate-issue@2e049d822b08e67d25b938343227051518f14d9a # v1.0.2 + - uses: bflad/action-migrate-issue@main # TSCCR: no entry for repository "bflad/action-migrate-issue" with: source-issue-comment: | This issue has been migrated to {target-issue-url} due to the [Packer Plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). diff --git a/.github/workflows/issues-opened.yml b/.github/workflows/issues-opened.yml index 565b89af048..57a8cd0cb65 100644 --- a/.github/workflows/issues-opened.yml +++ b/.github/workflows/issues-opened.yml @@ -13,8 +13,8 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: github/issue-labeler@98b5412841f6c4b0b3d9c29d53c13fad16bd7de2 # v3.2 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: github/issue-labeler@e24a3eb6b2e28c8904d086302a2b760647f5f45c # v3.1 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler-issue-triage.yml @@ -23,35 +23,24 @@ jobs: name: Redirect to discuss permissions: contents: read - issues: write # for actions/github-script to create comments and add labels + issues: write # for actions-ecosystem/action-create-comment to create comments if: contains(github.event.issue.labels.*.name, 'question') runs-on: ubuntu-latest steps: - - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + - uses: actions-ecosystem/action-create-comment@v1.0.2 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: ` - Hi 👋 thanks for reaching out. + github_token: ${{ secrets.GITHUB_TOKEN }} + body: | + Hi 👋 thanks for reaching out. - For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility. - As the GitHub issue tracker is only watched by a small subset of maintainers and is really reserved for bugs and enhancements, you'll have a better chance of finding someone who can help you in the forum. - We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response. - If no activity is taken on this question within 30 days it will be automatically closed. + For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility. + As the GitHub issue tracker is only watched by a small subset of maintainers and is really reserved for bugs and enhancements, you'll have a better chance of finding someone who can help you in the forum. + We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response. + If no activity is taken on this question within 30 days it will be automatically closed. - If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue.` - }) - - - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue. + - uses: actions-ecosystem/action-add-labels@v1.1.3 # TSCCR: no entry for repository "actions-ecosystem/action-add-labels" with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['needs-reply'] - }) + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: needs-reply diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index a3fa8cd7ea8..e0e82a97f01 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -11,11 +11,11 @@ jobs: sync: name: Sync to JIRA permissions: - issues: write # for actions/github-script to create comments + issues: write # for actions-ecosytem/action-create-comment runs-on: ubuntu-latest steps: - name: Login - uses: atlassian/gajira-login@ca13f8850ea309cf44a6e4e0c49d9aa48ac3ca4c # v3 + uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1 env: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} @@ -61,26 +61,26 @@ jobs: - name: Create ticket id: create-ticket if: steps.search.outputs.issue == '' && github.event.label.name == 'sync to jira' && steps.set-ticket-type.outputs.type != 'Invalid' - uses: atlassian/gajira-create@1ff0b6bd115a780592b47bfbb63fc4629132e6ec # v3 + uses: atlassian/gajira-create@59e177c4f6451399df5b4911c2211104f171e669 # v3.0.1 with: project: HPR issuetype: "${{ steps.set-ticket-type.outputs.type }}" summary: "${{ github.event.repository.name }}: ${{ github.event.issue.title }}" description: "${{ github.event.issue.body }}\n\n_Created from GitHub by ${{ github.actor }}._" # The field customfield_10089 refers to the Issue Link field in JIRA. - fields: '{ "customfield_10089": "${{ github.event.issue.html_url }}", "components": [{ "name": "OSS" }], "labels": ${{ steps.set-ticket-labels.outputs.labels }} }' + fields: '{ "customfield_10089": "${{ github.event.issue.html_url }}", + "components": [{ "name": "OSS" }], + "labels": ${{ steps.set-ticket-labels.outputs.labels }} }' - name: Add tracking comment if: steps.create-ticket.outputs.issue != '' && steps.set-ticket-type.outputs.type != 'Invalid' - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + uses: actions-ecosystem/action-create-comment@v1.0.0 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: ` - This issue has been synced to JIRA for planning. - JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}})` - }) + github_token: ${{ secrets.GITHUB_TOKEN }} + body: | + This issue has been synced to JIRA for planning. + + JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}}) + + diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index f1f17b35893..77f57ab0a7f 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -15,7 +15,7 @@ jobs: pull-requests: write # for dessant/lock-threads to lock PRs runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v4.0.1 + - uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836 # v4.0.0 with: github-token: ${{ github.token }} issue-comment: > diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index e63c05ea30d..ea388be057c 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -24,7 +24,7 @@ jobs: needs: build-artifacts runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Download built artifacts uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: @@ -38,12 +38,12 @@ jobs: echo "BUILD_OUTPUT_LIST=$(cat tmp2.txt | tr '\n' ',' | perl -ple 'chop')" >> $GITHUB_ENV rm -rf tmp.txt && rm -rf tmp2.txt - name: Advance nightly tag - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | try { - await github.rest.git.deleteRef({ + await github.git.deleteRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "tags/nightly" @@ -51,7 +51,7 @@ jobs: } catch (e) { console.log("Warning: The nightly tag doesn't exist yet, so there's nothing to do. Trace: " + e) } - await github.rest.git.createRef({ + await github.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "refs/tags/nightly", @@ -62,7 +62,7 @@ jobs: - name: Create a nightly GitHub prerelease id: create_prerelease continue-on-error: true - uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0 + uses: ncipollo/release-action@v1 # TSCCR: no entry for repository "ncipollo/release-action" with: name: nightly artifacts: "${{ env.BUILD_OUTPUT_LIST }}" @@ -85,7 +85,7 @@ jobs: - name: Retry failed nightly GitHub prerelease id: create_prerelease_retry if: steps.create_prerelease.outcome == 'failure' - uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0 + uses: ncipollo/release-action@v1 # TSCCR: no entry for repository "ncipollo/release-action" with: name: nightly artifacts: "${{ env.BUILD_OUTPUT_LIST }}" @@ -101,7 +101,7 @@ jobs: run: | echo "prerelease_id=${{ steps.create_prerelease_retry.outputs.id }}" >> $GITHUB_ENV - name: Publish nightly GitHub prerelease - uses: eregon/publish-release@46913fa2b3f7edc7345ae3c17f6d1b093a54916d # v1.0.5 + uses: eregon/publish-release@v1 # TSCCR: no entry for repository "eregon/publish-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -117,7 +117,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Send slack notification on failure - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 with: payload: | { diff --git a/.golangci.yml b/.golangci.yml index 656b0373ac5..ccd990c0040 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 issues: # List of regexps of issue texts to exclude, empty list by default. diff --git a/.release/ci.hcl b/.release/ci.hcl index 14dab1591d9..6ca7eb0de23 100644 --- a/.release/ci.hcl +++ b/.release/ci.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 schema = "1" diff --git a/.release/release-metadata.hcl b/.release/release-metadata.hcl index 05d0b9f3a81..0fb2456679e 100644 --- a/.release/release-metadata.hcl +++ b/.release/release-metadata.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 url_docker_registry_dockerhub = "https://hub.docker.com/r/hashicorp/packer" url_docker_registry_ecr = "https://gallery.ecr.aws/hashicorp/packer" diff --git a/.release/security-scan.hcl b/.release/security-scan.hcl index 12ef1d53388..7d3258126bc 100644 --- a/.release/security-scan.hcl +++ b/.release/security-scan.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 container { dependencies = false diff --git a/CHANGELOG.md b/CHANGELOG.md index 81da4bcc5e9..1007ccc32f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,94 +1,3 @@ -## 1.10.1 (Upcoming) - -## 1.10.0 (December 5, 2023) - -### NOTES: -This release contains breaking changes for practitioner relying on plugins - previously bundled into Packer. As specified in the [Bundled Plugins Removal announcement](https://www.hashicorp.com/blog/announcing-the-removal-of-bundled-plugins-in-hashicorp-packer) - HashiCorp maintained plugins will no longer be shipped with Packer. - Users are encouraged to use `packer init` or `packer plugins [...]` when managing required plugins - needed for executing their builds. - [GH-12660](https://github.com/hashicorp/packer/pull/12660) - -The affected plugins include: -* [packer-plugin-amazon](https://github.com/hashicorp/packer-plugin-amazon) -* [packer-plugin-ansible](https://github.com/hashicorp/packer-plugin-ansible) -* [packer-plugin-azure](https://github.com/hashicorp/packer-plugin-azure) -* [packer-plugin-docker](https://github.com/hashicorp/packer-plugin-docker) -* [packer-plugin-googlecompute](https://github.com/hashicorp/packer-plugin-googlecompute) -* [packer-plugin-qemu](https://github.com/hashicorp/packer-plugin-qemu) -* [packer-plugin-vagrant](https://github.com/hashicorp/packer-plugin-vagrant) -* [packer-plugin-virtualbox](https://github.com/hashicorp/packer-plugin-virtualbox) -* [packer-plugin-vmware](https://github.com/hashicorp/packer-plugin-vmware) -* [packer-plugin-vsphere](https://github.com/hashicorp/packer-plugin-vsphere) - -### SECURITY: -* Bump github.com/go-jose/go-jose/v3 to address GO-2023-2334. There have been - no reported issues with Packer but we are bumping given that it is a - secondary - dependency. [GH-12723](https://github.com/hashicorp/packer/pull/12723) -* Bump Go to 1.20.10 to Address CVE-2023-44487 / CVE-2023-39325. - [GH-12661](https://github.com/hashicorp/packer/pull/12661) -* Bump Go to 1.20.11 CVE-2023-45283. There have been no reported issues with - Packer but we are bumping given its usage of the path/filepath pkg. - [GH-12690](https://github.com/hashicorp/packer/pull/12690) -* Bump Packer Plugin SDK to v0.5.2. - [GH-12717](https://github.com/hashicorp/packer/pull/12717) - -### PLUGINS: - -* Removed all HashiCorp vendored plugins from being bundled into the Packer binary. -[GH-12660](https://github.com/hashicorp/packer/pull/12660), [GH-12720](https://github.com/hashicorp/packer/pull/12720) -* packer-plugin-hcloud: The Hetzner Cloud plugin has been handed over to the - Hetzner integrations team. New releases for this plugin are available at - https://github.com/hetznercloud/packer-plugin-hcloud. Existing references - to the plugin will continue to work but users are advised to update the - `required_plugins` block to use the new plugin source address. - ``` - required_plugins { - parallels = { - source = "github.com/hetznercloud/hcloud" - version = "~> 1" - } - } - ``` -### IMPROVEMENTS: -* cmd/init: Warn users running `packer init` on configuration templates with a - missing `required_plugins` blocks. - [GH-12638](https://github.com/hashicorp/packer/pull/12638) -* cmd/plugins: Add `--path` flag to `packer plugins install` subcommand to - support installation of plugins from a local binary rather than from - GitHub. [GH-12643](https://github.com/hashicorp/packer/pull/12643) -* cmd/plugins: Install SHA256SUM file with 0644 perms. - [GH-12665](https://github.com/hashicorp/packer/pull/12665) -* cmd/plugins: Remove SHA256SUM file on plugin removal. - [GH-12666](https://github.com/hashicorp/packer/pull/12666) -* cmd/plugins: Remove will error if it fails to find the plugin being selected - for removal. [GH-12669](https://github.com/hashicorp/packer/pull/12669) -* core/hcl2: Remove empty source file reference on unset variable errors. - [GH-12712](https://github.com/hashicorp/packer/pull/12712) -* core/hcl: Improve the recursive execution of data sources with other data - source dependencies. - [GH-12608](https://github.com/hashicorp/packer/pull/12608) -* core: Bump github.com/hashicorp/hcp-sdk-go from 0.73.0 to 0.74.0 - - [GH-12704](https://github.com/hashicorp/packer/pull/12704) -* core: Bump Packer Plugin SDK to v0.5.2. - [GH-12717](https://github.com/hashicorp/packer/pull/12717) -* core: Provide integration link as hint in error message if a plugin component - is unknown. [GH-12705](https://github.com/hashicorp/packer/pull/12705) -* core: Update version output for `packer -v` and `packer --version` to match - `packer version`. - [GH-12569](https://github.com/hashicorp/packer/pull/12569) -* docs: Update plugin installation guides with supported methods for 1.10.0 and - above. [GH-12713](https://github.com/hashicorp/packer/pull/12713) - -### BUG FIXES: - -* cmd/plugins: Update `packer plugin installed` to show all installed plugin - binaries, including any duplicate versions or binaries copied from a - different source URI. - [GH-12731](https://github.com/hashicorp/packer/pull/12731) - ## 1.9.5 (December 4, 2023) ### SECURITY @@ -287,15 +196,6 @@ if using HCL2, a `required_plugins` block to define a list of plugins to use for * Bumped gopsutil to v3. This fixes a macOS intermittent crash reported by the community [GH-12430](https://github.com/hashicorp/packer/issues/12430) -### HCP Packer -- Multi project support advisory - -If using HCP Packer to store metadata on your builds, please be aware that Packer -does not support this feature yet, and as such, having multiple projects in your -organization will make it impossible to use HCP Packer in this release. - -We are actively working on supporting this feature, which will be available in a -subsequent release. - ## 1.8.7 (May 4, 2023) ### NOTES: diff --git a/CODEOWNERS b/CODEOWNERS index b92152c7348..0efb6b1ac47 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -2,3 +2,5 @@ # release configuration +/.release/ @hashicorp/release-engineering +/.github/workflows/build.yml @hashicorp/release-engineering diff --git a/Dockerfile b/Dockerfile index 12c38fde6af..1b5ae54e942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # ======================================================================== # diff --git a/LICENSE b/LICENSE index 0918b4a93f4..c96665ef71f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,92 +1,375 @@ -License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved. -"Business Source License" is a trademark of MariaDB Corporation Ab. - -Parameters - -Licensor: HashiCorp, Inc. -Licensed Work: Packer Version 1.10.0 or later. The Licensed Work is (c) 2023 - HashiCorp, Inc. -Additional Use Grant: You may make production use of the Licensed Work, provided - Your use does not include offering the Licensed Work to third - parties on a hosted or embedded basis in order to compete with - HashiCorp's paid version(s) of the Licensed Work. For purposes - of this license: - - A "competitive offering" is a Product that is offered to third - parties on a paid basis, including through paid support - arrangements, that significantly overlaps with the capabilities - of HashiCorp's paid version(s) of the Licensed Work. If Your - Product is not a competitive offering when You first make it - generally available, it will not become a competitive offering - later due to HashiCorp releasing a new version of the Licensed - Work with additional capabilities. In addition, Products that - are not provided on a paid basis are not competitive. - - "Product" means software that is offered to end users to manage - in their own environments or offered as a service on a hosted - basis. - - "Embedded" means including the source code or executable code - from the Licensed Work in a competitive offering. "Embedded" - also means packaging the competitive offering in such a way - that the Licensed Work must be accessed or downloaded for the - competitive offering to operate. - - Hosting or using the Licensed Work(s) for internal purposes - within an organization is not considered a competitive - offering. HashiCorp considers your organization to include all - of your affiliates under common control. - - For binding interpretive guidance on using HashiCorp products - under the Business Source License, please visit our FAQ. - (https://www.hashicorp.com/license-faq) -Change Date: Four years from the date the Licensed Work is published. -Change License: MPL 2.0 - -For information about alternative licensing arrangements for the Licensed Work, -please contact licensing@hashicorp.com. - -Notice - -Business Source License 1.1 - -Terms - -The Licensor hereby grants you the right to copy, modify, create derivative -works, redistribute, and make non-production use of the Licensed Work. The -Licensor may make an Additional Use Grant, above, permitting limited production use. - -Effective on the Change Date, or the fourth anniversary of the first publicly -available distribution of a specific version of the Licensed Work under this -License, whichever comes first, the Licensor hereby grants you rights under -the terms of the Change License, and the rights granted in the paragraph -above terminate. - -If your use of the Licensed Work does not comply with the requirements -currently in effect as described in this License, you must purchase a -commercial license from the Licensor, its affiliated entities, or authorized -resellers, or you must refrain from using the Licensed Work. - -All copies of the original and modified Licensed Work, and derivative works -of the Licensed Work, are subject to this License. This License applies -separately for each version of the Licensed Work and the Change Date may vary -for each version of the Licensed Work released by Licensor. - -You must conspicuously display this License on each original or modified copy -of the Licensed Work. If you receive the Licensed Work in original or -modified form from a third party, the terms and conditions set forth in this -License apply to your use of that work. - -Any use of the Licensed Work in violation of this License will automatically -terminate your rights under this License for the current and all other -versions of the Licensed Work. - -This License does not grant you any right in any trademark or logo of -Licensor or its affiliates (provided that you may use a trademark or logo of -Licensor as expressly required by this License). - -TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -TITLE. +Copyright (c) 2013 HashiCorp, Inc. + +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/README.md b/README.md index 05a280b2b85..c6a6703d72a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,16 @@ # Packer -[![License: BUSL-1.1](https://img.shields.io/badge/License-BUSL--1.1-yellow.svg)](LICENSE) + [![Build Status](https://github.com/hashicorp/packer/actions/workflows/build.yml/badge.svg)](https://github.com/hashicorp/packer/actions/workflows/build.yml) [![Discuss](https://img.shields.io/badge/discuss-packer-3d89ff?style=flat)](https://discuss.hashicorp.com/c/packer) -=== +[![PkgGoDev](https://pkg.go.dev/badge/github.com/hashicorp/packer)](https://pkg.go.dev/github.com/hashicorp/packer) +[![GoReportCard][report-badge]][report] + +[github-badge]: https://github.com/hashicorp/packer/actions/workflows/build.yml/badge.svg +[appveyor-badge]: https://ci.appveyor.com/api/projects/status/miavlgnp989e5obc/branch/master?svg=true +[godoc-badge]: https://godoc.org/github.com/hashicorp/packer?status.svg +[godoc]: https://godoc.org/github.com/hashicorp/packer +[report-badge]: https://goreportcard.com/badge/github.com/hashicorp/packer +[report]: https://goreportcard.com/report/github.com/hashicorp/packer

@@ -15,31 +23,79 @@ from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer -supports various platforms through external plugin integrations, the full list of which can -be found at https://developer.hashicorp.com/packer/integrations. - -The images that Packer creates can easily be turned into [Vagrant](http://www.vagrantup.com) boxes. - -## Quick Start +comes out of the box with support for many platforms, the full list of which can +be found at https://www.packer.io/docs/builders. -### Packer +Support for other platforms can be added via plugins. -There is a great [introduction and getting started guide](https://learn.hashicorp.com/tutorials/packer/get-started-install-cli) -for building a Docker image on your local machine without using any paid cloud resources. +The images that Packer creates can easily be turned into +[Vagrant](http://www.vagrantup.com) boxes. -Alternatively, you can refer to [getting started with AWS](https://developer.hashicorp.com/packer/tutorials/aws-get-started) to -learn how to build a machine image for an external cloud provider. - -### HCP Packer - -HCP Packer registry stores Packer image metadata, enabling you to track your image lifecycle. +## Quick Start -To get started with building an AWS machine image to HCP Packer for referencing in Terraform refer -to the collection of [HCP Packer Tutorials](https://developer.hashicorp.com/packer/tutorials/hcp-get-started). +**Note:** There is a great +[introduction and getting started guide](https://learn.hashicorp.com/tutorials/packer/get-started-install-cli) +for those with a bit more patience. Otherwise, the quick start below +will get you up and running quickly, at the sacrifice of not explaining some +key points. + +First, [download a pre-built Packer +binary](https://www.packer.io/downloads.html) for your operating system or +[compile Packer +yourself](https://github.com/hashicorp/packer/blob/main/.github/CONTRIBUTING.md#setting-up-go). + +After Packer is installed, create your first template, which tells Packer +what platforms to build images for and how you want to build them. In our +case, we'll create a simple AMI that has Redis pre-installed. + +Save this file as `quick-start.pkr.hcl`. Export your AWS credentials as the +`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables. + +```hcl +variable "access_key" { + type = string + default = "${env("AWS_ACCESS_KEY_ID")}" +} + +variable "secret_key" { + type = string + default = "${env("AWS_SECRET_ACCESS_KEY")}" + sensitive = true +} + +locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } + +source "amazon-ebs" "quick-start" { + access_key = "${var.access_key}" + ami_name = "packer-example ${local.timestamp}" + instance_type = "t2.micro" + region = "us-east-1" + secret_key = "${var.secret_key}" + source_ami = "ami-af22d9b9" + ssh_username = "ubuntu" +} + +build { + sources = ["source.amazon-ebs.quick-start"] +} +``` + +Next, tell Packer to build the image: + +``` +$ packer build quick-start.pkr.hcl +... +``` + +Packer will build an AMI according to the "quick-start" template. The AMI +will be available in your AWS account. To delete the AMI, you must manually +delete it using the [AWS console](https://console.aws.amazon.com/). Packer +builds your images, it does not manage their lifecycle. Where they go, how +they're run, etc., is up to you. ## Documentation -Comprehensive documentation is viewable on the Packer website at https://developer.hashicorp.com/packer/docs. +Comprehensive documentation is viewable on the Packer website at https://www.packer.io/docs. ## Contributing to Packer @@ -62,4 +118,3 @@ What does **unmaintained** mean? If you are interested in maintaining an unmaintained or archived plugin, please reach out to us at packer@hashicorp.com. - diff --git a/acctest/plugin/bundled_plugin_test.go b/acctest/plugin/bundled_plugin_test.go new file mode 100644 index 00000000000..9f21dfac626 --- /dev/null +++ b/acctest/plugin/bundled_plugin_test.go @@ -0,0 +1,184 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package plugin + +import ( + _ "embed" + "errors" + "fmt" + "os" + "os/exec" + "strings" + "testing" + + "github.com/hashicorp/go-multierror" + amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance" + "github.com/hashicorp/packer-plugin-sdk/acctest" + "github.com/hashicorp/packer/hcl2template/addrs" +) + +//go:embed test-fixtures/basic_amazon_bundled.pkr.hcl +var basicAmazonBundledEbsTemplate string + +func TestAccBuildBundledPlugins(t *testing.T) { + plugin := addrs.Plugin{ + Hostname: "github.com", + Namespace: "hashicorp", + Type: "amazon", + } + testCase := &acctest.PluginTestCase{ + Name: "amazon-ebs_bundled_test", + Setup: func() error { + return cleanupPluginInstallation(plugin) + }, + Teardown: func() error { + helper := amazonacc.AMIHelper{ + Region: "us-east-1", + Name: "packer-plugin-bundled-amazon-ebs-test", + } + return helper.CleanUpAmi() + }, + Template: basicAmazonBundledEbsTemplate, + Type: "amazon-ebs", + Init: false, + Check: func(buildCommand *exec.Cmd, logfile string) error { + if buildCommand.ProcessState != nil { + if buildCommand.ProcessState.ExitCode() != 0 { + return fmt.Errorf("Bad exit code. Logfile: %s", logfile) + } + } + + rawLogs, err := os.ReadFile(logfile) + if err != nil { + return fmt.Errorf("failed to read logs: %s", err) + } + + var errs error + + logs := string(rawLogs) + + if !strings.Contains(logs, "Warning: Bundled plugins used") { + errs = multierror.Append(errs, errors.New("expected warning about bundled plugins used, did not find it")) + } + + if !strings.Contains(logs, "Then run 'packer init' to manage installation of the plugins") { + errs = multierror.Append(errs, errors.New("expected suggestion about packer init in logs, did not find it.")) + } + + return errs + }, + } + + acctest.TestPlugin(t, testCase) +} + +//go:embed test-fixtures/basic_amazon_with_required_plugins.pkr.hcl +var basicAmazonRequiredPluginEbsTemplate string + +func TestAccBuildBundledPluginsWithRequiredPlugins(t *testing.T) { + plugin := addrs.Plugin{ + Hostname: "github.com", + Namespace: "hashicorp", + Type: "amazon", + } + testCase := &acctest.PluginTestCase{ + Name: "amazon-ebs_with_required_plugins_test", + Setup: func() error { + return cleanupPluginInstallation(plugin) + }, + Teardown: func() error { + helper := amazonacc.AMIHelper{ + Region: "us-east-1", + Name: "packer-plugin-required-plugin-amazon-ebs-test", + } + return helper.CleanUpAmi() + }, + Template: basicAmazonRequiredPluginEbsTemplate, + Type: "amazon-ebs", + Init: false, + Check: func(buildCommand *exec.Cmd, logfile string) error { + if buildCommand.ProcessState != nil { + if buildCommand.ProcessState.ExitCode() != 1 { + return fmt.Errorf("Bad exit code. Logfile: %s", logfile) + } + } + + rawLogs, err := os.ReadFile(logfile) + if err != nil { + return fmt.Errorf("failed to read logs: %s", err) + } + + var errs error + + logs := string(rawLogs) + + if strings.Contains(logs, "Warning: Bundled plugins used") { + errs = multierror.Append(errs, errors.New("did not expect warning about bundled plugins used")) + } + + if !strings.Contains(logs, "Missing plugins") { + errs = multierror.Append(errs, errors.New("expected error about plugins required and not installed, did not find it")) + } + + return errs + }, + } + + acctest.TestPlugin(t, testCase) +} + +//go:embed test-fixtures/basic_amazon_bundled.json +var basicAmazonBundledEbsTemplateJSON string + +func TestAccBuildBundledPluginsJSON(t *testing.T) { + plugin := addrs.Plugin{ + Hostname: "github.com", + Namespace: "hashicorp", + Type: "amazon", + } + testCase := &acctest.PluginTestCase{ + Name: "amazon-ebs_bundled_test_json", + Setup: func() error { + return cleanupPluginInstallation(plugin) + }, + Teardown: func() error { + helper := amazonacc.AMIHelper{ + Region: "us-east-1", + Name: "packer-plugin-bundled-amazon-ebs-test-json", + } + return helper.CleanUpAmi() + }, + Template: basicAmazonBundledEbsTemplateJSON, + Type: "amazon-ebs", + Init: false, + Check: func(buildCommand *exec.Cmd, logfile string) error { + if buildCommand.ProcessState != nil { + if buildCommand.ProcessState.ExitCode() != 0 { + return fmt.Errorf("Bad exit code. Logfile: %s", logfile) + } + } + + rawLogs, err := os.ReadFile(logfile) + if err != nil { + return fmt.Errorf("failed to read logs: %s", err) + } + + var errs error + + logs := string(rawLogs) + + if !strings.Contains(logs, "Warning: Bundled plugins used") { + errs = multierror.Append(errs, errors.New("expected warning about bundled plugins, did not find it.")) + } + + if !strings.Contains(logs, "plugins with the 'packer plugins install' command") { + errs = multierror.Append(errs, errors.New("expected suggestion about packer plugins install in logs, did not find it.")) + } + + return errs + }, + } + + acctest.TestPlugin(t, testCase) +} diff --git a/acctest/plugin/component_acc_test.go b/acctest/plugin/component_acc_test.go index 53a49ad229c..e24e4c01492 100644 --- a/acctest/plugin/component_acc_test.go +++ b/acctest/plugin/component_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // component_acc_test.go should contain acceptance tests for plugin components // to make sure all component types can be discovered and started. @@ -13,6 +13,7 @@ import ( "os/exec" "testing" + amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance" "github.com/hashicorp/packer-plugin-sdk/acctest" "github.com/hashicorp/packer/hcl2template/addrs" ) @@ -31,6 +32,13 @@ func TestAccInitAndBuildBasicAmazonAmiDatasource(t *testing.T) { Setup: func() error { return cleanupPluginInstallation(plugin) }, + Teardown: func() error { + helper := amazonacc.AMIHelper{ + Region: "us-west-2", + Name: "packer-amazon-ami-test", + } + return helper.CleanUpAmi() + }, Template: basicAmazonAmiDatasourceHCL2Template, Type: "amazon-ami", Init: true, diff --git a/acctest/plugin/plugin_acc_test.go b/acctest/plugin/plugin_acc_test.go index b2afe7e8162..b83063f15f8 100644 --- a/acctest/plugin/plugin_acc_test.go +++ b/acctest/plugin/plugin_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // plugin_acc_test.go should contain acceptance tests for features related to // installing, discovering and running plugins. @@ -15,6 +15,7 @@ import ( "regexp" "testing" + amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance" "github.com/hashicorp/packer-plugin-sdk/acctest" "github.com/hashicorp/packer-plugin-sdk/acctest/testutils" "github.com/hashicorp/packer/hcl2template/addrs" @@ -35,6 +36,13 @@ func TestAccInitAndBuildBasicAmazonEbs(t *testing.T) { Setup: func() error { return cleanupPluginInstallation(plugin) }, + Teardown: func() error { + helper := amazonacc.AMIHelper{ + Region: "us-east-1", + Name: "packer-plugin-amazon-ebs-test", + } + return helper.CleanUpAmi() + }, Template: basicAmazonEbsHCL2Template, Type: "amazon-ebs", Init: true, diff --git a/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl b/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl index 207530aa26f..aa7104a68ce 100644 --- a/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl +++ b/acctest/plugin/test-fixtures/basic-amazon-ami-datasource.pkr.hcl @@ -1,7 +1,7 @@ packer { required_plugins { amazon = { - version = "~>1" + version = ">= 0.0.1" source = "github.com/hashicorp/amazon" } } diff --git a/acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl b/acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl index daaec2feb7f..aa9399a9239 100644 --- a/acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl +++ b/acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl @@ -1,19 +1,18 @@ packer { required_plugins { amazon = { - version = "~> 1" - source = "github.com/hashicorp/amazon" + version = ">= 0.0.1" + source = "github.com/hashicorp/amazon" } } } source "amazon-ebs" "basic-test" { - region = "us-east-1" - instance_type = "m3.medium" - source_ami = "ami-76b2a71e" - ssh_username = "ubuntu" - ami_name = "packer-plugin-amazon-ebs-test" - skip_create_ami = true + region = "us-east-1" + instance_type = "m3.medium" + source_ami = "ami-76b2a71e" + ssh_username = "ubuntu" + ami_name = "packer-plugin-amazon-ebs-test" } build { diff --git a/acctest/plugin/test-fixtures/basic_amazon_bundled.json b/acctest/plugin/test-fixtures/basic_amazon_bundled.json new file mode 100644 index 00000000000..f674cd130d1 --- /dev/null +++ b/acctest/plugin/test-fixtures/basic_amazon_bundled.json @@ -0,0 +1,10 @@ +{ + "builders": [{ + "type": "amazon-ebs", + "region": "us-east-1", + "instance_type": "m3.medium", + "source_ami": "ami-76b2a71e", + "ssh_username": "ubuntu", + "ami_name": "packer-plugin-bundled-amazon-ebs-test-json" + }] +} diff --git a/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl b/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl new file mode 100644 index 00000000000..c17a09df04f --- /dev/null +++ b/acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl @@ -0,0 +1,11 @@ +source "amazon-ebs" "basic-test" { + region = "us-east-1" + instance_type = "m3.medium" + source_ami = "ami-76b2a71e" + ssh_username = "ubuntu" + ami_name = "packer-plugin-bundled-amazon-ebs-test" +} + +build { + sources = ["source.amazon-ebs.basic-test"] +} diff --git a/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl b/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl new file mode 100644 index 00000000000..a30f85fa49e --- /dev/null +++ b/acctest/plugin/test-fixtures/basic_amazon_with_required_plugins.pkr.hcl @@ -0,0 +1,20 @@ +packer { + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon", + version = "~> 1" + } + } +} + +source "amazon-ebs" "basic-test" { + region = "us-east-1" + instance_type = "m3.medium" + source_ami = "ami-76b2a71e" + ssh_username = "ubuntu" + ami_name = "packer-plugin-external-amazon-ebs-test" +} + +build { + sources = ["source.amazon-ebs.basic-test"] +} diff --git a/acctest/testing.go b/acctest/testing.go index f88d2dde3e9..e24b64324f5 100644 --- a/acctest/testing.go +++ b/acctest/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acctest @@ -136,9 +136,6 @@ func Test(t TestT, c TestCase) { Components: packer.ComponentFinder{ PluginConfig: &packer.PluginConfig{ Builders: TestBuilderSet{ - BuilderSet: packersdk.MapOfBuilder{ - "test": func() (packersdk.Builder, error) { return c.Builder, nil }, - }, StartFn: func(n string) (packersdk.Builder, error) { if n == "test" { return c.Builder, nil diff --git a/acctest/testing_test.go b/acctest/testing_test.go index 85364bd1154..71247d4cef7 100644 --- a/acctest/testing_test.go +++ b/acctest/testing_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acctest diff --git a/background_check.go b/background_check.go index 30a0a65e2d5..3eaf7ee2348 100644 --- a/background_check.go +++ b/background_check.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !openbsd // +build !openbsd diff --git a/background_check_openbsd.go b/background_check_openbsd.go index 0fc5574ba9c..ff2ef4b0ef2 100644 --- a/background_check_openbsd.go +++ b/background_check_openbsd.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/builder/file/artifact.go b/builder/file/artifact.go index 4c33f6d45a3..9b9ed8ef949 100644 --- a/builder/file/artifact.go +++ b/builder/file/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package file diff --git a/builder/file/artifact_test.go b/builder/file/artifact_test.go index 02df6c2ae4e..ea799e12f5f 100644 --- a/builder/file/artifact_test.go +++ b/builder/file/artifact_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package file diff --git a/builder/file/builder.go b/builder/file/builder.go index 0f79c958fe8..1e8d7d08fc6 100644 --- a/builder/file/builder.go +++ b/builder/file/builder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package file diff --git a/builder/file/builder_test.go b/builder/file/builder_test.go index 5248318a4dc..ede2e032470 100644 --- a/builder/file/builder_test.go +++ b/builder/file/builder_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package file diff --git a/builder/file/config.go b/builder/file/config.go index 244490a36da..017355ee6c7 100644 --- a/builder/file/config.go +++ b/builder/file/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/builder/file/config_test.go b/builder/file/config_test.go index b6692495b9d..60d3553a1f9 100644 --- a/builder/file/config_test.go +++ b/builder/file/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package file diff --git a/builder/file/version/version.go b/builder/file/version/version.go index 2136829ae88..3cb6b9ec19e 100644 --- a/builder/file/version/version.go +++ b/builder/file/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/builder/null/artifact_export.go b/builder/null/artifact_export.go index 5a685629072..f9ec6d825cd 100644 --- a/builder/null/artifact_export.go +++ b/builder/null/artifact_export.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package null diff --git a/builder/null/artifact_export_test.go b/builder/null/artifact_export_test.go index 265b8d36781..ffa668865ec 100644 --- a/builder/null/artifact_export_test.go +++ b/builder/null/artifact_export_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package null diff --git a/builder/null/builder.go b/builder/null/builder.go index a9a53dbd7e8..9b660bd24f9 100644 --- a/builder/null/builder.go +++ b/builder/null/builder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package null diff --git a/builder/null/builder_test.go b/builder/null/builder_test.go index fdb52031d7a..b50d1484ff9 100644 --- a/builder/null/builder_test.go +++ b/builder/null/builder_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package null diff --git a/builder/null/config.go b/builder/null/config.go index 24ee61ed6fb..b240d57d98d 100644 --- a/builder/null/config.go +++ b/builder/null/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/builder/null/config_test.go b/builder/null/config_test.go index 67d35f66972..1123d470e09 100644 --- a/builder/null/config_test.go +++ b/builder/null/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package null diff --git a/builder/null/ssh.go b/builder/null/ssh.go index fbffbb13a3c..f79bdd1eed4 100644 --- a/builder/null/ssh.go +++ b/builder/null/ssh.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package null diff --git a/builder/null/version/version.go b/builder/null/version/version.go index 27e53e312d1..f3b8cb444e1 100644 --- a/builder/null/version/version.go +++ b/builder/null/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/checkpoint.go b/checkpoint.go index 380cdd6bf29..5ca534ea8d4 100644 --- a/checkpoint.go +++ b/checkpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/cmd/generate-fixer-deprecations/main.go b/cmd/generate-fixer-deprecations/main.go index 4316a1605a0..a3e76547428 100644 --- a/cmd/generate-fixer-deprecations/main.go +++ b/cmd/generate-fixer-deprecations/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/cmd/ssh-keygen/main.go b/cmd/ssh-keygen/main.go index c29edf76e7e..5a759b165f5 100644 --- a/cmd/ssh-keygen/main.go +++ b/cmd/ssh-keygen/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/command/build.go b/command/build.go index c9f7a537d1c..842938adcb9 100644 --- a/command/build.go +++ b/command/build.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -43,7 +43,7 @@ func (c *BuildCommand) Run(args []string) int { func (c *BuildCommand) ParseArgs(args []string) (*BuildArgs, int) { var cfg BuildArgs - flags := c.Meta.FlagSet("build") + flags := c.Meta.FlagSet("build", FlagSetBuildFilter|FlagSetVars) flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { @@ -94,6 +94,8 @@ func (c *BuildCommand) RunContext(buildCtx context.Context, cla *BuildArgs) int } diags = packerStarter.Initialize(packer.InitializeOptions{}) + bundledDiags := c.DetectBundledPlugins(packerStarter) + diags = append(bundledDiags, diags...) ret = writeDiags(c.Ui, nil, diags) if ret != 0 { return ret diff --git a/command/build_cancellation_test.go b/command/build_cancellation_test.go index 0ada639074a..348b1d9180e 100644 --- a/command/build_cancellation_test.go +++ b/command/build_cancellation_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/build_cleanup_script_test.go b/command/build_cleanup_script_test.go index 35639a4f4a9..82f7fdd94e4 100644 --- a/command/build_cleanup_script_test.go +++ b/command/build_cleanup_script_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/build_parallel_test.go b/command/build_parallel_test.go index 4bebc65cee8..09e994e9e5d 100644 --- a/command/build_parallel_test.go +++ b/command/build_parallel_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/build_test.go b/command/build_test.go index de476fdb0c4..f6b8aa06f8b 100644 --- a/command/build_test.go +++ b/command/build_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/build_timeout_test.go b/command/build_timeout_test.go index d97485b3490..9896894ec2b 100644 --- a/command/build_timeout_test.go +++ b/command/build_timeout_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/build_windows_test.go b/command/build_windows_test.go index b18f4e3153a..5c99cd95786 100644 --- a/command/build_windows_test.go +++ b/command/build_windows_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/cli.go b/command/cli.go index 2dfc57dbd0d..de47a735c22 100644 --- a/command/cli.go +++ b/command/cli.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -104,7 +104,6 @@ type BuildArgs struct { func (ia *InitArgs) AddFlagSets(flags *flag.FlagSet) { flags.BoolVar(&ia.Upgrade, "upgrade", false, "upgrade any present plugin to the highest allowed version.") - flags.BoolVar(&ia.Force, "force", false, "force installation of a plugin, even if already installed") ia.MetaArgs.AddFlagSets(flags) } @@ -113,7 +112,6 @@ func (ia *InitArgs) AddFlagSets(flags *flag.FlagSet) { type InitArgs struct { MetaArgs Upgrade bool - Force bool } // PluginsRequiredArgs represents a parsed cli line for a `packer plugins required ` diff --git a/command/command_test.go b/command/command_test.go index 712e9300496..870cd3a0e20 100644 --- a/command/command_test.go +++ b/command/command_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/config_file_unix.go b/command/config_file_unix.go index ec3932f9e0b..31a8db0ee44 100644 --- a/command/config_file_unix.go +++ b/command/config_file_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris diff --git a/command/config_file_windows.go b/command/config_file_windows.go index ede0a618687..52cdf420c7c 100644 --- a/command/config_file_windows.go +++ b/command/config_file_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/command/console.go b/command/console.go index da24a06150e..54281fdd6ed 100644 --- a/command/console.go +++ b/command/console.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -43,7 +43,7 @@ func (c *ConsoleCommand) Run(args []string) int { func (c *ConsoleCommand) ParseArgs(args []string) (*ConsoleArgs, int) { var cfg ConsoleArgs - flags := c.Meta.FlagSet("console") + flags := c.Meta.FlagSet("console", FlagSetVars) flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/console_test.go b/command/console_test.go index 7b4bbc7d7b8..b8c4989ff99 100644 --- a/command/console_test.go +++ b/command/console_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/enumflag/flag.go b/command/enumflag/flag.go index c50e70b0714..cbb58769190 100644 --- a/command/enumflag/flag.go +++ b/command/enumflag/flag.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package enumflag diff --git a/command/exec_test.go b/command/exec_test.go index debb2dacbf9..cfdbda66c3a 100644 --- a/command/exec_test.go +++ b/command/exec_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -11,6 +11,7 @@ import ( "runtime" "testing" + "github.com/hashicorp/packer-plugin-amazon/builder/ebs" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer/builder/file" "github.com/hashicorp/packer/builder/null" @@ -120,8 +121,10 @@ func getBareComponentFinder() packer.ComponentFinder { return packer.ComponentFinder{ PluginConfig: &packer.PluginConfig{ Builders: packer.MapOfBuilder{ - "file": func() (packersdk.Builder, error) { return &file.Builder{}, nil }, - "null": func() (packersdk.Builder, error) { return &null.Builder{}, nil }, + "file": func() (packersdk.Builder, error) { return &file.Builder{}, nil }, + "null": func() (packersdk.Builder, error) { return &null.Builder{}, nil }, + "amazon-ebs": func() (packersdk.Builder, error) { return &ebs.Builder{}, nil }, + "azure-arm": func() (packersdk.Builder, error) { return &ebs.Builder{}, nil }, }, Provisioners: packer.MapOfProvisioner{ "shell-local": func() (packersdk.Provisioner, error) { return &shell_local.Provisioner{}, nil }, diff --git a/command/fix.go b/command/fix.go index 07bc8021e80..893c788ef8d 100644 --- a/command/fix.go +++ b/command/fix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -36,7 +36,7 @@ func (c *FixCommand) Run(args []string) int { func (c *FixCommand) ParseArgs(args []string) (*FixArgs, int) { var cfg FixArgs - flags := c.Meta.FlagSet("fix") + flags := c.Meta.FlagSet("fix", FlagSetNone) flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/fix_test.go b/command/fix_test.go index 1c916b56b2a..d092a8091c4 100644 --- a/command/fix_test.go +++ b/command/fix_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/flag-kv/flag.go b/command/flag-kv/flag.go index 4361545ab2f..96cda3120ce 100644 --- a/command/flag-kv/flag.go +++ b/command/flag-kv/flag.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kvflag diff --git a/command/flag-kv/flag_json.go b/command/flag-kv/flag_json.go index 290bb4aa837..25d34ef5de5 100644 --- a/command/flag-kv/flag_json.go +++ b/command/flag-kv/flag_json.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kvflag diff --git a/command/flag-kv/flag_json_test.go b/command/flag-kv/flag_json_test.go index d22f3545fd5..ab8a67e0ba3 100644 --- a/command/flag-kv/flag_json_test.go +++ b/command/flag-kv/flag_json_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kvflag diff --git a/command/flag-kv/flag_strings.go b/command/flag-kv/flag_strings.go index f99122ec971..d639bde6abb 100644 --- a/command/flag-kv/flag_strings.go +++ b/command/flag-kv/flag_strings.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kvflag diff --git a/command/flag-kv/flag_strings_test.go b/command/flag-kv/flag_strings_test.go index 721265d1e52..070e95c0d48 100644 --- a/command/flag-kv/flag_strings_test.go +++ b/command/flag-kv/flag_strings_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kvflag diff --git a/command/flag-kv/flag_test.go b/command/flag-kv/flag_test.go index 5aed4ef33db..28644119578 100644 --- a/command/flag-kv/flag_test.go +++ b/command/flag-kv/flag_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kvflag diff --git a/command/flag-slice/flag.go b/command/flag-slice/flag.go index 7f8b9db269c..b75580ec227 100644 --- a/command/flag-slice/flag.go +++ b/command/flag-slice/flag.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package sliceflag diff --git a/command/flag-slice/flag_test.go b/command/flag-slice/flag_test.go index fd225889284..d70b270b53b 100644 --- a/command/flag-slice/flag_test.go +++ b/command/flag-slice/flag_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package sliceflag diff --git a/command/fmt.go b/command/fmt.go index 3a70bcf187d..9cfaa46b8d4 100644 --- a/command/fmt.go +++ b/command/fmt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -28,7 +28,7 @@ func (c *FormatCommand) Run(args []string) int { func (c *FormatCommand) ParseArgs(args []string) (*FormatArgs, int) { var cfg FormatArgs - flags := c.Meta.FlagSet("format") + flags := c.Meta.FlagSet("format", FlagSetNone) flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/fmt_test.go b/command/fmt_test.go index 7d9f3b11979..516fb6acca9 100644 --- a/command/fmt_test.go +++ b/command/fmt_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index 08ffa767e99..08b7d2ad745 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -29,6 +29,42 @@ import ( "github.com/zclconf/go-cty/cty" ) +type HCL2UpgradeCommand struct { + Meta +} + +func (c *HCL2UpgradeCommand) Run(args []string) int { + ctx, cleanup := handleTermInterrupt(c.Ui) + defer cleanup() + + cfg, ret := c.ParseArgs(args) + if ret != 0 { + return ret + } + + return c.RunContext(ctx, cfg) +} + +func (c *HCL2UpgradeCommand) ParseArgs(args []string) (*HCL2UpgradeArgs, int) { + var cfg HCL2UpgradeArgs + flags := c.Meta.FlagSet("hcl2_upgrade", FlagSetNone) + flags.Usage = func() { c.Ui.Say(c.Help()) } + cfg.AddFlagSets(flags) + if err := flags.Parse(args); err != nil { + return &cfg, 1 + } + args = flags.Args() + if len(args) != 1 { + flags.Usage() + return &cfg, 1 + } + cfg.Path = args[0] + if cfg.OutputFile == "" { + cfg.OutputFile = cfg.Path + ".pkr.hcl" + } + return &cfg, 0 +} + const ( hcl2UpgradeFileHeader = `# This file was autogenerated by the 'packer hcl2_upgrade' command. We # recommend double checking that everything is correct before going forward. We @@ -94,60 +130,6 @@ var ( strftime = false ) -// knownPlugins represent the HashiCorp maintained plugins the we can confidently -// construct a required plugins block for. -var knownPlugins = map[string]string{ - "amazon": "github.com/hashicorp/amazon", - "ansible": "github.com/hashicorp/ansible", - "azure": "github.com/hashicorp/azure", - "docker": "github.com/hashicorp/docker", - "googlecompute": "github.com/hashicorp/googlecompute", - "qemu": "github.com/hashicorp/qemu", - "vagrant": "github.com/hashicorp/vagrant", - "virtualbox": "github.com/hashicorp/virtualbox", - "vmware": "github.com/hashicorp/vmware", - "vsphere": "github.com/hashicorp/vsphere", -} - -// unknownPluginName represents any plugin not in knownPlugins or bundled into Packer -const unknownPluginName string = "unknown" - -type HCL2UpgradeCommand struct { - Meta -} - -func (c *HCL2UpgradeCommand) Run(args []string) int { - ctx, cleanup := handleTermInterrupt(c.Ui) - defer cleanup() - - cfg, ret := c.ParseArgs(args) - if ret != 0 { - return ret - } - - return c.RunContext(ctx, cfg) -} - -func (c *HCL2UpgradeCommand) ParseArgs(args []string) (*HCL2UpgradeArgs, int) { - var cfg HCL2UpgradeArgs - flags := c.Meta.FlagSet("hcl2_upgrade") - flags.Usage = func() { c.Ui.Say(c.Help()) } - cfg.AddFlagSets(flags) - if err := flags.Parse(args); err != nil { - return &cfg, 1 - } - args = flags.Args() - if len(args) != 1 { - flags.Usage() - return &cfg, 1 - } - cfg.Path = args[0] - if cfg.OutputFile == "" { - cfg.OutputFile = cfg.Path + ".pkr.hcl" - } - return &cfg, 0 -} - type BlockParser interface { Parse(*template.Template) error Write(*bytes.Buffer) @@ -187,6 +169,7 @@ func (c *HCL2UpgradeCommand) RunContext(_ context.Context, cla *HCL2UpgradeArgs) tpl := core.Template // Parse blocks + packerBlock := &PackerParser{ WithAnnotations: cla.WithAnnotations, } @@ -844,28 +827,28 @@ func gatherPluginsFromTemplate(tpl *template.Template) []string { plugins := map[string]struct{}{} for _, b := range tpl.Builders { - name := knownPluginComponent(b.Type) - if name == unknownPluginName { - continue + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(b.Type, prefix) { + plugins[plugin] = struct{}{} + } } - plugins[knownPlugins[name]] = struct{}{} } for _, p := range tpl.Provisioners { - name := knownPluginComponent(p.Type) - if name == unknownPluginName { - continue + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(p.Type, prefix) { + plugins[plugin] = struct{}{} + } } - plugins[knownPlugins[name]] = struct{}{} } for _, pps := range tpl.PostProcessors { for _, pp := range pps { - name := knownPluginComponent(pp.Type) - if name == unknownPluginName { - continue + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(pp.Type, prefix) { + plugins[plugin] = struct{}{} + } } - plugins[knownPlugins[name]] = struct{}{} } } @@ -1199,17 +1182,18 @@ type SourceParser struct { } func (p *SourceParser) Parse(tpl *template.Template) error { + var unknownBuilders []string if p.out == nil { p.out = []byte{} } - - var unknownBuilders []string for i, builderCfg := range p.Builders { sourcesContent := hclwrite.NewEmptyFile() body := sourcesContent.Body() + body.AppendNewline() - if !p.BuilderPlugins.Has(builderCfg.Type) && knownPluginComponent(builderCfg.Type) == unknownPluginName { + if !p.BuilderPlugins.Has(builderCfg.Type) { unknownBuilders = append(unknownBuilders, builderCfg.Type) + } if builderCfg.Name == "" || builderCfg.Name == builderCfg.Type { builderCfg.Name = fmt.Sprintf("autogenerated_%d", i+1) @@ -1222,11 +1206,9 @@ func (p *SourceParser) Parse(tpl *template.Template) error { p.out = append(p.out, transposeTemplatingCalls(sourcesContent.Bytes())...) } - // TODO update to output to stderr as opposed to having the command exit 1 if len(unknownBuilders) > 0 { return fmt.Errorf("unknown builder type(s): %v\n", unknownBuilders) } - return nil } @@ -1430,12 +1412,3 @@ func fixQuoting(old string) string { return string(body) } - -func knownPluginComponent(component string) string { - for prefix := range knownPlugins { - if strings.HasPrefix(component, prefix) { - return prefix - } - } - return unknownPluginName -} diff --git a/command/hcl2_upgrade_test.go b/command/hcl2_upgrade_test.go index 9a3833f909e..353fe4c980d 100644 --- a/command/hcl2_upgrade_test.go +++ b/command/hcl2_upgrade_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -19,22 +19,22 @@ func Test_hcl2_upgrade(t *testing.T) { exitCode int exitEarly bool }{ - {folder: "unknown_builder", flags: []string{}, exitCode: 1}, // warn for unknown components not tracked in knownPluginPrefixes - {folder: "complete", flags: []string{"-with-annotations"}, exitCode: 0}, - {folder: "without-annotations", flags: []string{}, exitCode: 0}, - {folder: "minimal", flags: []string{"-with-annotations"}, exitCode: 0}, - {folder: "source-name", flags: []string{"-with-annotations"}, exitCode: 0}, - {folder: "error-cleanup-provisioner", flags: []string{"-with-annotations"}, exitCode: 0}, - {folder: "aws-access-config", flags: []string{}, exitCode: 0}, - {folder: "escaping", flags: []string{}, exitCode: 0}, - {folder: "vsphere_linux_options_and_network_interface", flags: []string{}, exitCode: 0}, //do not warn for known uninstalled plugins components + {folder: "unknown_builder", flags: []string{}, exitCode: 1}, + {folder: "complete", flags: []string{"-with-annotations"}}, + {folder: "without-annotations", flags: []string{}}, + {folder: "minimal", flags: []string{"-with-annotations"}}, + {folder: "source-name", flags: []string{"-with-annotations"}}, + {folder: "error-cleanup-provisioner", flags: []string{"-with-annotations"}}, + {folder: "aws-access-config", flags: []string{}}, + {folder: "escaping", flags: []string{}}, + {folder: "vsphere_linux_options_and_network_interface", exitCode: 1, flags: []string{}}, {folder: "nonexistent", flags: []string{}, exitCode: 1, exitEarly: true}, {folder: "placeholders", flags: []string{}, exitCode: 0}, {folder: "ami_test", flags: []string{}, exitCode: 0}, {folder: "azure_shg", flags: []string{}, exitCode: 0}, - {folder: "variables-only", flags: []string{}, exitCode: 0}, - {folder: "variables-with-variables", flags: []string{}, exitCode: 0}, - {folder: "complete-variables-with-template-engine", flags: []string{}, exitCode: 0}, + {folder: "variables-only", flags: []string{}}, + {folder: "variables-with-variables", flags: []string{}}, + {folder: "complete-variables-with-template-engine", flags: []string{}}, {folder: "undeclared-variables", flags: []string{}, exitCode: 0}, {folder: "varfile-with-no-variables-block", flags: []string{}, exitCode: 0}, {folder: "bundled-plugin-used", flags: []string{}, exitCode: 0}, diff --git a/command/init.go b/command/init.go index 9e5b82f04ba..28b5f1fbbb1 100644 --- a/command/init.go +++ b/command/init.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -11,7 +11,6 @@ import ( "runtime" "strings" - gversion "github.com/hashicorp/go-version" pluginsdk "github.com/hashicorp/packer-plugin-sdk/plugin" "github.com/hashicorp/packer/packer" plugingetter "github.com/hashicorp/packer/packer/plugin-getter" @@ -38,7 +37,7 @@ func (c *InitCommand) Run(args []string) int { func (c *InitCommand) ParseArgs(args []string) (*InitArgs, int) { var cfg InitArgs - flags := c.Meta.FlagSet("init") + flags := c.Meta.FlagSet("init", 0) flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { @@ -121,21 +120,16 @@ for more info.`) return 1 } - if len(installs) > 0 { - if !cla.Force && !cla.Upgrade { - continue - } + log.Printf("[TRACE] for plugin %s found %d matching installation(s)", pluginRequirement.Identifier, len(installs)) - if cla.Force && !cla.Upgrade { - pluginRequirement.VersionConstraints, _ = gversion.NewConstraint(fmt.Sprintf("=%s", installs[len(installs)-1].Version)) - } + if len(installs) > 0 && cla.Upgrade == false { + continue } newInstall, err := pluginRequirement.InstallLatest(plugingetter.InstallOptions{ InFolders: opts.FromFolders, BinaryInstallationOptions: opts.BinaryInstallationOptions, Getters: getters, - Force: cla.Force, }) if err != nil { c.Ui.Error(fmt.Sprintf("Failed getting the %q plugin:", pluginRequirement.Identifier)) @@ -169,8 +163,6 @@ Options: version, if there is a new higher one. Note that this still takes into consideration the version constraint of the config. - -force Forces reinstallation of plugins, even if already - installed. ` return strings.TrimSpace(helpText) diff --git a/command/init_test.go b/command/init_test.go index 57ab1781d04..cfa1abb47ae 100644 --- a/command/init_test.go +++ b/command/init_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build amd64 && (darwin || windows || linux) diff --git a/command/inspect.go b/command/inspect.go index 7e5ed316650..827d61f70b1 100644 --- a/command/inspect.go +++ b/command/inspect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -28,7 +28,7 @@ func (c *InspectCommand) Run(args []string) int { func (c *InspectCommand) ParseArgs(args []string) (*InspectArgs, int) { var cfg InspectArgs - flags := c.Meta.FlagSet("inspect") + flags := c.Meta.FlagSet("inspect", FlagSetVars) flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/inspect_test.go b/command/inspect_test.go index f417b4cdc09..0d87ee71a71 100644 --- a/command/inspect_test.go +++ b/command/inspect_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/meta.go b/command/meta.go index 9807df78b5d..c31189263b9 100644 --- a/command/meta.go +++ b/command/meta.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -9,7 +9,9 @@ import ( "fmt" "io" "os" + "strings" + "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclparse" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template" @@ -20,6 +22,16 @@ import ( "github.com/hashicorp/packer/version" ) +// FlagSetFlags is an enum to define what flags are present in the +// default FlagSet returned by Meta.FlagSet +type FlagSetFlags uint + +const ( + FlagSetNone FlagSetFlags = 0 + FlagSetBuildFilter FlagSetFlags = 1 << iota + FlagSetVars +) + // Meta contains the meta-options and functionality that nearly every // Packer command inherits. type Meta struct { @@ -60,8 +72,11 @@ func (m *Meta) Core(tpl *template.Template, cla *MetaArgs) (*packer.Core, error) return core, nil } -// FlagSet returns a FlagSet with Packer SDK Ui support built-in -func (m *Meta) FlagSet(n string) *flag.FlagSet { +// FlagSet returns a FlagSet with the common flags that every +// command implements. The exact behavior of FlagSet can be configured +// using the flags as the second parameter, for example to disable +// build settings on the commands that don't handle builds. +func (m *Meta) FlagSet(n string, _ FlagSetFlags) *flag.FlagSet { f := flag.NewFlagSet(n, flag.ContinueOnError) // Create an io.Writer that writes to our Ui properly for errors. @@ -166,3 +181,179 @@ func (m *Meta) GetConfigFromJSON(cla *MetaArgs) (packer.Handler, int) { } return core, ret } + +func (m *Meta) DetectBundledPlugins(handler packer.Handler) hcl.Diagnostics { + var plugins []string + + switch h := handler.(type) { + case *packer.Core: + plugins = m.detectBundledPluginsJSON(h) + case *hcl2template.PackerConfig: + plugins = m.detectBundledPluginsHCL2(handler.(*hcl2template.PackerConfig)) + } + + if len(plugins) == 0 { + return nil + } + + packer.CheckpointReporter.SetBundledUsage() + + buf := &strings.Builder{} + buf.WriteString("This template relies on the use of plugins bundled into the Packer binary.\n") + buf.WriteString("The practice of bundling external plugins into Packer will be removed in an upcoming version.\n\n") + switch h := handler.(type) { + case *packer.Core: + buf.WriteString("To remove this warning and ensure builds keep working you can install these external plugins with the 'packer plugins install' command\n\n") + + for _, plugin := range plugins { + fmt.Fprintf(buf, "* packer plugins install %s\n", plugin) + } + + buf.WriteString("\nAlternatively, if you upgrade your templates to HCL2, you can use 'packer init' with a 'required_plugins' block to automatically install external plugins.\n\n") + fmt.Fprintf(buf, "You can try HCL2 by running 'packer hcl2_upgrade %s'", h.Template.Path) + case *hcl2template.PackerConfig: + buf.WriteString("To remove this warning, add the following section to your template:\n") + buf.WriteString(m.fixRequiredPlugins(h)) + buf.WriteString("\nThen run 'packer init' to manage installation of the plugins") + } + + return hcl.Diagnostics{ + &hcl.Diagnostic{ + Severity: hcl.DiagWarning, + Summary: "Bundled plugins used", + Detail: buf.String(), + }, + } +} + +func (m *Meta) detectBundledPluginsJSON(core *packer.Core) []string { + bundledPlugins := map[string]struct{}{} + + tmpl := core.Template + if tmpl == nil { + panic("No template parsed. This is a Packer bug which should be reported, please open an issue on the project's issue tracker.") + } + + for _, b := range tmpl.Builders { + builderType := fmt.Sprintf("packer-builder-%s", b.Type) + if bundledStatus[builderType] { + bundledPlugins[builderType] = struct{}{} + } + } + + for _, p := range tmpl.Provisioners { + provisionerType := fmt.Sprintf("packer-provisioner-%s", p.Type) + if bundledStatus[provisionerType] { + bundledPlugins[provisionerType] = struct{}{} + } + } + + for _, pps := range tmpl.PostProcessors { + for _, pp := range pps { + postProcessorType := fmt.Sprintf("packer-post-processor-%s", pp.Type) + if bundledStatus[postProcessorType] { + bundledPlugins[postProcessorType] = struct{}{} + } + } + } + + return compileBundledPluginList(bundledPlugins) +} + +var knownPluginPrefixes = map[string]string{ + "amazon": "github.com/hashicorp/amazon", + "ansible": "github.com/hashicorp/ansible", + "azure": "github.com/hashicorp/azure", + "docker": "github.com/hashicorp/docker", + "googlecompute": "github.com/hashicorp/googlecompute", + "qemu": "github.com/hashicorp/qemu", + "vagrant": "github.com/hashicorp/vagrant", + "virtualbox": "github.com/hashicorp/virtualbox", + "vmware": "github.com/hashicorp/vmware", + "vsphere": "github.com/hashicorp/vsphere", +} + +func (m *Meta) fixRequiredPlugins(config *hcl2template.PackerConfig) string { + plugins := map[string]struct{}{} + + for _, b := range config.Builds { + for _, b := range b.Sources { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(b.Type, prefix) { + plugins[plugin] = struct{}{} + } + } + } + + for _, p := range b.ProvisionerBlocks { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(p.PType, prefix) { + plugins[plugin] = struct{}{} + } + } + } + + for _, pps := range b.PostProcessorsLists { + for _, pp := range pps { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(pp.PType, prefix) { + plugins[plugin] = struct{}{} + } + } + } + } + } + + for _, ds := range config.Datasources { + for prefix, plugin := range knownPluginPrefixes { + if strings.HasPrefix(ds.Type, prefix) { + plugins[plugin] = struct{}{} + } + } + } + + retPlugins := make([]string, 0, len(plugins)) + for plugin := range plugins { + retPlugins = append(retPlugins, plugin) + } + + return generateRequiredPluginsBlock(retPlugins) +} + +func (m *Meta) detectBundledPluginsHCL2(config *hcl2template.PackerConfig) []string { + bundledPlugins := map[string]struct{}{} + + for _, b := range config.Builds { + for _, src := range b.Sources { + builderType := fmt.Sprintf("packer-builder-%s", src.Type) + if bundledStatus[builderType] { + bundledPlugins[builderType] = struct{}{} + } + } + + for _, p := range b.ProvisionerBlocks { + provisionerType := fmt.Sprintf("packer-provisioner-%s", p.PType) + if bundledStatus[provisionerType] { + bundledPlugins[provisionerType] = struct{}{} + } + } + + for _, pps := range b.PostProcessorsLists { + for _, pp := range pps { + postProcessorType := fmt.Sprintf("packer-post-processor-%s", pp.PType) + if bundledStatus[postProcessorType] { + bundledPlugins[postProcessorType] = struct{}{} + } + } + } + } + + for _, ds := range config.Datasources { + dsType := fmt.Sprintf("packer-datasource-%s", ds.Type) + if bundledStatus[dsType] { + bundledPlugins[dsType] = struct{}{} + } + } + + return compileBundledPluginList(bundledPlugins) +} diff --git a/command/plugins.go b/command/plugins.go index 6bc286dd19c..0b415d8f5c0 100644 --- a/command/plugins.go +++ b/command/plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/plugins_install.go b/command/plugins_install.go index 4d8434a2780..31fe7ec665d 100644 --- a/command/plugins_install.go +++ b/command/plugins_install.go @@ -1,31 +1,23 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command import ( - "bytes" "context" "crypto/sha256" - "encoding/json" - "flag" "fmt" - "io" - "os" - "os/exec" - "path/filepath" "runtime" "strings" "github.com/hashicorp/go-version" - "github.com/hashicorp/hcl/v2" - "github.com/hashicorp/packer-plugin-sdk/plugin" pluginsdk "github.com/hashicorp/packer-plugin-sdk/plugin" "github.com/hashicorp/packer/hcl2template/addrs" "github.com/hashicorp/packer/packer" plugingetter "github.com/hashicorp/packer/packer/plugin-getter" "github.com/hashicorp/packer/packer/plugin-getter/github" pkrversion "github.com/hashicorp/packer/version" + "github.com/mitchellh/cli" ) type PluginsInstallCommand struct { @@ -38,7 +30,7 @@ func (c *PluginsInstallCommand) Synopsis() string { func (c *PluginsInstallCommand) Help() string { helpText := ` -Usage: packer plugins install [OPTIONS...] [] +Usage: packer plugins install [] This command will install the most recent compatible Packer plugin matching version constraint. @@ -46,15 +38,6 @@ Usage: packer plugins install [OPTIONS...] [] installed. Ex: packer plugins install github.com/hashicorp/happycloud v1.2.3 - packer plugins install --path ./packer-plugin-happycloud "github.com/hashicorp/happycloud" - -Options: - - path : install the plugin from a locally-sourced plugin binary. This - installs the plugin where a normal invocation would, but will - not try to download it from a remote location, and instead - install the binary in the Packer plugins path. - This option cannot be specified with a version constraint. - - force: forces reinstallation of plugins, even if already installed. ` return strings.TrimSpace(helpText) @@ -64,62 +47,14 @@ func (c *PluginsInstallCommand) Run(args []string) int { ctx, cleanup := handleTermInterrupt(c.Ui) defer cleanup() - cmdArgs, ret := c.ParseArgs(args) - if ret != 0 { - return ret - } - - return c.RunContext(ctx, cmdArgs) -} - -type PluginsInstallArgs struct { - MetaArgs - PluginIdentifier string - PluginPath string - Version string - Force bool + return c.RunContext(ctx, args) } -func (pa *PluginsInstallArgs) AddFlagSets(flags *flag.FlagSet) { - flags.StringVar(&pa.PluginPath, "path", "", "install the binary specified by path as a Packer plugin.") - flags.BoolVar(&pa.Force, "force", false, "force installation of the specified plugin, even if already installed.") - pa.MetaArgs.AddFlagSets(flags) -} - -func (c *PluginsInstallCommand) ParseArgs(args []string) (*PluginsInstallArgs, int) { - pa := &PluginsInstallArgs{} - - flags := c.Meta.FlagSet("plugins install") - flags.Usage = func() { c.Ui.Say(c.Help()) } - pa.AddFlagSets(flags) - err := flags.Parse(args) - if err != nil { - c.Ui.Error(fmt.Sprintf("Failed to parse options: %s", err)) - return pa, 1 - } - - args = flags.Args() +func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args []string) int { if len(args) < 1 || len(args) > 2 { - c.Ui.Error(fmt.Sprintf("Invalid arguments, expected either 1 or 2 positional arguments, got %d", len(args))) - flags.Usage() - return pa, 1 - } - - if len(args) == 2 { - pa.Version = args[1] + return cli.RunResultHelp } - if pa.Path != "" && pa.Version != "" { - c.Ui.Error("Invalid arguments: a version cannot be specified when using --path to install a local plugin binary") - flags.Usage() - return pa, 1 - } - - pa.PluginIdentifier = args[0] - return pa, 0 -} - -func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *PluginsInstallArgs) int { opts := plugingetter.ListInstallationsOptions{ FromFolders: c.Meta.CoreConfig.Components.PluginConfig.KnownPluginFolders, BinaryInstallationOptions: plugingetter.BinaryInstallationOptions{ @@ -132,29 +67,20 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi }, }, } - if runtime.GOOS == "windows" { - opts.BinaryInstallationOptions.Ext = ".exe" - } - plugin, diags := addrs.ParsePluginSourceString(args.PluginIdentifier) + plugin, diags := addrs.ParsePluginSourceString(args[0]) if diags.HasErrors() { c.Ui.Error(diags.Error()) return 1 } - // If we did specify a binary to install the plugin from, we ignore - // the Github-based getter in favour of installing it directly. - if args.PluginPath != "" { - return c.InstallFromBinary(opts, plugin, args) - } - // a plugin requirement that matches them all pluginRequirement := plugingetter.Requirement{ Identifier: plugin, } - if args.Version != "" { - constraints, err := version.NewConstraint(args.Version) + if len(args) > 1 { + constraints, err := version.NewConstraint(args[1]) if err != nil { c.Ui.Error(err.Error()) return 1 @@ -162,6 +88,10 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi pluginRequirement.VersionConstraints = constraints } + if runtime.GOOS == "windows" && opts.Ext == "" { + opts.BinaryInstallationOptions.Ext = ".exe" + } + getters := []plugingetter.Getter{ &github.Getter{ // In the past some terraform plugins downloads were blocked from a @@ -179,7 +109,6 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi InFolders: opts.FromFolders, BinaryInstallationOptions: opts.BinaryInstallationOptions, Getters: getters, - Force: args.Force, }) if err != nil { @@ -199,158 +128,3 @@ func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args *Plugi return 0 } - -func (c *PluginsInstallCommand) InstallFromBinary(opts plugingetter.ListInstallationsOptions, pluginIdentifier *addrs.Plugin, args *PluginsInstallArgs) int { - // As with the other commands, we get the last plugin directory as it - // has precedence over the others, and is where we'll install the - // plugins to. - pluginDir := opts.FromFolders[len(opts.FromFolders)-1] - - var err error - - args.PluginPath, err = filepath.Abs(args.PluginPath) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to transform path", - Detail: fmt.Sprintf("Failed to transform the given path to an absolute one: %s", err), - }}) - } - - s, err := os.Stat(args.PluginPath) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Unable to find plugin to promote", - Detail: fmt.Sprintf("The plugin %q failed to be opened because of an error: %s", args.PluginIdentifier, err), - }}) - } - - if s.IsDir() { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Plugin to promote cannot be a directory", - Detail: "The packer plugin promote command can only install binaries, not directories", - }}) - } - - describeCmd, err := exec.Command(args.PluginPath, "describe").Output() - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to describe the plugin", - Detail: fmt.Sprintf("Packer failed to run %s describe: %s", args.PluginPath, err), - }}) - } - - var desc plugin.SetDescription - if err := json.Unmarshal(describeCmd, &desc); err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to decode plugin describe info", - Detail: fmt.Sprintf("'%s describe' produced information that Packer couldn't decode: %s", args.PluginPath, err), - }}) - } - - semver, err := version.NewSemver(desc.Version) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Invalid version", - Detail: fmt.Sprintf("Plugin's reported version (%q) is not semver-compatible: %s", desc.Version, err), - }}) - } - if semver.Prerelease() != "" { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Invalid version", - Detail: fmt.Sprintf("Packer can only install plugin releases with this command (ex: 1.0.0), the binary's reported version is %q", desc.Version), - }}) - } - - pluginBinary, err := os.Open(args.PluginPath) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to open plugin binary", - Detail: fmt.Sprintf("Failed to open plugin binary from %q: %s", args.PluginPath, err), - }}) - } - - pluginContents := bytes.Buffer{} - _, err = io.Copy(&pluginContents, pluginBinary) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to read plugin binary's contents", - Detail: fmt.Sprintf("Failed to read plugin binary from %q: %s", args.PluginPath, err), - }}) - } - _ = pluginBinary.Close() - - // At this point, we know the provided binary behaves correctly with - // describe, so it's very likely to be a plugin, let's install it. - installDir := filepath.Join( - pluginDir, - filepath.Join(pluginIdentifier.Parts()...), - ) - err = os.MkdirAll(installDir, 0755) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to create output directory", - Detail: fmt.Sprintf("The installation directory %q failed to be created because of an error: %s", installDir, err), - }}) - } - - outputPrefix := fmt.Sprintf( - "packer-plugin-%s_v%s_%s", - pluginIdentifier.Type, - desc.Version, - desc.APIVersion, - ) - binaryPath := filepath.Join( - installDir, - outputPrefix+opts.BinaryInstallationOptions.FilenameSuffix(), - ) - - outputPlugin, err := os.OpenFile(binaryPath, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0755) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to create plugin binary", - Detail: fmt.Sprintf("Failed to create plugin binary at %q: %s", binaryPath, err), - }}) - } - defer outputPlugin.Close() - - _, err = outputPlugin.Write(pluginContents.Bytes()) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to copy plugin binary's contents", - Detail: fmt.Sprintf("Failed to copy plugin binary from %q to %q: %s", args.PluginPath, binaryPath, err), - }}) - } - - // We'll install the SHA256SUM file alongside the plugin, based on the - // contents of the plugin being passed. - shasum := sha256.New() - _, _ = shasum.Write(pluginContents.Bytes()) - - shasumPath := fmt.Sprintf("%s_SHA256SUM", binaryPath) - shaFile, err := os.OpenFile(shasumPath, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0644) - if err != nil { - return writeDiags(c.Ui, nil, hcl.Diagnostics{&hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Failed to create plugin SHA256SUM file", - Detail: fmt.Sprintf("Failed to create SHA256SUM file at %q: %s", shasumPath, err), - }}) - } - defer shaFile.Close() - - fmt.Fprintf(shaFile, "%x", shasum.Sum([]byte{})) - c.Ui.Say(fmt.Sprintf("Successfully installed plugin %s from %s to %s", args.PluginIdentifier, args.PluginPath, binaryPath)) - - return 0 -} diff --git a/command/plugins_install_test.go b/command/plugins_install_test.go index 5461360c36e..7f34cb5dddd 100644 --- a/command/plugins_install_test.go +++ b/command/plugins_install_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build amd64 && (darwin || windows || linux) @@ -13,6 +13,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/mitchellh/cli" "golang.org/x/mod/sumdb/dirhash" ) @@ -108,7 +109,7 @@ func TestPluginsInstallCommand_Run(t *testing.T) { expectedPackerConfigDirHashBeforeInstall: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", packerConfigDir: cfg.dir("4_pkr_plugins_config"), pluginSourceArgs: []string{"github.com/sylviamoss/comment", "v0.2.18", "github.com/sylviamoss/comment", "v0.2.19"}, - want: 1, + want: cli.RunResultHelp, dirFiles: nil, expectedPackerConfigDirHashAfterInstall: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", }, @@ -119,7 +120,7 @@ func TestPluginsInstallCommand_Run(t *testing.T) { expectedPackerConfigDirHashBeforeInstall: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", packerConfigDir: cfg.dir("5_pkr_plugins_config"), pluginSourceArgs: []string{}, - want: 1, + want: cli.RunResultHelp, dirFiles: nil, expectedPackerConfigDirHashAfterInstall: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", }, diff --git a/command/plugins_installed.go b/command/plugins_installed.go index b19be4e5c33..bc6175a61a5 100644 --- a/command/plugins_installed.go +++ b/command/plugins_installed.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/plugins_remove.go b/command/plugins_remove.go index 5c13636f5c6..592f7cf1716 100644 --- a/command/plugins_remove.go +++ b/command/plugins_remove.go @@ -1,12 +1,11 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command import ( "context" "crypto/sha256" - "fmt" "os" "runtime" "strings" @@ -96,22 +95,8 @@ func (c *PluginsRemoveCommand) RunContext(buildCtx context.Context, args []strin c.Ui.Error(err.Error()) return 1 } - shasumFile := fmt.Sprintf("%s_SHA256SUM", installation.BinaryPath) - if err := os.Remove(shasumFile); err != nil { - c.Ui.Error(fmt.Sprintf("failed to remove %s: %s", shasumFile, err)) - c.Ui.Error("You may need to remove it manually") - } c.Ui.Message(installation.BinaryPath) } - if len(installations) == 0 { - errMsg := fmt.Sprintf("No installed plugin found matching the plugin constraints %s", args[0]) - if len(args) == 2 { - errMsg = fmt.Sprintf("%s %s", errMsg, args[1]) - } - c.Ui.Error(errMsg) - return 1 - } - return 0 } diff --git a/command/plugins_remove_test.go b/command/plugins_remove_test.go index 4149ceaeb9c..83b2463bc02 100644 --- a/command/plugins_remove_test.go +++ b/command/plugins_remove_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build amd64 && (darwin || windows || linux) @@ -47,7 +47,7 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { expectedPackerConfigDirHashBeforeRemove: "h1:Q5qyAOdD43hL3CquQdVfaHpOYGf0UsZ/+wVA9Ry6cbA=", packerConfigDir: cfg.dir("1_pkr_plugins_config"), pluginSourceArgs: []string{"github.com/sylviamoss/comment", "v0.2.19"}, - want: 1, + want: 0, dirFiles: nil, expectedPackerConfigDirHashAfterRemove: "h1:Q5qyAOdD43hL3CquQdVfaHpOYGf0UsZ/+wVA9Ry6cbA=", }, @@ -68,6 +68,7 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { want: 0, dirFiles: map[string][]string{ "darwin": { + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe", @@ -76,6 +77,7 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { "linux": { "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe_SHA256SUM", }, @@ -84,12 +86,13 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe_SHA256SUM", }, }[runtime.GOOS], expectedPackerConfigDirHashAfterRemove: map[string]string{ - "darwin": "h1:IKDdst8f0nMAS9T9t85fhuvDCe8lYytiZ/vooW1OWeI=", - "linux": "h1:h3t4iDYGbNtouHAJ1vPsE7d8n+6W5K4VlXTxhrQx2DA=", - "windows": "h1:NpETtGlu1hVMJe5bflPmyAhnL4iDvoIwA//uWhxtkDU=", + "darwin": "h1:IMsWPgJZzRhn80t78zE45003gFKN6EXq562/wjaCrKE=", + "linux": "h1:Ez7SU1GZLvNGJmoTm9PeFIwHv9fvEgzZAZTMl6874iM=", + "windows": "h1:RrXlhy9tG9Bi3c2aOzjx/FLLyVNQolcY+MAr4V1etRI=", }[runtime.GOOS], }, { @@ -115,6 +118,8 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { want: 0, dirFiles: map[string][]string{ "darwin": { + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_darwin_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64", @@ -129,6 +134,8 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_darwin_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_darwin_amd64_SHA256SUM", + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_windows_amd64.exe", @@ -143,12 +150,14 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_linux_amd64_SHA256SUM", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64", "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64_SHA256SUM", + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_windows_amd64.exe_SHA256SUM", + "github.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_windows_amd64.exe_SHA256SUM", }, }[runtime.GOOS], expectedPackerConfigDirHashAfterRemove: map[string]string{ - "darwin": "h1:A6wlL62bUD06NF/1ND5E0o4omXhusB2T8N5ZNe2JVbg=", - "linux": "h1:SuTX0k2sknjDrL3PYgR1JajbGcs1qWIV2XvZAYSMsHw=", - "windows": "h1:NI8aJVAKdIyCXHuGDj6kTu5++6yvCz4oAswIhkL3wFc=", + "darwin": "h1:FBBGQ1SKngN9PvF98awv8TZcKaS+CKzJmQoS7vuSXqY=", + "linux": "h1:F8lN4Q3sv45ig8r1BLOS/wFuQQy6tSfmuIJf3fnbD5k=", + "windows": "h1:DOfH6WR1eJNLJcaL8ar8j1xu2WB7Jcn6oG7LGEvNBZI=", }[runtime.GOOS], }, { @@ -158,7 +167,7 @@ func TestPluginsRemoveCommand_Run(t *testing.T) { expectedPackerConfigDirHashBeforeRemove: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", packerConfigDir: cfg.dir("3_pkr_plugins_config"), pluginSourceArgs: []string{"example.com/sylviamoss/comment", "v0.2.19"}, - want: 1, + want: 0, dirFiles: nil, expectedPackerConfigDirHashAfterRemove: "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", }, diff --git a/command/plugins_required.go b/command/plugins_required.go index 7776b19210b..d484322291c 100644 --- a/command/plugins_required.go +++ b/command/plugins_required.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -54,7 +54,7 @@ func (c *PluginsRequiredCommand) Run(args []string) int { func (c *PluginsRequiredCommand) ParseArgs(args []string) (*PluginsRequiredArgs, int) { var cfg PluginsRequiredArgs - flags := c.Meta.FlagSet("plugins required") + flags := c.Meta.FlagSet("plugins required", 0) flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { diff --git a/command/signal.go b/command/signal.go index a47ac58aa22..5980192baf4 100644 --- a/command/signal.go +++ b/command/signal.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/test_utils.go b/command/test_utils.go index 852343085cc..41e02dbcb7b 100644 --- a/command/test_utils.go +++ b/command/test_utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/utils.go b/command/utils.go index 359a96b9726..9fee02d419c 100644 --- a/command/utils.go +++ b/command/utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/utils_test.go b/command/utils_test.go index cf5e2dbe3e7..0d9817aeac2 100644 --- a/command/utils_test.go +++ b/command/utils_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/validate.go b/command/validate.go index 9747dabf95c..2b7e2107b0d 100644 --- a/command/validate.go +++ b/command/validate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command @@ -31,7 +31,7 @@ func (c *ValidateCommand) Run(args []string) int { func (c *ValidateCommand) ParseArgs(args []string) (*ValidateArgs, int) { var cfg ValidateArgs - flags := c.Meta.FlagSet("validate") + flags := c.Meta.FlagSet("validate", FlagSetBuildFilter|FlagSetVars) flags.Usage = func() { c.Ui.Say(c.Help()) } cfg.AddFlagSets(flags) if err := flags.Parse(args); err != nil { @@ -74,6 +74,8 @@ func (c *ValidateCommand) RunContext(ctx context.Context, cla *ValidateArgs) int diags = packerStarter.Initialize(packer.InitializeOptions{ SkipDatasourcesExecution: !cla.EvaluateDatasources, }) + bundledDiags := c.DetectBundledPlugins(packerStarter) + diags = append(bundledDiags, diags...) ret = writeDiags(c.Ui, nil, diags) if ret != 0 { return ret diff --git a/command/validate_test.go b/command/validate_test.go index 5b9da04d78b..5b51f378158 100644 --- a/command/validate_test.go +++ b/command/validate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/vendored_plugins.go b/command/vendored_plugins.go new file mode 100644 index 00000000000..d6e5f836338 --- /dev/null +++ b/command/vendored_plugins.go @@ -0,0 +1,303 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package command + +import ( + "fmt" + "log" + "strings" + + packersdk "github.com/hashicorp/packer-plugin-sdk/packer" + + // Previously core-bundled components, split into their own plugins but + // still vendored with Packer for now. Importing as library instead of + // forcing use of packer init. + + amazonchrootbuilder "github.com/hashicorp/packer-plugin-amazon/builder/chroot" + amazonebsbuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebs" + amazonebssurrogatebuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate" + amazonebsvolumebuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume" + amazoninstancebuilder "github.com/hashicorp/packer-plugin-amazon/builder/instance" + amazonamidatasource "github.com/hashicorp/packer-plugin-amazon/datasource/ami" + amazonsecretsmanagerdatasource "github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager" + anazibimportpostprocessor "github.com/hashicorp/packer-plugin-amazon/post-processor/import" + ansibleprovisioner "github.com/hashicorp/packer-plugin-ansible/provisioner/ansible" + ansiblelocalprovisioner "github.com/hashicorp/packer-plugin-ansible/provisioner/ansible-local" + azurearmbuilder "github.com/hashicorp/packer-plugin-azure/builder/azure/arm" + azurechrootbuilder "github.com/hashicorp/packer-plugin-azure/builder/azure/chroot" + azuredtlbuilder "github.com/hashicorp/packer-plugin-azure/builder/azure/dtl" + azuredtlartifactprovisioner "github.com/hashicorp/packer-plugin-azure/provisioner/azure-dtlartifact" + dockerbuilder "github.com/hashicorp/packer-plugin-docker/builder/docker" + dockerimportpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-import" + dockerpushpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-push" + dockersavepostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-save" + dockertagpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-tag" + googlecomputebuilder "github.com/hashicorp/packer-plugin-googlecompute/builder/googlecompute" + googlecomputeexportpostprocessor "github.com/hashicorp/packer-plugin-googlecompute/post-processor/googlecompute-export" + googlecomputeimportpostprocessor "github.com/hashicorp/packer-plugin-googlecompute/post-processor/googlecompute-import" + qemubuilder "github.com/hashicorp/packer-plugin-qemu/builder/qemu" + vagrantbuilder "github.com/hashicorp/packer-plugin-vagrant/builder/vagrant" + vagrantpostprocessor "github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant" + vagrantcloudpostprocessor "github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant-cloud" + virtualboxisobuilder "github.com/hashicorp/packer-plugin-virtualbox/builder/virtualbox/iso" + virtualboxovfbuilder "github.com/hashicorp/packer-plugin-virtualbox/builder/virtualbox/ovf" + virtualboxvmbuilder "github.com/hashicorp/packer-plugin-virtualbox/builder/virtualbox/vm" + vmwareisobuilder "github.com/hashicorp/packer-plugin-vmware/builder/vmware/iso" + vmwarevmxbuilder "github.com/hashicorp/packer-plugin-vmware/builder/vmware/vmx" + vsphereclonebuilder "github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/clone" + vsphereisobuilder "github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/iso" + vspherepostprocessor "github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere" + vspheretemplatepostprocessor "github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template" +) + +// VendoredDatasources are datasource components that were once bundled with the +// Packer core, but are now being imported from their counterpart plugin repos +var VendoredDatasources = map[string]packersdk.Datasource{ + "amazon-ami": new(amazonamidatasource.Datasource), + "amazon-secretsmanager": new(amazonsecretsmanagerdatasource.Datasource), +} + +// VendoredBuilders are builder components that were once bundled with the +// Packer core, but are now being imported from their counterpart plugin repos +var VendoredBuilders = map[string]packersdk.Builder{ + "amazon-ebs": new(amazonebsbuilder.Builder), + "amazon-chroot": new(amazonchrootbuilder.Builder), + "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), + "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), + "amazon-instance": new(amazoninstancebuilder.Builder), + "azure-arm": new(azurearmbuilder.Builder), + "azure-chroot": new(azurechrootbuilder.Builder), + "azure-dtl": new(azuredtlbuilder.Builder), + "docker": new(dockerbuilder.Builder), + "googlecompute": new(googlecomputebuilder.Builder), + "qemu": new(qemubuilder.Builder), + "vagrant": new(vagrantbuilder.Builder), + "vsphere-clone": new(vsphereclonebuilder.Builder), + "vsphere-iso": new(vsphereisobuilder.Builder), + "virtualbox-iso": new(virtualboxisobuilder.Builder), + "virtualbox-ovf": new(virtualboxovfbuilder.Builder), + "virtualbox-vm": new(virtualboxvmbuilder.Builder), + "vmware-iso": new(vmwareisobuilder.Builder), + "vmware-vmx": new(vmwarevmxbuilder.Builder), +} + +// VendoredProvisioners are provisioner components that were once bundled with the +// Packer core, but are now being imported from their counterpart plugin repos +var VendoredProvisioners = map[string]packersdk.Provisioner{ + "azure-dtlartifact": new(azuredtlartifactprovisioner.Provisioner), + "ansible": new(ansibleprovisioner.Provisioner), + "ansible-local": new(ansiblelocalprovisioner.Provisioner), +} + +// VendoredPostProcessors are post-processor components that were once bundled with the +// Packer core, but are now being imported from their counterpart plugin repos +var VendoredPostProcessors = map[string]packersdk.PostProcessor{ + "amazon-import": new(anazibimportpostprocessor.PostProcessor), + "docker-import": new(dockerimportpostprocessor.PostProcessor), + "docker-push": new(dockerpushpostprocessor.PostProcessor), + "docker-save": new(dockersavepostprocessor.PostProcessor), + "docker-tag": new(dockertagpostprocessor.PostProcessor), + "googlecompute-export": new(googlecomputeexportpostprocessor.PostProcessor), + "googlecompute-import": new(googlecomputeimportpostprocessor.PostProcessor), + "vagrant": new(vagrantpostprocessor.PostProcessor), + "vagrant-cloud": new(vagrantcloudpostprocessor.PostProcessor), + "vsphere-template": new(vspheretemplatepostprocessor.PostProcessor), + "vsphere": new(vspherepostprocessor.PostProcessor), +} + +// bundledStatus is used to know if one of the bundled components is loaded from +// an external plugin, or from the bundled plugins. +// +// We keep track of this to produce a warning if a user relies on one +// such plugin, as they will be removed in a later version of Packer. +var bundledStatus = map[string]bool{ + "packer-builder-amazon-ebs": false, + "packer-builder-amazon-chroot": false, + "packer-builder-amazon-ebssurrogate": false, + "packer-builder-amazon-ebsvolume": false, + "packer-builder-amazon-instance": false, + "packer-post-processor-amazon-import": false, + "packer-datasource-amazon-ami": false, + "packer-datasource-amazon-secretsmanager": false, + + "packer-provisioner-ansible": false, + "packer-provisioner-ansible-local": false, + + "packer-provisioner-azure-dtlartifact": false, + "packer-builder-azure-arm": false, + "packer-builder-azure-chroot": false, + "packer-builder-azure-dtl": false, + + "packer-builder-docker": false, + "packer-post-processor-docker-import": false, + "packer-post-processor-docker-push": false, + "packer-post-processor-docker-save": false, + "packer-post-processor-docker-tag": false, + + "packer-builder-googlecompute": false, + "packer-post-processor-googlecompute-export": false, + "packer-post-processor-googlecompute-import": false, + + "packer-builder-qemu": false, + + "packer-builder-vagrant": false, + "packer-post-processor-vagrant": false, + "packer-post-processor-vagrant-cloud": false, + + "packer-builder-virtualbox-iso": false, + "packer-builder-virtualbox-ovf": false, + "packer-builder-virtualbox-vm": false, + + "packer-builder-vmware-iso": false, + "packer-builder-vmware-vmx": false, + + "packer-builder-vsphere-clone": false, + "packer-builder-vsphere-iso": false, + "packer-post-processor-vsphere-template": false, + "packer-post-processor-vsphere": false, +} + +// TrackBundledPlugin marks a component as loaded from Packer's bundled plugins +// instead of from an externally loaded plugin. +// +// NOTE: `pluginName' must be in the format `packer--' +func TrackBundledPlugin(pluginName string) { + _, exists := bundledStatus[pluginName] + if !exists { + return + } + + bundledStatus[pluginName] = true +} + +var componentPluginMap = map[string]string{ + "packer-builder-amazon-ebs": "github.com/hashicorp/amazon", + "packer-builder-amazon-chroot": "github.com/hashicorp/amazon", + "packer-builder-amazon-ebssurrogate": "github.com/hashicorp/amazon", + "packer-builder-amazon-ebsvolume": "github.com/hashicorp/amazon", + "packer-builder-amazon-instance": "github.com/hashicorp/amazon", + "packer-post-processor-amazon-import": "github.com/hashicorp/amazon", + "packer-datasource-amazon-ami": "github.com/hashicorp/amazon", + "packer-datasource-amazon-secretsmanager": "github.com/hashicorp/amazon", + + "packer-provisioner-ansible": "github.com/hashicorp/ansible", + "packer-provisioner-ansible-local": "github.com/hashicorp/ansible", + + "packer-provisioner-azure-dtlartifact": "github.com/hashicorp/azure", + "packer-builder-azure-arm": "github.com/hashicorp/azure", + "packer-builder-azure-chroot": "github.com/hashicorp/azure", + "packer-builder-azure-dtl": "github.com/hashicorp/azure", + + "packer-builder-docker": "github.com/hashicorp/docker", + "packer-post-processor-docker-import": "github.com/hashicorp/docker", + "packer-post-processor-docker-push": "github.com/hashicorp/docker", + "packer-post-processor-docker-save": "github.com/hashicorp/docker", + "packer-post-processor-docker-tag": "github.com/hashicorp/docker", + + "packer-builder-googlecompute": "github.com/hashicorp/googlecompute", + "packer-post-processor-googlecompute-export": "github.com/hashicorp/googlecompute", + "packer-post-processor-googlecompute-import": "github.com/hashicorp/googlecompute", + + "packer-builder-qemu": "github.com/hashicorp/qemu", + + "packer-builder-vagrant": "github.com/hashicorp/vagrant", + "packer-post-processor-vagrant": "github.com/hashicorp/vagrant", + "packer-post-processor-vagrant-cloud": "github.com/hashicorp/vagrant", + + "packer-builder-virtualbox-iso": "github.com/hashicorp/virtualbox", + "packer-builder-virtualbox-ovf": "github.com/hashicorp/virtualbox", + "packer-builder-virtualbox-vm": "github.com/hashicorp/virtualbox", + + "packer-builder-vmware-iso": "github.com/hashicorp/vmware", + "packer-builder-vmware-vmx": "github.com/hashicorp/vmware", + + "packer-builder-vsphere-clone": "github.com/hashicorp/vsphere", + "packer-builder-vsphere-iso": "github.com/hashicorp/vsphere", + "packer-post-processor-vsphere-template": "github.com/hashicorp/vsphere", + "packer-post-processor-vsphere": "github.com/hashicorp/vsphere", +} + +// compileBundledPluginList returns a list of plugins to import in a config +// +// This only works on bundled plugins and serves as a way to inform users that +// they should not rely on a bundled plugin anymore, but give them recommendations +// on how to manage those plugins instead. +func compileBundledPluginList(componentMap map[string]struct{}) []string { + plugins := map[string]struct{}{} + for component := range componentMap { + plugin, ok := componentPluginMap[component] + if !ok { + log.Printf("Unknown bundled plugin component: %q", component) + continue + } + + plugins[plugin] = struct{}{} + } + + pluginList := make([]string, 0, len(plugins)) + for plugin := range plugins { + pluginList = append(pluginList, plugin) + } + + return pluginList +} + +func generateRequiredPluginsBlock(plugins []string) string { + if len(plugins) == 0 { + return "" + } + + buf := &strings.Builder{} + buf.WriteString(` +packer { + required_plugins {`) + + for _, plugin := range plugins { + pluginName := strings.Replace(plugin, "github.com/hashicorp/", "", 1) + fmt.Fprintf(buf, ` + %s = { + source = %q + version = "~> 1" + }`, pluginName, plugin) + } + + buf.WriteString(` + } +} +`) + + return buf.String() +} + +// Upon init lets load up any plugins that were vendored manually into the default +// set of plugins. +func init() { + for k, v := range VendoredDatasources { + if _, ok := Datasources[k]; ok { + continue + } + Datasources[k] = v + } + + for k, v := range VendoredBuilders { + if _, ok := Builders[k]; ok { + continue + } + Builders[k] = v + } + + for k, v := range VendoredProvisioners { + if _, ok := Provisioners[k]; ok { + continue + } + Provisioners[k] = v + } + + for k, v := range VendoredPostProcessors { + if _, ok := PostProcessors[k]; ok { + continue + } + PostProcessors[k] = v + } +} diff --git a/command/version.go b/command/version.go index 976221efed5..3a6db86d712 100644 --- a/command/version.go +++ b/command/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/version_test.go b/command/version_test.go index 60f97f4f38e..cd2b67e5c6d 100644 --- a/command/version_test.go +++ b/command/version_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/commands.go b/commands.go index 9b2d3ebdf35..01e3bf56e73 100644 --- a/commands.go +++ b/commands.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/config.go b/config.go index d4dab230e86..af679dd8e0b 100644 --- a/config.go +++ b/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main @@ -153,6 +153,7 @@ func (c *config) discoverInternalComponents() error { for builder := range command.Builders { builder := builder if !c.Plugins.Builders.Has(builder) { + command.TrackBundledPlugin(fmt.Sprintf("packer-builder-%s", builder)) bin := fmt.Sprintf("%s%splugin%spacker-builder-%s", packerPath, PACKERSPACE, PACKERSPACE, builder) c.Plugins.Builders.Set(builder, func() (packersdk.Builder, error) { @@ -164,6 +165,7 @@ func (c *config) discoverInternalComponents() error { for provisioner := range command.Provisioners { provisioner := provisioner if !c.Plugins.Provisioners.Has(provisioner) { + command.TrackBundledPlugin(fmt.Sprintf("packer-provisioner-%s", provisioner)) bin := fmt.Sprintf("%s%splugin%spacker-provisioner-%s", packerPath, PACKERSPACE, PACKERSPACE, provisioner) c.Plugins.Provisioners.Set(provisioner, func() (packersdk.Provisioner, error) { @@ -175,6 +177,7 @@ func (c *config) discoverInternalComponents() error { for postProcessor := range command.PostProcessors { postProcessor := postProcessor if !c.Plugins.PostProcessors.Has(postProcessor) { + command.TrackBundledPlugin(fmt.Sprintf("packer-post-processor-%s", postProcessor)) bin := fmt.Sprintf("%s%splugin%spacker-post-processor-%s", packerPath, PACKERSPACE, PACKERSPACE, postProcessor) c.Plugins.PostProcessors.Set(postProcessor, func() (packersdk.PostProcessor, error) { @@ -186,6 +189,7 @@ func (c *config) discoverInternalComponents() error { for dataSource := range command.Datasources { dataSource := dataSource if !c.Plugins.DataSources.Has(dataSource) { + command.TrackBundledPlugin(fmt.Sprintf("packer-datasource-%s", dataSource)) bin := fmt.Sprintf("%s%splugin%spacker-datasource-%s", packerPath, PACKERSPACE, PACKERSPACE, dataSource) c.Plugins.DataSources.Set(dataSource, func() (packersdk.Datasource, error) { diff --git a/config_test.go b/config_test.go index ac101010c3c..e305a379428 100644 --- a/config_test.go +++ b/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/datasource/hcp-packer-image/data.go b/datasource/hcp-packer-image/data.go index aba7a6d19bf..3e473e145e4 100644 --- a/datasource/hcp-packer-image/data.go +++ b/datasource/hcp-packer-image/data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type DatasourceOutput,Config diff --git a/datasource/hcp-packer-iteration/data.go b/datasource/hcp-packer-iteration/data.go index ff0bbd46f34..7a7be3e4979 100644 --- a/datasource/hcp-packer-iteration/data.go +++ b/datasource/hcp-packer-iteration/data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type DatasourceOutput,Config diff --git a/datasource/hcp-packer-iteration/data_acc_test.go b/datasource/hcp-packer-iteration/data_acc_test.go index 82e3b78e5f7..bf91e870d7e 100644 --- a/datasource/hcp-packer-iteration/data_acc_test.go +++ b/datasource/hcp-packer-iteration/data_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcp_packer_iteration diff --git a/datasource/http/data.go b/datasource/http/data.go index 58dec04c35b..7790baf15f1 100644 --- a/datasource/http/data.go +++ b/datasource/http/data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type DatasourceOutput,Config diff --git a/datasource/http/data_acc_test.go b/datasource/http/data_acc_test.go index fdf680b8298..8b49b97c6ba 100644 --- a/datasource/http/data_acc_test.go +++ b/datasource/http/data_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package http diff --git a/datasource/null/data.go b/datasource/null/data.go index 90c8064aefd..308e06217d7 100644 --- a/datasource/null/data.go +++ b/datasource/null/data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type DatasourceOutput,Config diff --git a/fix/fixer.go b/fix/fixer.go index 3fd30cacf11..3de4bc1f814 100644 --- a/fix/fixer.go +++ b/fix/fixer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_enhanced_networking.go b/fix/fixer_amazon_enhanced_networking.go index f5c0aa15ed0..708d2f5bc30 100644 --- a/fix/fixer_amazon_enhanced_networking.go +++ b/fix/fixer_amazon_enhanced_networking.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_enhanced_networking_test.go b/fix/fixer_amazon_enhanced_networking_test.go index c92293d96dd..4abdcc5f4d1 100644 --- a/fix/fixer_amazon_enhanced_networking_test.go +++ b/fix/fixer_amazon_enhanced_networking_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_private_ip.go b/fix/fixer_amazon_private_ip.go index f2ca9a26948..ee18770b40a 100644 --- a/fix/fixer_amazon_private_ip.go +++ b/fix/fixer_amazon_private_ip.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_private_ip_test.go b/fix/fixer_amazon_private_ip_test.go index 7d78e396b7b..554e2e7ee3b 100644 --- a/fix/fixer_amazon_private_ip_test.go +++ b/fix/fixer_amazon_private_ip_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_shutdown_behavior.go b/fix/fixer_amazon_shutdown_behavior.go index b779fc10766..c7e2db0d315 100644 --- a/fix/fixer_amazon_shutdown_behavior.go +++ b/fix/fixer_amazon_shutdown_behavior.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_shutdown_behavior_test.go b/fix/fixer_amazon_shutdown_behavior_test.go index 5af1f59c5cd..87058ea9054 100644 --- a/fix/fixer_amazon_shutdown_behavior_test.go +++ b/fix/fixer_amazon_shutdown_behavior_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_spot_price_product.go b/fix/fixer_amazon_spot_price_product.go index 7c49afeb9ce..b701e1d9f59 100644 --- a/fix/fixer_amazon_spot_price_product.go +++ b/fix/fixer_amazon_spot_price_product.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_temporary_security_group_cidrs.go b/fix/fixer_amazon_temporary_security_group_cidrs.go index bd9a9b019b8..ffd75eb364d 100644 --- a/fix/fixer_amazon_temporary_security_group_cidrs.go +++ b/fix/fixer_amazon_temporary_security_group_cidrs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_amazon_temporary_security_group_cidrs_test.go b/fix/fixer_amazon_temporary_security_group_cidrs_test.go index 28dac694904..2ed9f4bb261 100644 --- a/fix/fixer_amazon_temporary_security_group_cidrs_test.go +++ b/fix/fixer_amazon_temporary_security_group_cidrs_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_azure_exclude_from_latest.go b/fix/fixer_azure_exclude_from_latest.go index b85f1da6d67..210b59f46ac 100644 --- a/fix/fixer_azure_exclude_from_latest.go +++ b/fix/fixer_azure_exclude_from_latest.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_azure_exclude_from_latest_test.go b/fix/fixer_azure_exclude_from_latest_test.go index e7e16e9bde8..a3cd70d538d 100644 --- a/fix/fixer_azure_exclude_from_latest_test.go +++ b/fix/fixer_azure_exclude_from_latest_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_clean_image_name.go b/fix/fixer_clean_image_name.go index 981e2e36f41..423d2e34035 100644 --- a/fix/fixer_clean_image_name.go +++ b/fix/fixer_clean_image_name.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_clean_image_name_test.go b/fix/fixer_clean_image_name_test.go index 7a95ac2a0f1..385e6f113df 100644 --- a/fix/fixer_clean_image_name_test.go +++ b/fix/fixer_clean_image_name_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_comm_config.go b/fix/fixer_comm_config.go index 3d02fcdac33..6f2c49af8e7 100644 --- a/fix/fixer_comm_config.go +++ b/fix/fixer_comm_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_comm_config_test.go b/fix/fixer_comm_config_test.go index c0e22bb7e06..52beb052de1 100644 --- a/fix/fixer_comm_config_test.go +++ b/fix/fixer_comm_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_createtime.go b/fix/fixer_createtime.go index 345ec750242..0412c4d9afb 100644 --- a/fix/fixer_createtime.go +++ b/fix/fixer_createtime.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_createtime_test.go b/fix/fixer_createtime_test.go index 9c78b525ac0..a7350966812 100644 --- a/fix/fixer_createtime_test.go +++ b/fix/fixer_createtime_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_docker_email.go b/fix/fixer_docker_email.go index 6a644210cef..3a5883f2b9b 100644 --- a/fix/fixer_docker_email.go +++ b/fix/fixer_docker_email.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_galaxy_command.go b/fix/fixer_galaxy_command.go index df36558275b..f5988d9bc27 100644 --- a/fix/fixer_galaxy_command.go +++ b/fix/fixer_galaxy_command.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_galaxy_command_test.go b/fix/fixer_galaxy_command_test.go index 125039240c8..ee067b174fa 100644 --- a/fix/fixer_galaxy_command_test.go +++ b/fix/fixer_galaxy_command_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_hyperv_cpu_and_ram_naming.go b/fix/fixer_hyperv_cpu_and_ram_naming.go index 3c655bb2ecd..4983b5cb4fc 100644 --- a/fix/fixer_hyperv_cpu_and_ram_naming.go +++ b/fix/fixer_hyperv_cpu_and_ram_naming.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_hyperv_deprecations.go b/fix/fixer_hyperv_deprecations.go index 191a8f0d8df..12714d9d71b 100644 --- a/fix/fixer_hyperv_deprecations.go +++ b/fix/fixer_hyperv_deprecations.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_hyperv_deprecations_test.go b/fix/fixer_hyperv_deprecations_test.go index 1f9672d42ed..00154e2b9a4 100644 --- a/fix/fixer_hyperv_deprecations_test.go +++ b/fix/fixer_hyperv_deprecations_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_hyperv_vmxc_typo.go b/fix/fixer_hyperv_vmxc_typo.go index c2c57fe8071..f9c5d63d969 100644 --- a/fix/fixer_hyperv_vmxc_typo.go +++ b/fix/fixer_hyperv_vmxc_typo.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_hyperv_vmxc_typo_test.go b/fix/fixer_hyperv_vmxc_typo_test.go index c88a1d40d8b..1f7ac625a0b 100644 --- a/fix/fixer_hyperv_vmxc_typo_test.go +++ b/fix/fixer_hyperv_vmxc_typo_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_iso_checksum_type_and_url.go b/fix/fixer_iso_checksum_type_and_url.go index df61844fa61..fc50055ac7e 100644 --- a/fix/fixer_iso_checksum_type_and_url.go +++ b/fix/fixer_iso_checksum_type_and_url.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_iso_checksum_type_and_url_test.go b/fix/fixer_iso_checksum_type_and_url_test.go index 556ab966391..f3492dc50cb 100644 --- a/fix/fixer_iso_checksum_type_and_url_test.go +++ b/fix/fixer_iso_checksum_type_and_url_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_iso_md5.go b/fix/fixer_iso_md5.go index 3d6acb86aa5..074a0b2bab3 100644 --- a/fix/fixer_iso_md5.go +++ b/fix/fixer_iso_md5.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_iso_md5_test.go b/fix/fixer_iso_md5_test.go index 106fff6096c..fc396507977 100644 --- a/fix/fixer_iso_md5_test.go +++ b/fix/fixer_iso_md5_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_parallels_deprecations.go b/fix/fixer_parallels_deprecations.go index b287f58f003..36ad9a708eb 100644 --- a/fix/fixer_parallels_deprecations.go +++ b/fix/fixer_parallels_deprecations.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_parallels_deprecations_test.go b/fix/fixer_parallels_deprecations_test.go index 584129693d5..a5fd425385d 100644 --- a/fix/fixer_parallels_deprecations_test.go +++ b/fix/fixer_parallels_deprecations_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_parallels_headless.go b/fix/fixer_parallels_headless.go index cd645df1181..164deff3ea0 100644 --- a/fix/fixer_parallels_headless.go +++ b/fix/fixer_parallels_headless.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_parallels_headless_test.go b/fix/fixer_parallels_headless_test.go index 62f5654bb27..bc3efbcc0e7 100644 --- a/fix/fixer_parallels_headless_test.go +++ b/fix/fixer_parallels_headless_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_powershell_escapes.go b/fix/fixer_powershell_escapes.go index a96bc35fd99..d33d046d628 100644 --- a/fix/fixer_powershell_escapes.go +++ b/fix/fixer_powershell_escapes.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_pp_docker_tag_tags.go b/fix/fixer_pp_docker_tag_tags.go index e21a9c26dfb..49e33ebee91 100644 --- a/fix/fixer_pp_docker_tag_tags.go +++ b/fix/fixer_pp_docker_tag_tags.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_pp_docker_tag_tags_test.go b/fix/fixer_pp_docker_tag_tags_test.go index 97b600bbc3a..908c0768efb 100644 --- a/fix/fixer_pp_docker_tag_tags_test.go +++ b/fix/fixer_pp_docker_tag_tags_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_pp_manifest_filename.go b/fix/fixer_pp_manifest_filename.go index a9447d74050..9f66bc7ad2e 100644 --- a/fix/fixer_pp_manifest_filename.go +++ b/fix/fixer_pp_manifest_filename.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_pp_manifest_filename_test.go b/fix/fixer_pp_manifest_filename_test.go index 95eaeae68a3..ab86324e906 100644 --- a/fix/fixer_pp_manifest_filename_test.go +++ b/fix/fixer_pp_manifest_filename_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_pp_vagrant_override.go b/fix/fixer_pp_vagrant_override.go index c70ab1f5929..eee262212c8 100644 --- a/fix/fixer_pp_vagrant_override.go +++ b/fix/fixer_pp_vagrant_override.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_pp_vagrant_override_test.go b/fix/fixer_pp_vagrant_override_test.go index 29f7edba658..1ba56eb6821 100644 --- a/fix/fixer_pp_vagrant_override_test.go +++ b/fix/fixer_pp_vagrant_override_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_proxmox_type.go b/fix/fixer_proxmox_type.go index 5c08a35631b..602e82a9435 100644 --- a/fix/fixer_proxmox_type.go +++ b/fix/fixer_proxmox_type.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_proxmox_type_test.go b/fix/fixer_proxmox_type_test.go index 53b9d855c8e..e0ea378d572 100644 --- a/fix/fixer_proxmox_type_test.go +++ b/fix/fixer_proxmox_type_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_qemu_disk_size.go b/fix/fixer_qemu_disk_size.go index 5fd4184e571..7cd53800393 100644 --- a/fix/fixer_qemu_disk_size.go +++ b/fix/fixer_qemu_disk_size.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_qemu_disk_size_test.go b/fix/fixer_qemu_disk_size_test.go index a05e6f75239..3d141a5195c 100644 --- a/fix/fixer_qemu_disk_size_test.go +++ b/fix/fixer_qemu_disk_size_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_qemu_host_port.go b/fix/fixer_qemu_host_port.go index 1b92b04b316..4cd96b53ac1 100644 --- a/fix/fixer_qemu_host_port.go +++ b/fix/fixer_qemu_host_port.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_qemu_host_port_test.go b/fix/fixer_qemu_host_port_test.go index 7a9bf529c00..64aaeddcbb7 100644 --- a/fix/fixer_qemu_host_port_test.go +++ b/fix/fixer_qemu_host_port_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_scaleway_access_key.go b/fix/fixer_scaleway_access_key.go index cf9e173928a..c7e45484fab 100644 --- a/fix/fixer_scaleway_access_key.go +++ b/fix/fixer_scaleway_access_key.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_scaleway_access_key_test.go b/fix/fixer_scaleway_access_key_test.go index a91f1886cad..365bb467533 100644 --- a/fix/fixer_scaleway_access_key_test.go +++ b/fix/fixer_scaleway_access_key_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_ssh_timeout.go b/fix/fixer_ssh_timeout.go index d73b47d66e8..fc675199912 100644 --- a/fix/fixer_ssh_timeout.go +++ b/fix/fixer_ssh_timeout.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_ssh_timeout_test.go b/fix/fixer_ssh_timeout_test.go index 0c89b7cf7b3..558a94d9e23 100644 --- a/fix/fixer_ssh_timeout_test.go +++ b/fix/fixer_ssh_timeout_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_sshdisableagent.go b/fix/fixer_sshdisableagent.go index aa36504f010..1ed262f225c 100644 --- a/fix/fixer_sshdisableagent.go +++ b/fix/fixer_sshdisableagent.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_sshdisableagent_test.go b/fix/fixer_sshdisableagent_test.go index 1c5ecc38c87..9fc67bd763e 100644 --- a/fix/fixer_sshdisableagent_test.go +++ b/fix/fixer_sshdisableagent_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_sshkeypath.go b/fix/fixer_sshkeypath.go index 6c2f8ee0367..48bc8eee198 100644 --- a/fix/fixer_sshkeypath.go +++ b/fix/fixer_sshkeypath.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_sshkeypath_test.go b/fix/fixer_sshkeypath_test.go index 561db0ef788..c95917902a1 100644 --- a/fix/fixer_sshkeypath_test.go +++ b/fix/fixer_sshkeypath_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_test.go b/fix/fixer_test.go index 2b09611521b..091084ac794 100644 --- a/fix/fixer_test.go +++ b/fix/fixer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_virtualbox_gaattach.go b/fix/fixer_virtualbox_gaattach.go index 5fc0834c72b..23e8c7fdff2 100644 --- a/fix/fixer_virtualbox_gaattach.go +++ b/fix/fixer_virtualbox_gaattach.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_virtualbox_gaattach_test.go b/fix/fixer_virtualbox_gaattach_test.go index 62aa5b159a8..83fa00b59e7 100644 --- a/fix/fixer_virtualbox_gaattach_test.go +++ b/fix/fixer_virtualbox_gaattach_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_virtualbox_rename.go b/fix/fixer_virtualbox_rename.go index 86d53fd1ff4..a3723f2ed27 100644 --- a/fix/fixer_virtualbox_rename.go +++ b/fix/fixer_virtualbox_rename.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_virtualbox_rename_test.go b/fix/fixer_virtualbox_rename_test.go index 932975bd0a6..fc570f3095b 100644 --- a/fix/fixer_virtualbox_rename_test.go +++ b/fix/fixer_virtualbox_rename_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_vmware_compaction.go b/fix/fixer_vmware_compaction.go index cc833186dd1..906ff4d197d 100644 --- a/fix/fixer_vmware_compaction.go +++ b/fix/fixer_vmware_compaction.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_vmware_compaction_test.go b/fix/fixer_vmware_compaction_test.go index eb5494a3159..bd107705544 100644 --- a/fix/fixer_vmware_compaction_test.go +++ b/fix/fixer_vmware_compaction_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_vmware_rename.go b/fix/fixer_vmware_rename.go index c81e01b8577..5e7db8a6ed8 100644 --- a/fix/fixer_vmware_rename.go +++ b/fix/fixer_vmware_rename.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_vmware_rename_test.go b/fix/fixer_vmware_rename_test.go index 4c2cb095dc3..6d8710cfb74 100644 --- a/fix/fixer_vmware_rename_test.go +++ b/fix/fixer_vmware_rename_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_vsphere_network_storage.go b/fix/fixer_vsphere_network_storage.go index f82bc20463e..87723a9e9fc 100644 --- a/fix/fixer_vsphere_network_storage.go +++ b/fix/fixer_vsphere_network_storage.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/fixer_vsphere_network_storage_test.go b/fix/fixer_vsphere_network_storage_test.go index 59e4bbf1c62..54ebb8015e1 100644 --- a/fix/fixer_vsphere_network_storage_test.go +++ b/fix/fixer_vsphere_network_storage_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/fix/helpers.go b/fix/helpers.go index d4d01b22123..f3812674e3c 100644 --- a/fix/helpers.go +++ b/fix/helpers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fix diff --git a/go b/go deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/go.mod b/go.mod index 8b8d0a2f210..21cfd2aef87 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e github.com/dsnet/compress v0.0.1 github.com/go-git/go-git/v5 v5.4.2 - github.com/go-openapi/runtime v0.26.0 + github.com/go-openapi/runtime v0.25.0 github.com/gobwas/glob v0.2.3 github.com/gofrs/flock v0.8.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -17,48 +17,58 @@ require ( github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840 - github.com/hashicorp/go-getter/v2 v2.2.1 + github.com/hashicorp/go-getter/v2 v2.2.0 github.com/hashicorp/go-multierror v1.1.1 - github.com/hashicorp/go-uuid v1.0.3 + github.com/hashicorp/go-uuid v1.0.2 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/hcl/v2 v2.19.1 - github.com/hashicorp/hcp-sdk-go v0.74.0 + github.com/hashicorp/hcl/v2 v2.14.1 + github.com/hashicorp/hcp-sdk-go v0.36.0 github.com/hashicorp/packer-plugin-amazon v1.2.1 - github.com/hashicorp/packer-plugin-sdk v0.5.2 + github.com/hashicorp/packer-plugin-sdk v0.4.0 github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 github.com/klauspost/compress v1.13.6 // indirect github.com/klauspost/pgzip v1.2.5 github.com/masterzen/winrm v0.0.0-20210623064412-3b76017826b0 github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mattn/go-tty v0.0.0-20191112051231-74040eebce08 - github.com/mitchellh/cli v1.1.5 + github.com/mitchellh/cli v1.1.2 github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff // indirect github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/mapstructure v1.5.0 github.com/mitchellh/panicwrap v1.0.0 github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784 github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db // indirect + github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pkg/sftp v1.13.2 // indirect github.com/posener/complete v1.2.3 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.8.2 github.com/ulikunitz/xz v0.5.10 - github.com/zclconf/go-cty v1.13.3 + github.com/zclconf/go-cty v1.10.0 github.com/zclconf/go-cty-yaml v1.0.1 - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/mod v0.13.0 - golang.org/x/net v0.18.0 - golang.org/x/oauth2 v0.14.0 - golang.org/x/sync v0.4.0 - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.14.0 + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/mod v0.8.0 + golang.org/x/net v0.17.0 + golang.org/x/oauth2 v0.11.0 + golang.org/x/sync v0.3.0 + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/tools v0.6.0 google.golang.org/api v0.128.0 // indirect google.golang.org/grpc v1.59.0 ) require ( - github.com/go-openapi/strfmt v0.21.7 + github.com/go-openapi/strfmt v0.21.3 + github.com/hashicorp/packer-plugin-ansible v1.0.3 + github.com/hashicorp/packer-plugin-azure v1.4.0 + github.com/hashicorp/packer-plugin-docker v1.0.8 + github.com/hashicorp/packer-plugin-googlecompute v1.1.0 + github.com/hashicorp/packer-plugin-qemu v1.0.9 + github.com/hashicorp/packer-plugin-vagrant v1.0.3 + github.com/hashicorp/packer-plugin-virtualbox v1.0.4 + github.com/hashicorp/packer-plugin-vmware v1.0.7 + github.com/hashicorp/packer-plugin-vsphere v1.1.1 github.com/oklog/ulid v1.3.1 github.com/pierrec/lz4/v4 v4.1.18 github.com/shirou/gopsutil/v3 v3.23.4 @@ -69,70 +79,88 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.2 // indirect cloud.google.com/go/storage v1.30.1 // indirect + github.com/Azure/azure-sdk-for-go v64.0.0+incompatible // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.19 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect + github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect + github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect + github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.1.1 // indirect - github.com/Masterminds/sprig/v3 v3.2.1 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/sprig v2.22.0+incompatible // indirect github.com/Microsoft/go-winio v0.4.16 // indirect github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect github.com/acomagu/bufpipe v1.0.3 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-cidr v1.0.1 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/armon/go-metrics v0.4.1 // indirect + github.com/armon/go-metrics v0.3.9 // indirect github.com/armon/go-radix v1.0.0 // indirect - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect + github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/aws/aws-sdk-go v1.44.114 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/bmatcuk/doublestar v1.1.5 // indirect github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/chzyer/test v1.0.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1 // indirect + github.com/digitalocean/go-qemu v0.0.0-20210326154740-ac9e0b687001 // indirect + github.com/dimchansky/utfbom v1.1.1 // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect github.com/emirpasic/gods v1.12.0 // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/fatih/color v1.12.0 // indirect github.com/go-git/gcfg v1.5.0 // indirect github.com/go-git/go-billy/v5 v5.3.1 // indirect - github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/errors v0.20.4 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/errors v0.20.3 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/spec v0.20.9 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-openapi/validate v0.22.2 // indirect + github.com/go-openapi/spec v0.20.8 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/validate v0.22.1 // indirect github.com/gofrs/uuid v4.0.0+incompatible // indirect + github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 // indirect + github.com/golang-jwt/jwt v3.2.2+incompatible // indirect + github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.0.1 // indirect github.com/google/s2a-go v0.1.4 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.1 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/aws-sdk-go-base v0.7.1 // indirect - github.com/hashicorp/consul/api v1.25.1 // indirect + github.com/hashicorp/consul/api v1.10.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-azure-helpers v0.16.5 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter/gcs/v2 v2.2.1 // indirect - github.com/hashicorp/go-getter/s3/v2 v2.2.1 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-getter/gcs/v2 v2.2.0 // indirect + github.com/hashicorp/go-getter/s3/v2 v2.2.0 // indirect + github.com/hashicorp/go-hclog v0.16.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect - github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/serf v0.10.1 // indirect - github.com/hashicorp/vault/api v1.10.0 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hashicorp/serf v0.9.5 // indirect + github.com/hashicorp/vault/api v1.1.1 // indirect + github.com/hashicorp/vault/sdk v0.2.1 // indirect + github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect @@ -144,36 +172,36 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect github.com/matryer/is v1.4.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.13 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/iochan v1.0.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shoenig/go-m1cpu v0.1.5 // indirect - github.com/shopspring/decimal v1.2.0 // indirect github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect - github.com/spf13/cast v1.3.1 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/ugorji/go/codec v1.2.6 // indirect + github.com/vmware/govmomi v0.29.0 // indirect github.com/xanzy/ssh-agent v0.3.0 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.mongodb.org/mongo-driver v1.12.0 // indirect + go.mongodb.org/mongo-driver v1.11.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect + go.opentelemetry.io/otel v1.11.1 // indirect + go.opentelemetry.io/otel/trace v1.11.1 // indirect + golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -182,11 +210,10 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect + gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) go 1.20 - -replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.3 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/go.sum b/go.sum index 27c538c47c5..78887ed7807 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= @@ -11,6 +12,48 @@ cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+K cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v64.0.0+incompatible h1:WAA77WBDWYtNfCC95V70VvkdzHe+wM/r2MQ9mG7fnQs= +github.com/Azure/azure-sdk-for-go v64.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest v0.11.19 h1:7/IqD2fEYVha1EPeaiytVKhzmPV223pfkRIQUGOK2IE= +github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= +github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 h1:dMOmEJfkLKW/7JsokJqkyoYSgmR08hi9KrhjZb+JALY= +github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= +github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= +github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= @@ -20,17 +63,22 @@ github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nu github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 h1:w0E0fgc1YafGEh5cROhlROMWXiNoZqApk2PDN0M1+Ns= github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.1 h1:n6EPaDyLSvCEa3frruQvAiHuNp2dhBlMSmkEr+HuzGc= -github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= @@ -41,28 +89,33 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antchfx/xmlquery v1.3.5 h1:I7TuBRqsnfFuL11ruavGm911Awx9IqSdiU6W/ztSmVw= github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ= +github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0 h1:JaCC8jz0zdMLk2m+qCCVLLLM/PL93p84w4pK3aJWj60= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-cidr v1.0.1 h1:NmIwLZ/KdsjIUlhf+/Np40atNXm/+lZ5txfTJ/SpF+U= github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= +github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= +github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= -github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= +github.com/approvals/go-approval-tests v0.0.0-20210131072903-38d0b0ec12b1 h1:uroQ0JaeVom9Ffv9xFtc7DcqrpGmyQeZCRzHD9FqPBg= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= +github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.30.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.44.114 h1:plIkWc/RsHr3DXBj4MEw9sEW4CcL/e2ryokc+CKyq1I= github.com/aws/aws-sdk-go v1.44.114/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= @@ -78,6 +131,7 @@ github.com/biogo/hts v1.4.3 h1:vir2yUTiRkPvtp6ZTpzh9lWTKQJZXJKZ563rpAQAsRM= github.com/biogo/hts v1.4.3/go.mod h1:eW40HJ1l2ExK9C+yvvoRSftInqWsf3ue+zAEjzCGWjA= github.com/bmatcuk/doublestar v1.1.5 h1:2bNwBOmhyFEFcoB3tGvTD5xanq+4kyOZlB8wFYbMjkk= github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= +github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -99,17 +153,41 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200709052629-daa8e1ccc0bc/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1 h1:j6vGflaQ2T7yOWqVgPdiRF73j/U2Zmpbbzab8nyDCRQ= +github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1/go.mod h1:QS1XzqZLcDniNYrN7EZefq3wIyb/M2WmJbql4ZKoc1Q= +github.com/digitalocean/go-qemu v0.0.0-20210326154740-ac9e0b687001 h1:WAg57gnaAWWjMAELcwHjc2xy0PoXQ5G+vn3+XS6s1jI= +github.com/digitalocean/go-qemu v0.0.0-20210326154740-ac9e0b687001/go.mod h1:IetBE52JfFxK46p2n2Rqm+p5Gx1gpu2hRHsrbnPOWZQ= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= +github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v1.4.2-0.20200319182547-c7ad2b866182/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI= github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ= -github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6 h1:zWydSUQBJApHwpQ4guHi+mGyQN/8yN6xbKWdDtL3ZNM= +github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 h1:0bp6/GrNOrTDtSXe9YYGCwf8jp5Fb/b+4a6MTRm4qzY= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -118,15 +196,21 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE= +github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= @@ -137,10 +221,10 @@ github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6 github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= -github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= +github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -150,57 +234,98 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= -github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= +github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= +github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= -github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= +github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= +github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8= -github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= +github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= -github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= -github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.2 h1:Lda8nadL/5kIvS5mdXCAIuZ7IVXvKFIppLnw+EZh+n0= -github.com/go-openapi/validate v0.22.2/go.mod h1:kVxh31KbfsxU8ZyoHaDbLBWU5CnMdqBUEtadQ2G4d5M= +github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= +github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 h1:zN2lZNZRflqFyxVaTIU61KNKQ9C0055u9CAfpmqUvo4= +github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3/go.mod h1:nPpo7qLxd6XL3hWJG/O60sR8ZKfMCiIoNap5GvD12KU= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -214,8 +339,11 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -236,6 +364,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= @@ -244,17 +374,21 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.4 h1:uGy6JWR/uMIILU8wbf+ github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 h1:BpJ2o0OR5FV7vrkDYfXYVJQeMNWa8RhklZOpW2ITAIQ= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE= github.com/hashicorp/aws-sdk-go-base v0.7.1 h1:7s/aR3hFn74tYPVihzDyZe7y/+BorN70rr9ZvpV3j3o= github.com/hashicorp/aws-sdk-go-base v0.7.1/go.mod h1:2fRjWDv3jJBeN6mVWFHV6hFTNeFBx2gpDLQaZNxUVAY= -github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/api v1.10.1 h1:MwZJp86nlnL+6+W1Zly4JUuVn9YHhMggBirMpHGD7kw= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-azure-helpers v0.16.5 h1:rhcpg2Nk1Li6173KTHNnj/i+MGXYNjvYKIdNlg6q3RU= +github.com/hashicorp/go-azure-helpers v0.16.5/go.mod h1:kR7+sTDEb9TOp/O80ss1UEJg1t4/BHLD/U8wHLS4BGQ= github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de h1:XDCSythtg8aWSRSO29uwhgh7b127fWr+m5SemqjSUL8= github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de/go.mod h1:xIwEieBHERyEvaeKF/TcHh1Hu+lxPM+n2vT1+g9I4m4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -263,92 +397,133 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840 h1:kgvybwEeu0SXktbB2y3uLHX9lklLo+nzUwh59A3jzQc= github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840/go.mod h1:Abjk0jbRkDaNCzsRhOv2iDCofYpX1eVsjozoiK63qLA= -github.com/hashicorp/go-getter/gcs/v2 v2.2.1 h1:yZgDXYy5m4xogJV8hXzX5S/fM/rjJnBz+EzTeFrfLEM= -github.com/hashicorp/go-getter/gcs/v2 v2.2.1/go.mod h1:xzT3sNmGRipCRMpWz24fYHMvgb4MRn/smg5k2mhJ7Bo= -github.com/hashicorp/go-getter/s3/v2 v2.2.1 h1:Psuhz6iuCxJOd3kGinK46x+4BzcJgwff8BId7CuGPYU= -github.com/hashicorp/go-getter/s3/v2 v2.2.1/go.mod h1:KDqfEPgpwZIy+1sAplFX231CE+M6wdL5Q/j6OMbKSnw= -github.com/hashicorp/go-getter/v2 v2.2.1 h1:2JXqPZs1Jej67RtdTi0YZaEB2hEFB3fkBA4cPYKQwFQ= -github.com/hashicorp/go-getter/v2 v2.2.1/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= +github.com/hashicorp/go-getter/gcs/v2 v2.2.0 h1:oo6LVXva9I4CZzv531mn/FY5gtRx540I6eWwJVPWA4o= +github.com/hashicorp/go-getter/gcs/v2 v2.2.0/go.mod h1:oDHNhZN2Gf6UqfIol4S9PkbzMFlf8rBctrJvAHDTtOM= +github.com/hashicorp/go-getter/s3/v2 v2.2.0 h1:JGZihrdkZnuw+bDf8BnxuRLPwi0cfL2mwRlWA2lREAg= +github.com/hashicorp/go-getter/s3/v2 v2.2.0/go.mod h1:hj0uM2nGIi0rln/VcvxjaQYQg3WGssfUh/ya5jA555g= +github.com/hashicorp/go-getter/v2 v2.2.0 h1:vLenCsJqB5oNE141xKtT6cajhwAE8dneiNgzZA3oOqs= +github.com/hashicorp/go-getter/v2 v2.2.0/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.6.2/go.mod h1:gEx6HMUGxYYhJScX7W1Il64m6cc2C1mDaW3NQ9sY1FY= +github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4= github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= -github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= -github.com/hashicorp/hcp-sdk-go v0.74.0 h1:41AS+wk78UgB4wM6oAwkB7lMSmOUQTOYQ9pT2Gc2glA= -github.com/hashicorp/hcp-sdk-go v0.74.0/go.mod h1:5GwdT+HGhEQsh4n1yK+RADnQkfOo6vHgr2BpYUt2t9U= +github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= +github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hashicorp/hcp-sdk-go v0.36.0 h1:B1qvnsStyYQyuEudgPrpMdheEC/zTeHRhyF1UwpYTJQ= +github.com/hashicorp/hcp-sdk-go v0.36.0/go.mod h1:mJHPFD1Rs62bieKNVXUiFQlF76NCGACKqHu9a8ihcFk= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= -github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC7AO2g= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/packer-plugin-amazon v1.2.1 h1:0Xqr8KsTJJhIo0vvjqPYrVMgyVxNRuYH4DeB5m/WAtw= github.com/hashicorp/packer-plugin-amazon v1.2.1/go.mod h1:qlp0h5TWVGgcPzN9mSxPiEAwOUOW3XU/zep0pGd0ZsM= -github.com/hashicorp/packer-plugin-sdk v0.5.2 h1:N+9qzkZLkjR0bgY+l5wFvrTN0G/Mf9f7g2yLsrDjmFI= -github.com/hashicorp/packer-plugin-sdk v0.5.2/go.mod h1:0LRUBS6CPClHvq6zPoGRi7C+cZDAIEaW4CeH4LhWWuc= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= -github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hashicorp/vault/api v1.10.0 h1:/US7sIjWN6Imp4o/Rj1Ce2Nr5bki/AXi9vAW3p2tOJQ= -github.com/hashicorp/vault/api v1.10.0/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8= -github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= -github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/hashicorp/packer-plugin-ansible v1.0.3 h1:XjltQVPYnnZdNyBjwHr1QthR413SjZxTtRrmM0sM3VI= +github.com/hashicorp/packer-plugin-ansible v1.0.3/go.mod h1:N4OZtNDq2FSRBknuNU/GSoKtllfxQnHCYYaJUD1p1MA= +github.com/hashicorp/packer-plugin-azure v1.4.0 h1:rxkcGe5pjjnzddfR5/sBJmg8kb+ko+r2M+Ce7OC8sQ4= +github.com/hashicorp/packer-plugin-azure v1.4.0/go.mod h1:7j1q0SNPeZr7xRID0c/Hu9QojE41pSlSJwsNB9/rOTI= +github.com/hashicorp/packer-plugin-docker v1.0.8 h1:UWPG/pl+1RFsaNQVhEuowCeOZuES6/mqy5R6FTyMeQo= +github.com/hashicorp/packer-plugin-docker v1.0.8/go.mod h1:4U3gHULbUw3okSqqZgQZD5ptyJKs0S7LfOOt2U3V4Jk= +github.com/hashicorp/packer-plugin-googlecompute v1.1.0 h1:/cSZCJuRV6osaSa1uOy8cpN+c/uiCbrSsZ8vyNC0slk= +github.com/hashicorp/packer-plugin-googlecompute v1.1.0/go.mod h1:k7MhKwEDw9ASP3a1y1syKJFZiZ8pO4oH40HvVgGHzUE= +github.com/hashicorp/packer-plugin-qemu v1.0.9 h1:1YKBBzBULYUBWtpAZJTbaLjjZPAdQ63okkpTqMBTnzM= +github.com/hashicorp/packer-plugin-qemu v1.0.9/go.mod h1:BpWIpVpOoPFV9Ppmzq4DP/S0QNoh1R+7DUCqxHdXc+Y= +github.com/hashicorp/packer-plugin-sdk v0.4.0 h1:UyLYe0y02D9wkOQ3FeeZWyFg2+mx2vLuWRGUL5xt50I= +github.com/hashicorp/packer-plugin-sdk v0.4.0/go.mod h1:uNhU3pmjM2ejgHYce/g4J+sa5rh81iYQztpGvGa5FOs= +github.com/hashicorp/packer-plugin-vagrant v1.0.3 h1:IUfEdYuAjSjGsgJI2rnZ1qEo5rI0UWoueJ+yq9ysx4M= +github.com/hashicorp/packer-plugin-vagrant v1.0.3/go.mod h1:Ymg8LJrT8N2Dclu91G3ZhXpE67jL7hfbtyDVKeNsKTc= +github.com/hashicorp/packer-plugin-virtualbox v1.0.4 h1:mceFO34yhBU4BUMmCcQAB6KQ98GPjBIXTG3eS22RmZM= +github.com/hashicorp/packer-plugin-virtualbox v1.0.4/go.mod h1:rnDkWJpkbcFPBmsMZcoImWDd9kLjTiXiN0sfHypuHac= +github.com/hashicorp/packer-plugin-vmware v1.0.7 h1:cnc6XRNAkE+P5EoiI4VLXmIUeb2VAqW6zdNFmIW11YY= +github.com/hashicorp/packer-plugin-vmware v1.0.7/go.mod h1:AGeNk9f/qKUP8yGoiofMqvBw8TJLtdhsZgvqannZQS4= +github.com/hashicorp/packer-plugin-vsphere v1.1.1 h1:X4PtYV7TGPqoudjfvHpI2qRl9pAGf1SfkiJ7sMCKAEU= +github.com/hashicorp/packer-plugin-vsphere v1.1.1/go.mod h1:kLbvU4EwRISjhvY3c5pVisCKE0Usn+pOMRkIPnwcPfU= +github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/vault/api v1.0.5-0.20200519221902-385fac77e20f/go.mod h1:euTFbi2YJgwcju3imEt919lhJKF68nN1cQPq3aA+kBE= +github.com/hashicorp/vault/api v1.1.1 h1:907ld+Z9cALyvbZK2qUX9cLwvSaEQsMVQB3x2KE8+AI= +github.com/hashicorp/vault/api v1.1.1/go.mod h1:29UXcn/1cLOPHQNMWA7bCz2By4PSd0VKPAydKXS5yN0= +github.com/hashicorp/vault/sdk v0.1.14-0.20200519221530-14615acda45f/go.mod h1:WX57W2PwkrOPQ6rVQk+dy5/htHIaB4aBM70EwKThu10= +github.com/hashicorp/vault/sdk v0.2.1 h1:S4O6Iv/dyKlE9AUTXGa7VOvZmsCvg36toPKgV4f2P4M= +github.com/hashicorp/vault/sdk v0.2.1/go.mod h1:WfUiO1vYzfBkz1TmoE4ZGU7HD0T0Cl/rZwaxjBkgN4U= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 h1:brI5vBRUlAlM34VFmnLPwjnCL/FxAJp9XvOdX6Zt+XE= +github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 h1:IPJ3dvxmJ4uczJe5YQdrYB16oTJlGSC/OyZDqUk9xX4= github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -356,6 +531,7 @@ github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgo github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kortschak/utter v0.0.0-20190412033250-50fe362e6560/go.mod h1:oDr41C7kH9wvAikWyFhr6UFr8R7nelpmCF5XR5rL7I8= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -363,12 +539,13 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -376,6 +553,8 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 h1:2ZKn+w/BJeL43sCxI2jhPLRv73oVVOjEKZjKkflyqxg= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= @@ -387,30 +566,27 @@ github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwM github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= +github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-tty v0.0.0-20191112051231-74040eebce08 h1:8YAWbq7rJqfbc6IaAvA2eCQuOQvf6Bs4vHKcOyWw//E= github.com/mattn/go-tty v0.0.0-20191112051231-74040eebce08/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26 h1:gPxPSwALAeHJSjarOs00QjVdV9QoBvc1D2ujQUr5BzU= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= -github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= +github.com/mitchellh/cli v1.1.2 h1:PvH+lL2B7IQ101xQL63Of8yFS2y+aDlsFcsqNc+u/Kw= +github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -420,14 +596,20 @@ github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff h1:bFJ74ac7ZK/jyis github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff/go.mod h1:g7SZj7ABpStq3tM4zqHiVEG5un/DZ1+qJJKO7qx1EvU= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed h1:FI2NIv6fpef6BQl2u3IZX/Cj20tfypRF4yd+uaHOMtI= +github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -444,14 +626,24 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/nywilken/go-cty v1.13.3 h1:03U99oXf3j3g9xgqAE3YGpixCjM8Mg09KZ0Ji9LzX0o= -github.com/nywilken/go-cty v1.13.3/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db h1:9uViuKtx1jrlXLBW/pMnhOfzn3iSEdLase/But/IZRU= @@ -459,42 +651,55 @@ github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db/go.mod h1 github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= +github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.2 h1:taJnKntsWgU+qae21Rx52lIwndAdKrj0mfUNQsz1z4Q= github.com/pkg/sftp v1.13.2/go.mod h1:LzqnAvaD5TWeNBsZpfKxSYn1MbjWwOsCIAFFJbpIsK8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= @@ -505,15 +710,17 @@ github.com/shoenig/go-m1cpu v0.1.5 h1:LF57Z/Fpb/WdGLjt2HZilNnmZOxg/q2bSKTQhgbrLr github.com/shoenig/go-m1cpu v0.1.5/go.mod h1:Wwvst4LR89UxjeFtLRMrpgRiyY4xPsejnVZym39dbAQ= github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c= github.com/shoenig/test v0.6.3/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -526,12 +733,11 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= @@ -544,172 +750,233 @@ github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxW github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmware/govmomi v0.29.0 h1:SHJQ7DUc4fltFZv16znJNGHR1/XhiDK5iKxm2OqwkuU= +github.com/vmware/govmomi v0.29.0/go.mod h1:F7adsVewLNHsW/IIm7ziFURaXDaHEwcc+ym4r3INMdY= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= +github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= +github.com/zclconf/go-cty v1.4.0/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0qXAFGQ= +github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0= +github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= -go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= +go.mongodb.org/mongo-driver v1.11.0 h1:FZKhBSTydeuffHj9CBjXlR8vQLee1cQyTWYPA6/tqiE= +go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= +go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= +go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= +go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= +go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 h1:t3ZHqovedSY8DEAUmZA99fPJhUhOb176PLACYA1sJ8Y= +golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1/go.mod h1:jFTmtFYCV0MFtXBU+J5V/+5AUeVS0ON/0WkE/KSrl6E= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= @@ -718,9 +985,12 @@ google.golang.org/api v0.128.0 h1:RjPESny5CnQRn9V6siglged+DZCgfu9l6mO9dkX9VOg= google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= @@ -730,10 +1000,15 @@ google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1: google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -753,6 +1028,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -762,6 +1038,14 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= +gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -776,7 +1060,10 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/hcl2template/addrs/doc.go b/hcl2template/addrs/doc.go index 783284822ba..9768f453d12 100644 --- a/hcl2template/addrs/doc.go +++ b/hcl2template/addrs/doc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package addrs contains types that represent "addresses", which are // references to specific objects within a Packer configuration. diff --git a/hcl2template/addrs/input_variable.go b/hcl2template/addrs/input_variable.go index 9ffbf6fb0a4..e2821e7e5b1 100644 --- a/hcl2template/addrs/input_variable.go +++ b/hcl2template/addrs/input_variable.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package addrs diff --git a/hcl2template/addrs/parse_ref.go b/hcl2template/addrs/parse_ref.go index 3f6c7320179..866ced8f459 100644 --- a/hcl2template/addrs/parse_ref.go +++ b/hcl2template/addrs/parse_ref.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package addrs diff --git a/hcl2template/addrs/plugin.go b/hcl2template/addrs/plugin.go index 9db29b31717..8b4891044fc 100644 --- a/hcl2template/addrs/plugin.go +++ b/hcl2template/addrs/plugin.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package addrs diff --git a/hcl2template/addrs/plugin_test.go b/hcl2template/addrs/plugin_test.go index e99a72416b8..491d2221a1c 100644 --- a/hcl2template/addrs/plugin_test.go +++ b/hcl2template/addrs/plugin_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package addrs diff --git a/hcl2template/addrs/referenceable.go b/hcl2template/addrs/referenceable.go index 2b11d6008bc..9b54c5bac49 100644 --- a/hcl2template/addrs/referenceable.go +++ b/hcl2template/addrs/referenceable.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package addrs diff --git a/hcl2template/common_test.go b/hcl2template/common_test.go index 831ce5d3596..cb37a7bf996 100644 --- a/hcl2template/common_test.go +++ b/hcl2template/common_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/components.go b/hcl2template/components.go index e83f8b3768d..956a753f38b 100644 --- a/hcl2template/components.go +++ b/hcl2template/components.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/decode.go b/hcl2template/decode.go index 1dcd34c55ce..137e54eec05 100644 --- a/hcl2template/decode.go +++ b/hcl2template/decode.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/docs.go b/hcl2template/docs.go index cf970f2e8e1..2b19f42b029 100644 --- a/hcl2template/docs.go +++ b/hcl2template/docs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package hcl2template defines code to parse hcl2 template files. // diff --git a/hcl2template/formatter.go b/hcl2template/formatter.go index c04bb114748..171d919b89a 100644 --- a/hcl2template/formatter.go +++ b/hcl2template/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/formatter_test.go b/hcl2template/formatter_test.go index 8cb909292a9..07fc88c5a0f 100644 --- a/hcl2template/formatter_test.go +++ b/hcl2template/formatter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/function/Consul.go b/hcl2template/function/Consul.go index e1e51b2299b..4f51ca41d15 100644 --- a/hcl2template/function/Consul.go +++ b/hcl2template/function/Consul.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function diff --git a/hcl2template/function/aws_secretetkey.go b/hcl2template/function/aws_secretetkey.go index 4684c9bf2d2..50b4fe9ee53 100644 --- a/hcl2template/function/aws_secretetkey.go +++ b/hcl2template/function/aws_secretetkey.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function diff --git a/hcl2template/function/datetime.go b/hcl2template/function/datetime.go index a2b0cc9d17c..1d807e407d3 100644 --- a/hcl2template/function/datetime.go +++ b/hcl2template/function/datetime.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function @@ -12,20 +12,19 @@ import ( "github.com/zclconf/go-cty/cty/function" ) -// initTime is the UTC time when this package was initialized. It is +// InitTime is the UTC time when this package was initialized. It is // used as the timestamp for all configuration templates so that they // match for a single build. -var initTime time.Time +var InitTime time.Time func init() { - initTime = time.Now().UTC() + InitTime = time.Now().UTC() } // TimestampFunc constructs a function that returns a string representation of the current date and time. var TimestampFunc = function.New(&function.Spec{ - Params: []function.Parameter{}, - Type: function.StaticReturnType(cty.String), - RefineResult: refineNotNull, + Params: []function.Parameter{}, + Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { return cty.StringVal(time.Now().UTC().Format(time.RFC3339)), nil }, @@ -41,46 +40,42 @@ func Timestamp() (cty.Value, error) { } // LegacyIsotimeFunc constructs a function that returns a string representation -// of the current date and time using the Go language datetime formatting syntax. +// of the current date and time using golang's datetime formatting. var LegacyIsotimeFunc = function.New(&function.Spec{ Params: []function.Parameter{}, VarParam: &function.Parameter{ Name: "format", Type: cty.String, }, - Type: function.StaticReturnType(cty.String), - RefineResult: refineNotNull, + Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { if len(args) > 1 { return cty.StringVal(""), fmt.Errorf("too many values, 1 needed: %v", args) - } - if len(args) == 0 { - return cty.StringVal(initTime.Format(time.RFC3339)), nil + } else if len(args) == 0 { + return cty.StringVal(InitTime.Format(time.RFC3339)), nil } format := args[0].AsString() - return cty.StringVal(initTime.Format(format)), nil + return cty.StringVal(InitTime.Format(format)), nil }, }) // LegacyStrftimeFunc constructs a function that returns a string representation -// of the current date and time using the Go language strftime datetime formatting syntax. +// of the current date and time using golang's strftime datetime formatting. var LegacyStrftimeFunc = function.New(&function.Spec{ Params: []function.Parameter{}, VarParam: &function.Parameter{ Name: "format", Type: cty.String, }, - Type: function.StaticReturnType(cty.String), - RefineResult: refineNotNull, + Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { if len(args) > 1 { return cty.StringVal(""), fmt.Errorf("too many values, 1 needed: %v", args) - } - if len(args) == 0 { - return cty.StringVal(initTime.Format(time.RFC3339)), nil + } else if len(args) == 0 { + return cty.StringVal(InitTime.Format(time.RFC3339)), nil } format := args[0].AsString() - return cty.StringVal(strftime.Format(format, initTime)), nil + return cty.StringVal(strftime.Format(format, InitTime)), nil }, }) diff --git a/hcl2template/function/datetime_test.go b/hcl2template/function/datetime_test.go index 416b6fa23f3..686564803cc 100644 --- a/hcl2template/function/datetime_test.go +++ b/hcl2template/function/datetime_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function diff --git a/hcl2template/function/env.go b/hcl2template/function/env.go index b6c36e68494..aeb632aba75 100644 --- a/hcl2template/function/env.go +++ b/hcl2template/function/env.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function @@ -21,8 +21,7 @@ var EnvFunc = function.New(&function.Spec{ AllowUnknown: false, }, }, - Type: function.StaticReturnType(cty.String), - RefineResult: refineNotNull, + Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { key := args[0].AsString() value := os.Getenv(key) diff --git a/hcl2template/function/index.go b/hcl2template/function/index.go index 8aade576ded..3c5f73ccda9 100644 --- a/hcl2template/function/index.go +++ b/hcl2template/function/index.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function @@ -23,8 +23,7 @@ var IndexFunc = function.New(&function.Spec{ Type: cty.DynamicPseudoType, }, }, - Type: function.StaticReturnType(cty.Number), - RefineResult: refineNotNull, + Type: function.StaticReturnType(cty.Number), Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) { if !(args[0].Type().IsListType() || args[0].Type().IsTupleType()) { return cty.NilVal, errors.New("argument must be a list or tuple") diff --git a/hcl2template/function/index_test.go b/hcl2template/function/index_test.go index 0a46da34ce8..d70511ad516 100644 --- a/hcl2template/function/index_test.go +++ b/hcl2template/function/index_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function diff --git a/hcl2template/function/length.go b/hcl2template/function/length.go index f2b83dad925..90ab7997ec9 100644 --- a/hcl2template/function/length.go +++ b/hcl2template/function/length.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function @@ -29,7 +29,6 @@ var LengthFunc = function.New(&function.Spec{ return cty.Number, errors.New("argument must be a string, a collection type, or a structural type") } }, - RefineResult: refineNotNull, Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { coll := args[0] collTy := args[0].Type() diff --git a/hcl2template/function/length_test.go b/hcl2template/function/length_test.go index 9bae3886f74..2c6f10c49d6 100644 --- a/hcl2template/function/length_test.go +++ b/hcl2template/function/length_test.go @@ -1,11 +1,10 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function import ( "fmt" - "math" "testing" "github.com/zclconf/go-cty/cty" @@ -70,15 +69,11 @@ func TestLength(t *testing.T) { }, { cty.UnknownVal(cty.List(cty.Bool)), - cty.UnknownVal(cty.Number).Refine(). - NotNull(). - NumberRangeLowerBound(cty.Zero, true). - NumberRangeUpperBound(cty.NumberIntVal(math.MaxInt), true). - NewValue(), + cty.UnknownVal(cty.Number), }, { cty.DynamicVal, - cty.UnknownVal(cty.Number).RefineNotNull(), + cty.UnknownVal(cty.Number), }, { cty.StringVal("hello"), @@ -123,10 +118,11 @@ func TestLength(t *testing.T) { }, { cty.UnknownVal(cty.String), - cty.UnknownVal(cty.Number).Refine(). - NotNull(). - NumberRangeLowerBound(cty.Zero, true). - NewValue(), + cty.UnknownVal(cty.Number), + }, + { + cty.DynamicVal, + cty.UnknownVal(cty.Number), }, } diff --git a/hcl2template/function/refinements.go b/hcl2template/function/refinements.go deleted file mode 100644 index 99314d7ee48..00000000000 --- a/hcl2template/function/refinements.go +++ /dev/null @@ -1,9 +0,0 @@ -package function - -import ( - "github.com/zclconf/go-cty/cty" -) - -func refineNotNull(b *cty.RefinementBuilder) *cty.RefinementBuilder { - return b.NotNull() -} diff --git a/hcl2template/function/templatefile.go b/hcl2template/function/templatefile.go index 0b927cf834a..eee0092197c 100644 --- a/hcl2template/function/templatefile.go +++ b/hcl2template/function/templatefile.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function diff --git a/hcl2template/function/templatefile_test.go b/hcl2template/function/templatefile_test.go index f12967dd3c5..a4536b59ca5 100644 --- a/hcl2template/function/templatefile_test.go +++ b/hcl2template/function/templatefile_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function diff --git a/hcl2template/function/vault.go b/hcl2template/function/vault.go index 3b9c092442e..4aa49da6753 100644 --- a/hcl2template/function/vault.go +++ b/hcl2template/function/vault.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package function diff --git a/hcl2template/functions.go b/hcl2template/functions.go index c74754bdf90..cc144940cf6 100644 --- a/hcl2template/functions.go +++ b/hcl2template/functions.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/internal/mock.go b/hcl2template/internal/mock.go index 4d3adb14ae5..86d5b0e0e06 100644 --- a/hcl2template/internal/mock.go +++ b/hcl2template/internal/mock.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type MockConfig,NestedMockConfig,MockTag diff --git a/hcl2template/parser.go b/hcl2template/parser.go index c372a7733a9..f32df189242 100644 --- a/hcl2template/parser.go +++ b/hcl2template/parser.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/plugin.go b/hcl2template/plugin.go index 321616017b6..ac109ee7911 100644 --- a/hcl2template/plugin.go +++ b/hcl2template/plugin.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template @@ -133,22 +133,10 @@ func (cfg *PackerConfig) initializeBlocks() hcl.Diagnostics { // its body. srcUsage := &(build.Sources[i]) if !cfg.parser.PluginConfig.Builders.Has(srcUsage.Type) { - detail := fmt.Sprintf( - "The %s %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ - "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ - "https://developer.hashicorp.com/packer/integrations?filter=%s", - buildSourceLabel, - srcUsage.Type, - strings.Split(srcUsage.Type, "-")[0], - ) - - if sugg := didyoumean.NameSuggestion(srcUsage.Type, cfg.parser.PluginConfig.Builders.List()); sugg != "" { - detail = fmt.Sprintf("Did you mean to use %q?", sugg) - } diags = append(diags, &hcl.Diagnostic{ Summary: "Unknown " + buildSourceLabel + " type " + srcUsage.Type, Subject: &build.HCL2Ref.DefRange, - Detail: detail, + Detail: fmt.Sprintf("known builders: %v", cfg.parser.PluginConfig.Builders.List()), Severity: hcl.DiagError, }) continue @@ -181,23 +169,10 @@ func (cfg *PackerConfig) initializeBlocks() hcl.Diagnostics { for _, provBlock := range build.ProvisionerBlocks { if !cfg.parser.PluginConfig.Provisioners.Has(provBlock.PType) { - detail := fmt.Sprintf( - "The %s %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ - "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ - "https://developer.hashicorp.com/packer/integrations?filter=%s", - buildProvisionerLabel, - provBlock.PType, - strings.Split(provBlock.PType, "-")[0], - ) - - if sugg := didyoumean.NameSuggestion(provBlock.PType, cfg.parser.PluginConfig.Provisioners.List()); sugg != "" { - detail = fmt.Sprintf("Did you mean to use %q?", sugg) - } - diags = append(diags, &hcl.Diagnostic{ Summary: fmt.Sprintf("Unknown "+buildProvisionerLabel+" type %q", provBlock.PType), Subject: provBlock.HCL2Ref.TypeRange.Ptr(), - Detail: detail, + Detail: fmt.Sprintf("known "+buildProvisionerLabel+"s: %v", cfg.parser.PluginConfig.Provisioners.List()), Severity: hcl.DiagError, }) } @@ -205,23 +180,10 @@ func (cfg *PackerConfig) initializeBlocks() hcl.Diagnostics { if build.ErrorCleanupProvisionerBlock != nil { if !cfg.parser.PluginConfig.Provisioners.Has(build.ErrorCleanupProvisionerBlock.PType) { - detail := fmt.Sprintf( - "The %s %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ - "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ - "https://developer.hashicorp.com/packer/integrations?filter=%s", - buildErrorCleanupProvisionerLabel, - build.ErrorCleanupProvisionerBlock.PType, - strings.Split(build.ErrorCleanupProvisionerBlock.PType, "-")[0], - ) - - if sugg := didyoumean.NameSuggestion(build.ErrorCleanupProvisionerBlock.PType, cfg.parser.PluginConfig.Provisioners.List()); sugg != "" { - detail = fmt.Sprintf("Did you mean to use %q?", sugg) - } - diags = append(diags, &hcl.Diagnostic{ Summary: fmt.Sprintf("Unknown "+buildErrorCleanupProvisionerLabel+" type %q", build.ErrorCleanupProvisionerBlock.PType), Subject: build.ErrorCleanupProvisionerBlock.HCL2Ref.TypeRange.Ptr(), - Detail: detail, + Detail: fmt.Sprintf("known "+buildErrorCleanupProvisionerLabel+"s: %v", cfg.parser.PluginConfig.Provisioners.List()), Severity: hcl.DiagError, }) } @@ -230,23 +192,10 @@ func (cfg *PackerConfig) initializeBlocks() hcl.Diagnostics { for _, ppList := range build.PostProcessorsLists { for _, ppBlock := range ppList { if !cfg.parser.PluginConfig.PostProcessors.Has(ppBlock.PType) { - detail := fmt.Sprintf( - "The %s %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ - "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ - "https://developer.hashicorp.com/packer/integrations?filter=%s", - buildPostProcessorLabel, - ppBlock.PType, - strings.Split(ppBlock.PType, "-")[0], - ) - - if sugg := didyoumean.NameSuggestion(ppBlock.PType, cfg.parser.PluginConfig.PostProcessors.List()); sugg != "" { - detail = fmt.Sprintf("Did you mean to use %q?", sugg) - } - diags = append(diags, &hcl.Diagnostic{ Summary: fmt.Sprintf("Unknown "+buildPostProcessorLabel+" type %q", ppBlock.PType), Subject: ppBlock.HCL2Ref.TypeRange.Ptr(), - Detail: detail, + Detail: fmt.Sprintf("known "+buildPostProcessorLabel+"s: %v", cfg.parser.PluginConfig.PostProcessors.List()), Severity: hcl.DiagError, }) } diff --git a/hcl2template/repl/format.go b/hcl2template/repl/format.go index 8d99a4392d0..8e596e4be9d 100644 --- a/hcl2template/repl/format.go +++ b/hcl2template/repl/format.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package repl diff --git a/hcl2template/repl/repl.go b/hcl2template/repl/repl.go index eb13353eed0..7a698f87f5b 100644 --- a/hcl2template/repl/repl.go +++ b/hcl2template/repl/repl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package repl provides the structs and functions necessary to run REPL for // HCL2. The REPL allows experimentation of HCL2 interpolations without having diff --git a/hcl2template/shim/mock.go b/hcl2template/shim/mock.go index 40fdbca4d32..adeda84dd39 100644 --- a/hcl2template/shim/mock.go +++ b/hcl2template/shim/mock.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type MockConfig,NestedMockConfig,MockTag diff --git a/hcl2template/shim/values.go b/hcl2template/shim/values.go index 096c8c23d56..88580f1f2c1 100644 --- a/hcl2template/shim/values.go +++ b/hcl2template/shim/values.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2shim diff --git a/hcl2template/shim/values_test.go b/hcl2template/shim/values_test.go index 4449e711bc9..46e154002cd 100644 --- a/hcl2template/shim/values_test.go +++ b/hcl2template/shim/values_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2shim diff --git a/hcl2template/types.build.from.go b/hcl2template/types.build.from.go index fb1544ef53a..9661fa167b0 100644 --- a/hcl2template/types.build.from.go +++ b/hcl2template/types.build.from.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.build.go b/hcl2template/types.build.go index 648305ee202..2ab6aa718fe 100644 --- a/hcl2template/types.build.go +++ b/hcl2template/types.build.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.build.hcp_packer_registry.go b/hcl2template/types.build.hcp_packer_registry.go index b64b3ff4e55..6d1b99f2ec9 100644 --- a/hcl2template/types.build.hcp_packer_registry.go +++ b/hcl2template/types.build.hcp_packer_registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.build.hcp_packer_registry_test.go b/hcl2template/types.build.hcp_packer_registry_test.go index 3ada389c29d..18c8ca3fa34 100644 --- a/hcl2template/types.build.hcp_packer_registry_test.go +++ b/hcl2template/types.build.hcp_packer_registry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.build.post-processor.go b/hcl2template/types.build.post-processor.go index 8844eadff11..1216f32ebfd 100644 --- a/hcl2template/types.build.post-processor.go +++ b/hcl2template/types.build.post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.build.provisioners.go b/hcl2template/types.build.provisioners.go index b08eca59f63..8459f1be921 100644 --- a/hcl2template/types.build.provisioners.go +++ b/hcl2template/types.build.provisioners.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.build.provisioners_test.go b/hcl2template/types.build.provisioners_test.go index 284651f2cbd..e19570dff29 100644 --- a/hcl2template/types.build.provisioners_test.go +++ b/hcl2template/types.build.provisioners_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.build_test.go b/hcl2template/types.build_test.go index 8647821dd18..376646c6376 100644 --- a/hcl2template/types.build_test.go +++ b/hcl2template/types.build_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.datasource.go b/hcl2template/types.datasource.go index 23bc7c5900f..68df0a695e8 100644 --- a/hcl2template/types.datasource.go +++ b/hcl2template/types.datasource.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.datasource_test.go b/hcl2template/types.datasource_test.go index d12fcafd076..b22f438d64b 100644 --- a/hcl2template/types.datasource_test.go +++ b/hcl2template/types.datasource_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.hcl_post-processor.go b/hcl2template/types.hcl_post-processor.go index b9d200758de..26974aacedf 100644 --- a/hcl2template/types.hcl_post-processor.go +++ b/hcl2template/types.hcl_post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.hcl_provisioner.go b/hcl2template/types.hcl_provisioner.go index b607a0092a2..022a2fd58d1 100644 --- a/hcl2template/types.hcl_provisioner.go +++ b/hcl2template/types.hcl_provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.hcl_ref.go b/hcl2template/types.hcl_ref.go index f3e6176dbf1..091a2043610 100644 --- a/hcl2template/types.hcl_ref.go +++ b/hcl2template/types.hcl_ref.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 10963226160..79c17825478 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.packer_config_test.go b/hcl2template/types.packer_config_test.go index 5eae6a2f21f..d8881c18415 100644 --- a/hcl2template/types.packer_config_test.go +++ b/hcl2template/types.packer_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.required_plugins.go b/hcl2template/types.required_plugins.go index d5e010345ea..179434c29f0 100644 --- a/hcl2template/types.required_plugins.go +++ b/hcl2template/types.required_plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.required_plugins_test.go b/hcl2template/types.required_plugins_test.go index 0329d1505ff..7d832c4788f 100644 --- a/hcl2template/types.required_plugins_test.go +++ b/hcl2template/types.required_plugins_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.source.go b/hcl2template/types.source.go index 46b9caac98e..1ea939d015f 100644 --- a/hcl2template/types.source.go +++ b/hcl2template/types.source.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.source_test.go b/hcl2template/types.source_test.go index 47caeec5a75..efdddea5abe 100644 --- a/hcl2template/types.source_test.go +++ b/hcl2template/types.source_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/types.variables.go b/hcl2template/types.variables.go index b3754e8f111..9111ced9a44 100644 --- a/hcl2template/types.variables.go +++ b/hcl2template/types.variables.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template @@ -741,6 +741,7 @@ func (cfg *PackerConfig) collectInputVariableValues(env []string, files []*hcl.F Severity: hcl.DiagError, Summary: "Invalid argument value for -var variable", Detail: fmt.Sprintf("The received arg value for %s is not compatible with the variable's type constraint: %s.", name, err), + Subject: expr.Range().Ptr(), }) val = cty.DynamicVal } diff --git a/hcl2template/types.variables_test.go b/hcl2template/types.variables_test.go index a19b80bd990..d0691a0910c 100644 --- a/hcl2template/types.variables_test.go +++ b/hcl2template/types.variables_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/utils.go b/hcl2template/utils.go index ce9486ed676..d3d0cb29447 100644 --- a/hcl2template/utils.go +++ b/hcl2template/utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/version.go b/hcl2template/version.go index f6f584a69a5..920cff51031 100644 --- a/hcl2template/version.go +++ b/hcl2template/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/hcl2template/version_required.go b/hcl2template/version_required.go index f8c67228bfb..c418eda550a 100644 --- a/hcl2template/version_required.go +++ b/hcl2template/version_required.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcl2template diff --git a/helper/wrappedreadline/wrappedreadline.go b/helper/wrappedreadline/wrappedreadline.go index 9d4bd7fcf25..6641cb8960b 100644 --- a/helper/wrappedreadline/wrappedreadline.go +++ b/helper/wrappedreadline/wrappedreadline.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // STOLEN SHAMELESSLY FROM THE TERRAFORM REPO BECAUSE VENDORING OUT // WRAPPEDREADLINE AND WRAPPEDSTREAMS FELT LIKE TOO MUCH WORK. diff --git a/helper/wrappedreadline/wrappedreadline_solaris.go b/helper/wrappedreadline/wrappedreadline_solaris.go index 55eac364548..fb2a9388e00 100644 --- a/helper/wrappedreadline/wrappedreadline_solaris.go +++ b/helper/wrappedreadline/wrappedreadline_solaris.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wrappedreadline diff --git a/helper/wrappedreadline/wrappedreadline_unix.go b/helper/wrappedreadline/wrappedreadline_unix.go index 7d01bb3a99e..ff621e7da9e 100644 --- a/helper/wrappedreadline/wrappedreadline_unix.go +++ b/helper/wrappedreadline/wrappedreadline_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build darwin || dragonfly || freebsd || (linux && !appengine) || netbsd || openbsd // +build darwin dragonfly freebsd linux,!appengine netbsd openbsd diff --git a/helper/wrappedreadline/wrappedreadline_windows.go b/helper/wrappedreadline/wrappedreadline_windows.go index 88d04a06ab8..d3d361579f1 100644 --- a/helper/wrappedreadline/wrappedreadline_windows.go +++ b/helper/wrappedreadline/wrappedreadline_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/helper/wrappedstreams/streams.go b/helper/wrappedstreams/streams.go index 1b18abf1958..80d1e66b259 100644 --- a/helper/wrappedstreams/streams.go +++ b/helper/wrappedstreams/streams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // STOLEN SHAMELESSLY FROM THE TERRAFORM REPO BECAUSE VENDORING OUT // WRAPPEDREADLINE AND WRAPPEDSTREAMS FELT LIKE TOO MUCH WORK. diff --git a/helper/wrappedstreams/streams_other.go b/helper/wrappedstreams/streams_other.go index 98045b535da..34ecf76d06a 100644 --- a/helper/wrappedstreams/streams_other.go +++ b/helper/wrappedstreams/streams_other.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !windows // +build !windows diff --git a/helper/wrappedstreams/streams_windows.go b/helper/wrappedstreams/streams_windows.go index 5a0d01de4fc..18489fdc268 100644 --- a/helper/wrappedstreams/streams_windows.go +++ b/helper/wrappedstreams/streams_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/internal/hcp/api/client.go b/internal/hcp/api/client.go index 97a749a33bf..f28999d57b6 100644 --- a/internal/hcp/api/client.go +++ b/internal/hcp/api/client.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package api provides access to the HCP Packer Registry API. package api @@ -11,10 +11,12 @@ import ( "os" "time" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" packerSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" - organizationSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/client/organization_service" - projectSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/client/project_service" - rmmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/models" + organizationSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/client/organization_service" + projectSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/client/project_service" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" + rmmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" "github.com/hashicorp/hcp-sdk-go/httpclient" "github.com/hashicorp/packer/internal/hcp/env" "github.com/hashicorp/packer/version" @@ -164,13 +166,13 @@ func (c *Client) loadProjectID() error { } // getOldestProject retrieves the oldest project from a list based on its created_at time. -func getOldestProject(projects []*rmmodels.HashicorpCloudResourcemanagerProject) (*rmmodels.HashicorpCloudResourcemanagerProject, error) { +func getOldestProject(projects []*models.HashicorpCloudResourcemanagerProject) (*models.HashicorpCloudResourcemanagerProject, error) { if len(projects) == 0 { return nil, fmt.Errorf("no project found") } oldestTime := time.Now() - var oldestProj *rmmodels.HashicorpCloudResourcemanagerProject + var oldestProj *models.HashicorpCloudResourcemanagerProject for _, proj := range projects { projTime := time.Time(proj.CreatedAt) if projTime.Before(oldestTime) { @@ -184,7 +186,7 @@ func getOldestProject(projects []*rmmodels.HashicorpCloudResourcemanagerProject) // ValidateRegistryForProject validates that there is an active registry associated to the configured organization and project ids. // A successful validation will result in a nil response. All other response represent an invalid registry error request or a registry not found error. func (client *Client) ValidateRegistryForProject() error { - params := packerSvc.NewPackerServiceGetRegistryParams() + params := packer_service.NewPackerServiceGetRegistryParams() params.LocationOrganizationID = client.OrganizationID params.LocationProjectID = client.ProjectID diff --git a/internal/hcp/api/client_test.go b/internal/hcp/api/client_test.go index 7868feca440..16d321beb77 100644 --- a/internal/hcp/api/client_test.go +++ b/internal/hcp/api/client_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package api @@ -8,7 +8,7 @@ import ( "time" "github.com/go-openapi/strfmt" - "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/models" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/preview/2019-12-10/models" ) func TestGetOldestProject(t *testing.T) { diff --git a/internal/hcp/api/errors.go b/internal/hcp/api/errors.go index cff55fc9e09..32a5708cc14 100644 --- a/internal/hcp/api/errors.go +++ b/internal/hcp/api/errors.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package api diff --git a/internal/hcp/api/mock_service.go b/internal/hcp/api/mock_service.go index ac01c94d002..9a126346e06 100644 --- a/internal/hcp/api/mock_service.go +++ b/internal/hcp/api/mock_service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package api @@ -9,6 +9,7 @@ import ( "strconv" "github.com/go-openapi/runtime" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" packerSvc "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/client/packer_service" "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2021-04-30/models" "google.golang.org/grpc/codes" @@ -51,7 +52,7 @@ func NewMockPackerClientService() *MockPackerClientService { return &m } -func (svc *MockPackerClientService) PackerServiceCreateBucket(params *packerSvc.PackerServiceCreateBucketParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceCreateBucketOK, error) { +func (svc *MockPackerClientService) PackerServiceCreateBucket(params *packerSvc.PackerServiceCreateBucketParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceCreateBucketOK, error) { if svc.BucketAlreadyExist { return nil, status.Error(codes.AlreadyExists, fmt.Sprintf("Code:%d %s", codes.AlreadyExists, codes.AlreadyExists.String())) @@ -78,7 +79,7 @@ func (svc *MockPackerClientService) PackerServiceCreateBucket(params *packerSvc. return ok, nil } -func (svc *MockPackerClientService) PackerServiceUpdateBucket(params *packerSvc.PackerServiceUpdateBucketParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceUpdateBucketOK, error) { +func (svc *MockPackerClientService) PackerServiceUpdateBucket(params *packerSvc.PackerServiceUpdateBucketParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceUpdateBucketOK, error) { if svc.TrackCalledServiceMethods { svc.UpdateBucketCalled = true } @@ -86,7 +87,7 @@ func (svc *MockPackerClientService) PackerServiceUpdateBucket(params *packerSvc. return packerSvc.NewPackerServiceUpdateBucketOK(), nil } -func (svc *MockPackerClientService) PackerServiceCreateIteration(params *packerSvc.PackerServiceCreateIterationParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceCreateIterationOK, error) { +func (svc *MockPackerClientService) PackerServiceCreateIteration(params *packerSvc.PackerServiceCreateIterationParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceCreateIterationOK, error) { if svc.IterationAlreadyExist { return nil, status.Error(codes.AlreadyExists, fmt.Sprintf("Code:%d %s", codes.AlreadyExists, codes.AlreadyExists.String())) } @@ -115,7 +116,7 @@ func (svc *MockPackerClientService) PackerServiceCreateIteration(params *packerS return ok, nil } -func (svc *MockPackerClientService) PackerServiceGetIteration(params *packerSvc.PackerServiceGetIterationParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceGetIterationOK, error) { +func (svc *MockPackerClientService) PackerServiceGetIteration(params *packerSvc.PackerServiceGetIterationParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceGetIterationOK, error) { if !svc.IterationAlreadyExist { return nil, status.Error(codes.AlreadyExists, fmt.Sprintf("Code:%d %s", codes.Aborted, codes.Aborted.String())) } @@ -163,7 +164,7 @@ func (svc *MockPackerClientService) PackerServiceGetIteration(params *packerSvc. return ok, nil } -func (svc *MockPackerClientService) PackerServiceCreateBuild(params *packerSvc.PackerServiceCreateBuildParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceCreateBuildOK, error) { +func (svc *MockPackerClientService) PackerServiceCreateBuild(params *packerSvc.PackerServiceCreateBuildParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceCreateBuildOK, error) { if params.BucketSlug == "" { return nil, errors.New("No valid BucketSlug was passed in") } @@ -196,7 +197,7 @@ func (svc *MockPackerClientService) PackerServiceCreateBuild(params *packerSvc.P return ok, nil } -func (svc *MockPackerClientService) PackerServiceUpdateBuild(params *packerSvc.PackerServiceUpdateBuildParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceUpdateBuildOK, error) { +func (svc *MockPackerClientService) PackerServiceUpdateBuild(params *packerSvc.PackerServiceUpdateBuildParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceUpdateBuildOK, error) { if params.BuildID == "" { return nil, errors.New("No valid BuildID was passed in") } @@ -222,7 +223,7 @@ func (svc *MockPackerClientService) PackerServiceUpdateBuild(params *packerSvc.P return ok, nil } -func (svc *MockPackerClientService) PackerServiceListBuilds(params *packerSvc.PackerServiceListBuildsParams, _ runtime.ClientAuthInfoWriter, opts ...packerSvc.ClientOption) (*packerSvc.PackerServiceListBuildsOK, error) { +func (svc *MockPackerClientService) PackerServiceListBuilds(params *packerSvc.PackerServiceListBuildsParams, _ runtime.ClientAuthInfoWriter, opts ...packer_service.ClientOption) (*packerSvc.PackerServiceListBuildsOK, error) { status := models.HashicorpCloudPackerBuildStatusUNSET images := make([]*models.HashicorpCloudPackerImage, 0) diff --git a/internal/hcp/api/service.go b/internal/hcp/api/service.go index df56bdbd58c..a0ee9f8ce4c 100644 --- a/internal/hcp/api/service.go +++ b/internal/hcp/api/service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package api diff --git a/internal/hcp/env/env.go b/internal/hcp/env/env.go index 972fd68f77e..0186be1671f 100644 --- a/internal/hcp/env/env.go +++ b/internal/hcp/env/env.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package env provides HCP Packer environment variables. package env diff --git a/internal/hcp/env/env_test.go b/internal/hcp/env/env_test.go index a773b41c928..1de73f5913d 100644 --- a/internal/hcp/env/env_test.go +++ b/internal/hcp/env/env_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package env diff --git a/internal/hcp/env/variables.go b/internal/hcp/env/variables.go index a8c1a493e13..8c74b600d47 100644 --- a/internal/hcp/env/variables.go +++ b/internal/hcp/env/variables.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package env diff --git a/internal/hcp/registry/artifact.go b/internal/hcp/registry/artifact.go index 7257d302f3d..a0b0049cc9f 100644 --- a/internal/hcp/registry/artifact.go +++ b/internal/hcp/registry/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/errors.go b/internal/hcp/registry/errors.go index 8bc458d241b..a93f960f996 100644 --- a/internal/hcp/registry/errors.go +++ b/internal/hcp/registry/errors.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/hcl.go b/internal/hcp/registry/hcl.go index 531fd648c7e..64c57a51761 100644 --- a/internal/hcp/registry/hcl.go +++ b/internal/hcp/registry/hcl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/hcp.go b/internal/hcp/registry/hcp.go index c0d12726e2d..838350b7641 100644 --- a/internal/hcp/registry/hcp.go +++ b/internal/hcp/registry/hcp.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/json.go b/internal/hcp/registry/json.go index 92aa6db904c..bb0bba14674 100644 --- a/internal/hcp/registry/json.go +++ b/internal/hcp/registry/json.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/null_registry.go b/internal/hcp/registry/null_registry.go index f7dbcdf0970..5aee3e6bcd1 100644 --- a/internal/hcp/registry/null_registry.go +++ b/internal/hcp/registry/null_registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/registry.go b/internal/hcp/registry/registry.go index 35485a8993e..b095e14ea2f 100644 --- a/internal/hcp/registry/registry.go +++ b/internal/hcp/registry/registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package registry provides access to the HCP registry. package registry diff --git a/internal/hcp/registry/types.bucket.go b/internal/hcp/registry/types.bucket.go index d4239f45005..7e548643a65 100644 --- a/internal/hcp/registry/types.bucket.go +++ b/internal/hcp/registry/types.bucket.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/types.bucket_service_test.go b/internal/hcp/registry/types.bucket_service_test.go index 6503b95fb02..5fa28ac4e93 100644 --- a/internal/hcp/registry/types.bucket_service_test.go +++ b/internal/hcp/registry/types.bucket_service_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/types.bucket_test.go b/internal/hcp/registry/types.bucket_test.go index 9c1467ad714..30f73dec51c 100644 --- a/internal/hcp/registry/types.bucket_test.go +++ b/internal/hcp/registry/types.bucket_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/types.builds.go b/internal/hcp/registry/types.builds.go index 991ef563a00..9245a9d3141 100644 --- a/internal/hcp/registry/types.builds.go +++ b/internal/hcp/registry/types.builds.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/types.iterations.go b/internal/hcp/registry/types.iterations.go index c186a2a256d..b9ffc232243 100644 --- a/internal/hcp/registry/types.iterations.go +++ b/internal/hcp/registry/types.iterations.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/internal/hcp/registry/types.iterations_test.go b/internal/hcp/registry/types.iterations_test.go index 27e87b5798f..fe7132d6b36 100644 --- a/internal/hcp/registry/types.iterations_test.go +++ b/internal/hcp/registry/types.iterations_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package registry diff --git a/log.go b/log.go index 72744bc3dd5..2c15a700a16 100644 --- a/log.go +++ b/log.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/main.go b/main.go index fe902f5bdb3..59af0a7b580 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // This is the main package for the `packer` application. @@ -251,16 +251,6 @@ func wrappedMain() int { Ui: ui, } - //versionCLIHelper shortcuts "--version" and "-v" to just show the version - versionCLIHelper := &cli.CLI{ - Args: args, - Version: version.Version, - } - if versionCLIHelper.IsVersion() && versionCLIHelper.Version != "" { - // by default version flags ignore all other args so there is no need to persist the original args. - args = []string{"version"} - } - cli := &cli.CLI{ Args: args, Autocomplete: true, diff --git a/main_test.go b/main_test.go index b71319e9dea..69be0aca87e 100644 --- a/main_test.go +++ b/main_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/packer/build.go b/packer/build.go index e51e71d00c9..3309bb194d5 100644 --- a/packer/build.go +++ b/packer/build.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/build_test.go b/packer/build_test.go index c15eec5b570..86531d8ca4b 100644 --- a/packer/build_test.go +++ b/packer/build_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/builder_test.go b/packer/builder_test.go index 85b7eaf5f08..1276552788b 100644 --- a/packer/builder_test.go +++ b/packer/builder_test.go @@ -1,4 +1,4 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/client_test.go b/packer/client_test.go index c914a3edaed..8656537e269 100644 --- a/packer/client_test.go +++ b/packer/client_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_builder.go b/packer/cmd_builder.go index 8b472d1fb24..99a0bc6f913 100644 --- a/packer/cmd_builder.go +++ b/packer/cmd_builder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_builder_test.go b/packer/cmd_builder_test.go index a47bcea31b8..dfc5d15fb99 100644 --- a/packer/cmd_builder_test.go +++ b/packer/cmd_builder_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_datasource.go b/packer/cmd_datasource.go index 0e2d6b79892..4e8b32561ed 100644 --- a/packer/cmd_datasource.go +++ b/packer/cmd_datasource.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_datasource_test.go b/packer/cmd_datasource_test.go index 1616b218cf7..c174c8ee02b 100644 --- a/packer/cmd_datasource_test.go +++ b/packer/cmd_datasource_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_hook.go b/packer/cmd_hook.go index f3973a98a0d..ace3d2c032d 100644 --- a/packer/cmd_hook.go +++ b/packer/cmd_hook.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_hook_test.go b/packer/cmd_hook_test.go index ed149c5af7c..f2a1f4d9246 100644 --- a/packer/cmd_hook_test.go +++ b/packer/cmd_hook_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_post_processor.go b/packer/cmd_post_processor.go index 139c9133390..c686a3937ef 100644 --- a/packer/cmd_post_processor.go +++ b/packer/cmd_post_processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_post_processor_test.go b/packer/cmd_post_processor_test.go index 3c69d899f6b..ce70a8bf125 100644 --- a/packer/cmd_post_processor_test.go +++ b/packer/cmd_post_processor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_provisioner.go b/packer/cmd_provisioner.go index 335b7bd97ec..965ad89587f 100644 --- a/packer/cmd_provisioner.go +++ b/packer/cmd_provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/cmd_provisioner_test.go b/packer/cmd_provisioner_test.go index 6c2005b9354..5bb86942ace 100644 --- a/packer/cmd_provisioner_test.go +++ b/packer/cmd_provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/core.go b/packer/core.go index 7a56dc06cc5..b711af080bc 100644 --- a/packer/core.go +++ b/packer/core.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer @@ -18,7 +18,6 @@ import ( multierror "github.com/hashicorp/go-multierror" version "github.com/hashicorp/go-version" hcl "github.com/hashicorp/hcl/v2" - "github.com/hashicorp/packer-plugin-sdk/didyoumean" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" @@ -219,33 +218,15 @@ func (c *Core) BuildNames(only, except []string) []string { func (c *Core) generateCoreBuildProvisioner(rawP *template.Provisioner, rawName string) (CoreBuildProvisioner, error) { // Get the provisioner cbp := CoreBuildProvisioner{} - - if !c.components.PluginConfig.Provisioners.Has(rawP.Type) { - err := fmt.Errorf( - "The provisioner %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ - "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ - "https://developer.hashicorp.com/packer/integrations?filter=%s", - rawP.Type, - strings.Split(rawP.Type, "-")[0], - ) - - if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Provisioners.List()); sugg != "" { - err = fmt.Errorf("Did you mean to use %q?", sugg) - } - - return cbp, err - } - provisioner, err := c.components.PluginConfig.Provisioners.Start(rawP.Type) if err != nil { return cbp, fmt.Errorf( "error initializing provisioner '%s': %s", rawP.Type, err) } - // Seems unlikely that a provisioner doesn't start successfully without error if provisioner == nil { return cbp, fmt.Errorf( - "provisioner failed to be started and did not error: %s", rawP.Type) + "provisioner type not found: %s", rawP.Type) } // Get the configuration @@ -354,22 +335,6 @@ func (c *Core) Build(n string) (packersdk.Build, error) { // For reference, the builtin BuilderStore is generated in // packer/config.go in the Discover() func. - if !c.components.PluginConfig.Builders.Has(configBuilder.Type) { - err := fmt.Errorf( - "The builder %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ - "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ - "https://developer.hashicorp.com/packer/integrations?filter=%s", - configBuilder.Type, - strings.Split(configBuilder.Type, "-")[0], - ) - - if sugg := didyoumean.NameSuggestion(configBuilder.Type, c.components.PluginConfig.Builders.List()); sugg != "" { - err = fmt.Errorf("Did you mean to use %q?", sugg) - } - - return nil, err - } - // the Start command launches the builder plugin of the given type without // calling Prepare() or passing any build-specific details. builder, err := c.components.PluginConfig.Builders.Start(configBuilder.Type) @@ -431,22 +396,6 @@ func (c *Core) Build(n string) (packersdk.Build, error) { break } - if !c.components.PluginConfig.PostProcessors.Has(rawP.Type) { - err := fmt.Errorf( - "The post-processor %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+ - "You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+ - "https://developer.hashicorp.com/packer/integrations?filter=%s", - rawP.Type, - strings.Split(rawP.Type, "-")[0], - ) - - if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.PostProcessors.List()); sugg != "" { - err = fmt.Errorf("Did you mean to use %q?", sugg) - } - - return nil, err - } - // Get the post-processor postProcessor, err := c.components.PluginConfig.PostProcessors.Start(rawP.Type) if err != nil { diff --git a/packer/core_test.go b/packer/core_test.go index b1694cbf86c..e46f62e6b0e 100644 --- a/packer/core_test.go +++ b/packer/core_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/maps.go b/packer/maps.go index 1d99802dfef..6fec5c67950 100644 --- a/packer/maps.go +++ b/packer/maps.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/packer_test.go b/packer/packer_test.go index 2f52c5e76d2..bc75903397b 100644 --- a/packer/packer_test.go +++ b/packer/packer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/plugin-getter/checksum.go b/packer/plugin-getter/checksum.go index d7193ba3b7f..507a17e6537 100644 --- a/packer/plugin-getter/checksum.go +++ b/packer/plugin-getter/checksum.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package plugingetter diff --git a/packer/plugin-getter/docs.go b/packer/plugin-getter/docs.go index 216a7781d2f..6c8cfba37cf 100644 --- a/packer/plugin-getter/docs.go +++ b/packer/plugin-getter/docs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package plugingetter defines means to download and install plugins. package plugingetter diff --git a/packer/plugin-getter/github/docs.go b/packer/plugin-getter/github/docs.go index 50fa13e30ae..9c189dfd3a3 100644 --- a/packer/plugin-getter/github/docs.go +++ b/packer/plugin-getter/github/docs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package github defines a Github getter. diff --git a/packer/plugin-getter/github/getter.go b/packer/plugin-getter/github/getter.go index a4942a42163..eb2aea38d2c 100644 --- a/packer/plugin-getter/github/getter.go +++ b/packer/plugin-getter/github/getter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package github diff --git a/packer/plugin-getter/plugins.go b/packer/plugin-getter/plugins.go index d6f52ebcc22..84b5d8da1da 100644 --- a/packer/plugin-getter/plugins.go +++ b/packer/plugin-getter/plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package plugingetter @@ -177,7 +177,7 @@ func (pr Requirement) ListInstallations(opts ListInstallationsOptions) (InstallL continue } - res = append(res, &Installation{ + res.InsertSortedUniq(&Installation{ BinaryPath: path, Version: pluginVersionStr, }) @@ -206,6 +206,22 @@ func (l InstallList) String() string { return v.String() } +// InsertSortedUniq inserts the installation in the right spot in the list by +// comparing the version lexicographically. +// A Duplicate version will replace any already present version. +func (l *InstallList) InsertSortedUniq(install *Installation) { + pos := sort.Search(len(*l), func(i int) bool { return (*l)[i].Version >= install.Version }) + if len(*l) > pos && (*l)[pos].Version == install.Version { + // already detected, let's ignore any new foundings, this way any plugin + // close to cwd or the packer exec takes precedence; this will be better + // for plugin development/tests. + return + } + (*l) = append((*l), nil) + copy((*l)[pos+1:], (*l)[pos:]) + (*l)[pos] = install +} + // Installation describes a plugin installation type Installation struct { // path to where binary is installed, if installed. @@ -228,9 +244,6 @@ type InstallOptions struct { // folder of this list. InFolders []string - // Forces installation of the plugin, even if already installed. - Force bool - BinaryInstallationOptions } @@ -569,7 +582,7 @@ func (pr *Requirement) InstallLatest(opts InstallOptions) (*Installation, error) log.Printf("[TRACE] found a pre-exising %q checksum file", potentialChecksumer.Type) // if outputFile is there and matches the checksum: do nothing more. - if err := localChecksum.ChecksumFile(localChecksum.Expected, potentialOutputFilename); err == nil && !opts.Force { + if err := localChecksum.ChecksumFile(localChecksum.Expected, potentialOutputFilename); err == nil { log.Printf("[INFO] %s v%s plugin is already correctly installed in %q", pr.Identifier, version, potentialOutputFilename) return nil, nil // success } @@ -700,7 +713,7 @@ func (pr *Requirement) InstallLatest(opts InstallOptions) (*Installation, error) log.Printf("[WARNING] %v, ignoring", err) } - if err := os.WriteFile(outputFileName+checksum.Checksummer.FileExt(), []byte(hex.EncodeToString(cs)), 0644); err != nil { + if err := os.WriteFile(outputFileName+checksum.Checksummer.FileExt(), []byte(hex.EncodeToString(cs)), 0555); err != nil { err := fmt.Errorf("failed to write local binary checksum file: %s", err) errs = multierror.Append(errs, err) log.Printf("[WARNING] %v, ignoring", err) diff --git a/packer/plugin-getter/plugins_test.go b/packer/plugin-getter/plugins_test.go index e13f8cb3825..03e34251ecd 100644 --- a/packer/plugin-getter/plugins_test.go +++ b/packer/plugin-getter/plugins_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package plugingetter @@ -27,8 +27,6 @@ var ( pluginFolderTwo = filepath.Join("testdata", "plugins_2") - pluginFolderThree = filepath.Join("testdata", "plugins_3") - pluginFolderWrongChecksums = filepath.Join("testdata", "wrong_checksums") ) @@ -108,8 +106,8 @@ func TestPlugin_ListInstallations(t *testing.T) { BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.5_x5.0_windows_amd64.exe"), }, { - Version: "v4.5.6", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), + Version: "v4.5.6", }, { Version: "v4.5.7", @@ -119,22 +117,10 @@ func TestPlugin_ListInstallations(t *testing.T) { Version: "v4.5.8", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.8_x5.0_windows_amd64.exe"), }, - { - Version: "v4.5.6", - BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), - }, { Version: "v4.5.9", BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.9_x5.0_windows_amd64.exe"), }, - { - Version: "v4.5.6", - BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp copy", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), - }, - { - Version: "v4.5.9", - BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp copy", "google", "packer-plugin-google_v4.5.9_x5.0_windows_amd64.exe"), - }, }, }, @@ -202,10 +188,6 @@ func TestPlugin_ListInstallations(t *testing.T) { Version: "v1.2.3", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.3_x5.0_darwin_amd64"), }, - { - Version: "v1.2.3", - BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.3_x5.1_darwin_amd64"), - }, { Version: "v1.2.4", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.4_x5.0_darwin_amd64"), @@ -294,48 +276,12 @@ func TestPlugin_ListInstallations(t *testing.T) { Version: "v4.5.8", BinaryPath: filepath.Join(pluginFolderOne, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.8_x5.0_windows_amd64.exe"), }, - { - Version: "v4.5.6", - BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.6_x5.0_windows_amd64.exe"), - }, { Version: "v4.5.9", BinaryPath: filepath.Join(pluginFolderTwo, "github.com", "hashicorp", "google", "packer-plugin-google_v4.5.9_x5.0_windows_amd64.exe"), }, }, }, - { - "test nil identifier - multiple plugins with same version", - fields{ - Identifier: "", - }, - ListInstallationsOptions{ - []string{ - pluginFolderThree, - }, - BinaryInstallationOptions{ - APIVersionMajor: "5", APIVersionMinor: "0", - OS: "linux", ARCH: "amd64", - Checksummers: []Checksummer{ - { - Type: "sha256", - Hash: sha256.New(), - }, - }, - }, - }, - false, - []*Installation{ - { - Version: "v1.2.5", - BinaryPath: filepath.Join(pluginFolderThree, "github.com", "hashicorp", "alazon", "packer-plugin-alazon_v1.2.5_x5.0_linux_amd64"), - }, - { - Version: "v1.2.5", - BinaryPath: filepath.Join(pluginFolderThree, "github.com", "hashicorp", "amazon", "packer-plugin-amazon_v1.2.5_x5.0_linux_amd64"), - }, - }, - }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -403,7 +349,6 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, - false, BinaryInstallationOptions{ APIVersionMajor: "5", APIVersionMinor: "0", OS: "darwin", ARCH: "amd64", @@ -440,7 +385,6 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, - false, BinaryInstallationOptions{ APIVersionMajor: "5", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", @@ -486,7 +430,6 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, - false, BinaryInstallationOptions{ APIVersionMajor: "5", APIVersionMinor: "0", OS: "darwin", ARCH: "amd64", @@ -534,7 +477,6 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, - false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", @@ -585,7 +527,6 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, - false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", @@ -636,7 +577,6 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, - false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "linux", ARCH: "amd64", @@ -681,7 +621,6 @@ func TestRequirement_InstallLatest(t *testing.T) { pluginFolderOne, pluginFolderTwo, }, - false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", @@ -723,7 +662,6 @@ func TestRequirement_InstallLatest(t *testing.T) { []string{ pluginFolderWrongChecksums, }, - false, BinaryInstallationOptions{ APIVersionMajor: "6", APIVersionMinor: "1", OS: "darwin", ARCH: "amd64", diff --git a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64 b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64 deleted file mode 100644 index 7813681f5b4..00000000000 --- a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM deleted file mode 100644 index 2ef9d7d4c35..00000000000 --- a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/alazon/packer-plugin-alazon_v1.2.5_x5.0_linux_amd64_SHA256SUM +++ /dev/null @@ -1 +0,0 @@ -ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d \ No newline at end of file diff --git a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64 b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64 deleted file mode 100644 index 7813681f5b4..00000000000 --- a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM b/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM deleted file mode 100644 index 2ef9d7d4c35..00000000000 --- a/packer/plugin-getter/testdata/plugins_3/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.5_x5.0_linux_amd64_SHA256SUM +++ /dev/null @@ -1 +0,0 @@ -ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d \ No newline at end of file diff --git a/packer/plugin.go b/packer/plugin.go index 313ef2db31e..caf05df0e4a 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/plugin_client.go b/packer/plugin_client.go index 01e899e2813..bcd71890043 100644 --- a/packer/plugin_client.go +++ b/packer/plugin_client.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/plugin_discover_test.go b/packer/plugin_discover_test.go index 901c3d42f1d..fec52607d83 100644 --- a/packer/plugin_discover_test.go +++ b/packer/plugin_discover_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/plugin_folders.go b/packer/plugin_folders.go index e1d4dbea4a2..52d63aac4cc 100644 --- a/packer/plugin_folders.go +++ b/packer/plugin_folders.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/plugin_test.go b/packer/plugin_test.go index a912ca07a38..099d9cf6c8a 100644 --- a/packer/plugin_test.go +++ b/packer/plugin_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/post_processor_mock.go b/packer/post_processor_mock.go index 5a9bfc85ae2..b6156e28ceb 100644 --- a/packer/post_processor_mock.go +++ b/packer/post_processor_mock.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type MockPostProcessor package packer diff --git a/packer/progressbar.go b/packer/progressbar.go index 0a9225047c3..c7e68f7c2ba 100644 --- a/packer/progressbar.go +++ b/packer/progressbar.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !solaris // +build !solaris diff --git a/packer/progressbar_solaris.go b/packer/progressbar_solaris.go index 7aa199339a7..cfc0266f27a 100644 --- a/packer/progressbar_solaris.go +++ b/packer/progressbar_solaris.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/progressbar_test.go b/packer/progressbar_test.go index 20edc07c9b2..4d4c3f22e66 100644 --- a/packer/progressbar_test.go +++ b/packer/progressbar_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/provisioner.go b/packer/provisioner.go index c7761adeb5f..66d61d9fb98 100644 --- a/packer/provisioner.go +++ b/packer/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/provisioner_test.go b/packer/provisioner_test.go index bc646e5ca10..d5e191038c9 100644 --- a/packer/provisioner_test.go +++ b/packer/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/provisioner_timeout.go b/packer/provisioner_timeout.go index f1183744cdb..c7407130cb4 100644 --- a/packer/provisioner_timeout.go +++ b/packer/provisioner_timeout.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/run_interfaces.go b/packer/run_interfaces.go index 07829e629e1..253998c20a4 100644 --- a/packer/run_interfaces.go +++ b/packer/run_interfaces.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/telemetry.go b/packer/telemetry.go index c3d0573ef5e..1245ce5229a 100644 --- a/packer/telemetry.go +++ b/packer/telemetry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/telemetry_test.go b/packer/telemetry_test.go index 7abc600cda1..a45db2bcb3e 100644 --- a/packer/telemetry_test.go +++ b/packer/telemetry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/testing.go b/packer/testing.go index b0ebc04b95f..2f01e18aafc 100644 --- a/packer/testing.go +++ b/packer/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/ui.go b/packer/ui.go index c01e9591a54..dac5689205c 100644 --- a/packer/ui.go +++ b/packer/ui.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/packer/ui_test.go b/packer/ui_test.go index 44fa93c7f07..1d15cb4ea0f 100644 --- a/packer/ui_test.go +++ b/packer/ui_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package packer diff --git a/panic.go b/panic.go index 6fdfc59af24..6f609645345 100644 --- a/panic.go +++ b/panic.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/post-processor/artifice/artifact.go b/post-processor/artifice/artifact.go index 859b05e6199..4f481b2be29 100644 --- a/post-processor/artifice/artifact.go +++ b/post-processor/artifice/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package artifice diff --git a/post-processor/artifice/post-processor.go b/post-processor/artifice/post-processor.go index d1a4f422268..334d8531b6b 100644 --- a/post-processor/artifice/post-processor.go +++ b/post-processor/artifice/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/post-processor/artifice/version/version.go b/post-processor/artifice/version/version.go index b329b365688..b426efb501a 100644 --- a/post-processor/artifice/version/version.go +++ b/post-processor/artifice/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/post-processor/checksum/artifact.go b/post-processor/checksum/artifact.go index 5468460d53a..eb1eeeeec26 100644 --- a/post-processor/checksum/artifact.go +++ b/post-processor/checksum/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checksum diff --git a/post-processor/checksum/post-processor.go b/post-processor/checksum/post-processor.go index efd51b6a169..28b107cd8e6 100644 --- a/post-processor/checksum/post-processor.go +++ b/post-processor/checksum/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/post-processor/checksum/post-processor_test.go b/post-processor/checksum/post-processor_test.go index 6a08f029735..eff52c929ea 100644 --- a/post-processor/checksum/post-processor_test.go +++ b/post-processor/checksum/post-processor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checksum diff --git a/post-processor/checksum/version/version.go b/post-processor/checksum/version/version.go index 9e1eeb239d9..74332d82388 100644 --- a/post-processor/checksum/version/version.go +++ b/post-processor/checksum/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/post-processor/compress/artifact.go b/post-processor/compress/artifact.go index c56b2905daf..20c7ef7d0b3 100644 --- a/post-processor/compress/artifact.go +++ b/post-processor/compress/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package compress diff --git a/post-processor/compress/artifact_test.go b/post-processor/compress/artifact_test.go index a30a803edf6..d0c1da8caeb 100644 --- a/post-processor/compress/artifact_test.go +++ b/post-processor/compress/artifact_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package compress diff --git a/post-processor/compress/benchmark.go b/post-processor/compress/benchmark.go index e315f3bcf2d..cdbeb733f29 100644 --- a/post-processor/compress/benchmark.go +++ b/post-processor/compress/benchmark.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build ignore // +build ignore diff --git a/post-processor/compress/post-processor.go b/post-processor/compress/post-processor.go index 07a74e813d0..bf0cb1041d2 100644 --- a/post-processor/compress/post-processor.go +++ b/post-processor/compress/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/post-processor/compress/post-processor_test.go b/post-processor/compress/post-processor_test.go index 00b8a1377ca..04aea52b1e5 100644 --- a/post-processor/compress/post-processor_test.go +++ b/post-processor/compress/post-processor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package compress diff --git a/post-processor/compress/tar_fix.go b/post-processor/compress/tar_fix.go index 0402f4e7075..ad58cb18fa9 100644 --- a/post-processor/compress/tar_fix.go +++ b/post-processor/compress/tar_fix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !go1.10 // +build !go1.10 diff --git a/post-processor/compress/tar_fix_go110.go b/post-processor/compress/tar_fix_go110.go index 2e0eba8d8cf..5eac3dea192 100644 --- a/post-processor/compress/tar_fix_go110.go +++ b/post-processor/compress/tar_fix_go110.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build go1.10 // +build go1.10 diff --git a/post-processor/compress/version/version.go b/post-processor/compress/version/version.go index 75bfb46f656..639290a83ef 100644 --- a/post-processor/compress/version/version.go +++ b/post-processor/compress/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/post-processor/manifest/artifact.go b/post-processor/manifest/artifact.go index ceef83f8123..b70c7deceb0 100644 --- a/post-processor/manifest/artifact.go +++ b/post-processor/manifest/artifact.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package manifest diff --git a/post-processor/manifest/post-processor.go b/post-processor/manifest/post-processor.go index 74f203525d9..3063c51bdfe 100644 --- a/post-processor/manifest/post-processor.go +++ b/post-processor/manifest/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config //go:generate packer-sdc struct-markdown diff --git a/post-processor/manifest/version/version.go b/post-processor/manifest/version/version.go index 86f862f89fd..20a5523154a 100644 --- a/post-processor/manifest/version/version.go +++ b/post-processor/manifest/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/post-processor/shell-local/post-processor.go b/post-processor/shell-local/post-processor.go index 801e8ac6567..334081e5927 100644 --- a/post-processor/shell-local/post-processor.go +++ b/post-processor/shell-local/post-processor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell_local diff --git a/post-processor/shell-local/post-processor_test.go b/post-processor/shell-local/post-processor_test.go index 13121658af2..44d29f3cb2a 100644 --- a/post-processor/shell-local/post-processor_test.go +++ b/post-processor/shell-local/post-processor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell_local diff --git a/post-processor/shell-local/version/version.go b/post-processor/shell-local/version/version.go index 1f602bc5f46..1d02737909d 100644 --- a/post-processor/shell-local/version/version.go +++ b/post-processor/shell-local/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/provisioner/breakpoint/provisioner.go b/provisioner/breakpoint/provisioner.go index 9ac6e340fb2..893dc2d79c9 100644 --- a/provisioner/breakpoint/provisioner.go +++ b/provisioner/breakpoint/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/breakpoint/version/version.go b/provisioner/breakpoint/version/version.go index 2024c7e5a74..008af956575 100644 --- a/provisioner/breakpoint/version/version.go +++ b/provisioner/breakpoint/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/provisioner/file/provisioner.go b/provisioner/file/provisioner.go index 586896611d9..84e9c3744fa 100644 --- a/provisioner/file/provisioner.go +++ b/provisioner/file/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config //go:generate packer-sdc struct-markdown diff --git a/provisioner/file/provisioner_test.go b/provisioner/file/provisioner_test.go index 280afa0250a..8f54634b3f1 100644 --- a/provisioner/file/provisioner_test.go +++ b/provisioner/file/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package file diff --git a/provisioner/file/version/version.go b/provisioner/file/version/version.go index 8451cf03227..e5b7923463f 100644 --- a/provisioner/file/version/version.go +++ b/provisioner/file/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/provisioner/powershell/execution_policy.go b/provisioner/powershell/execution_policy.go index 057f60a2ec7..94463db2b24 100644 --- a/provisioner/powershell/execution_policy.go +++ b/provisioner/powershell/execution_policy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate enumer -transform snake -trimprefix ExecutionPolicy -type ExecutionPolicy diff --git a/provisioner/powershell/execution_policy_test.go b/provisioner/powershell/execution_policy_test.go index 5631b78bdd1..8b82c97f270 100644 --- a/provisioner/powershell/execution_policy_test.go +++ b/provisioner/powershell/execution_policy_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package powershell diff --git a/provisioner/powershell/provisioner.go b/provisioner/powershell/provisioner.go index aae71f9fb3e..65ed16d1bf2 100644 --- a/provisioner/powershell/provisioner.go +++ b/provisioner/powershell/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/powershell/provisioner_acc_test.go b/provisioner/powershell/provisioner_acc_test.go index 8073d011334..efe2a2789d5 100644 --- a/provisioner/powershell/provisioner_acc_test.go +++ b/provisioner/powershell/provisioner_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package powershell_test diff --git a/provisioner/powershell/provisioner_test.go b/provisioner/powershell/provisioner_test.go index 024b0585fa2..dd9f610feb6 100644 --- a/provisioner/powershell/provisioner_test.go +++ b/provisioner/powershell/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package powershell diff --git a/provisioner/powershell/version/version.go b/provisioner/powershell/version/version.go index b0350e51cbd..eb2cc7e0d33 100644 --- a/provisioner/powershell/version/version.go +++ b/provisioner/powershell/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/provisioner/shell-local/provisioner.go b/provisioner/shell-local/provisioner.go index 3c62b28f9d5..d051b361239 100644 --- a/provisioner/shell-local/provisioner.go +++ b/provisioner/shell-local/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell diff --git a/provisioner/shell-local/provisioner_acc_test.go b/provisioner/shell-local/provisioner_acc_test.go index 1f1b37a0cb8..ad027ec7de2 100644 --- a/provisioner/shell-local/provisioner_acc_test.go +++ b/provisioner/shell-local/provisioner_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell_test diff --git a/provisioner/shell-local/provisioner_test.go b/provisioner/shell-local/provisioner_test.go index c320ad4a1d1..ac7262b616a 100644 --- a/provisioner/shell-local/provisioner_test.go +++ b/provisioner/shell-local/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell diff --git a/provisioner/shell-local/version/version.go b/provisioner/shell-local/version/version.go index 27e57fb5c0a..205aea7ccf0 100644 --- a/provisioner/shell-local/version/version.go +++ b/provisioner/shell-local/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/provisioner/shell/provisioner.go b/provisioner/shell/provisioner.go index 593f898caf0..cc1e399996a 100644 --- a/provisioner/shell/provisioner.go +++ b/provisioner/shell/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/shell/provisioner_acc_test.go b/provisioner/shell/provisioner_acc_test.go index 167456d274a..ca7a32d8282 100644 --- a/provisioner/shell/provisioner_acc_test.go +++ b/provisioner/shell/provisioner_acc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell_test diff --git a/provisioner/shell/provisioner_test.go b/provisioner/shell/provisioner_test.go index 40da9b5ea2b..3e52593b4ca 100644 --- a/provisioner/shell/provisioner_test.go +++ b/provisioner/shell/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell diff --git a/provisioner/shell/unix_reader.go b/provisioner/shell/unix_reader.go index 9e27a6de928..dc74647b292 100644 --- a/provisioner/shell/unix_reader.go +++ b/provisioner/shell/unix_reader.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell diff --git a/provisioner/shell/unix_reader_test.go b/provisioner/shell/unix_reader_test.go index 869531653ad..96c470cc13c 100644 --- a/provisioner/shell/unix_reader_test.go +++ b/provisioner/shell/unix_reader_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell diff --git a/provisioner/shell/version/version.go b/provisioner/shell/version/version.go index bb0b798efe2..f192bb373db 100644 --- a/provisioner/shell/version/version.go +++ b/provisioner/shell/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/provisioner/sleep/provisioner.go b/provisioner/sleep/provisioner.go index 7c74c74b73d..8dfb4ce1f7c 100644 --- a/provisioner/sleep/provisioner.go +++ b/provisioner/sleep/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Provisioner diff --git a/provisioner/sleep/provisioner_test.go b/provisioner/sleep/provisioner_test.go index 94acf5771ef..315849e66dc 100644 --- a/provisioner/sleep/provisioner_test.go +++ b/provisioner/sleep/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package sleep diff --git a/provisioner/sleep/version/version.go b/provisioner/sleep/version/version.go index 3b0c4c2bf25..bdad4975ec3 100644 --- a/provisioner/sleep/version/version.go +++ b/provisioner/sleep/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/provisioner/windows-restart/provisioner.go b/provisioner/windows-restart/provisioner.go index 4c1113a0df8..8aaa3598ccd 100644 --- a/provisioner/windows-restart/provisioner.go +++ b/provisioner/windows-restart/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/windows-restart/provisioner_test.go b/provisioner/windows-restart/provisioner_test.go index c2d934ed539..bc68f167398 100644 --- a/provisioner/windows-restart/provisioner_test.go +++ b/provisioner/windows-restart/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package restart diff --git a/provisioner/windows-restart/version/version.go b/provisioner/windows-restart/version/version.go index d178be5e559..5376f9e31a6 100644 --- a/provisioner/windows-restart/version/version.go +++ b/provisioner/windows-restart/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/provisioner/windows-shell/provisioner.go b/provisioner/windows-shell/provisioner.go index 0002d85ba06..c6f22a3e778 100644 --- a/provisioner/windows-shell/provisioner.go +++ b/provisioner/windows-shell/provisioner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:generate packer-sdc mapstructure-to-hcl2 -type Config diff --git a/provisioner/windows-shell/provisioner_test.go b/provisioner/windows-shell/provisioner_test.go index 08990b00ae7..ae97cc20334 100644 --- a/provisioner/windows-shell/provisioner_test.go +++ b/provisioner/windows-shell/provisioner_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package shell diff --git a/provisioner/windows-shell/version/version.go b/provisioner/windows-shell/version/version.go index 71885679439..18ad34fe08e 100644 --- a/provisioner/windows-shell/version/version.go +++ b/provisioner/windows-shell/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 3290347fe0f..4f1abd3a1cb 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 <# .Synopsis diff --git a/scripts/build.sh b/scripts/build.sh index 491a1bbce4f..8b65f50b773 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # This script builds the application from source for multiple platforms. diff --git a/scripts/codesign_example.sh b/scripts/codesign_example.sh index 85303332049..2e1a1698477 100755 --- a/scripts/codesign_example.sh +++ b/scripts/codesign_example.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/scripts/dist.sh b/scripts/dist.sh index 999be612a05..113af57ba21 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -e diff --git a/scripts/generate-plugins.go b/scripts/generate-plugins.go index 7390fafa070..669da9d3f32 100755 --- a/scripts/generate-plugins.go +++ b/scripts/generate-plugins.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Generate Plugins is a small program that updates the lists of plugins in // command/plugin.go so they will be compiled into the main packer binary. diff --git a/scripts/off_gopath.sh b/scripts/off_gopath.sh index 04e1ae709e5..beb1433e1bf 100755 --- a/scripts/off_gopath.sh +++ b/scripts/off_gopath.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eu -o pipefail diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh index a10b9972b6a..14aaa5efadd 100755 --- a/scripts/prepare_changelog.sh +++ b/scripts/prepare_changelog.sh @@ -1,6 +1,6 @@ #!/bin/zsh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 LAST_RELEASE=$1 diff --git a/scripts/sign.sh b/scripts/sign.sh index 494347ef677..f7d18acd764 100755 --- a/scripts/sign.sh +++ b/scripts/sign.sh @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 #!/usr/bin/env bash diff --git a/scripts/sort-md-list.py b/scripts/sort-md-list.py index c84ad663da2..9842977752e 100755 --- a/scripts/sort-md-list.py +++ b/scripts/sort-md-list.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 """ sort-md-list.py sorts markdown lists diff --git a/scripts/upgrade_plugins.sh b/scripts/upgrade_plugins.sh new file mode 100755 index 00000000000..3ca2885f178 --- /dev/null +++ b/scripts/upgrade_plugins.sh @@ -0,0 +1,68 @@ +#!/bin/zsh +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + + +## This script is to be run before a Packer release in order to update +## all vendored plugins to the latest available release. +## The SDK is included in the plugin list and will be upgraded as well if a +## newest version is available. +## This script should be run in packer's root. + +declare -a plugins=( + "hashicorp/packer-plugin-alicloud" + "hashicorp/packer-plugin-amazon" + "hashicorp/packer-plugin-ansible" + "hashicorp/packer-plugin-azure" + "hashicorp/packer-plugin-chef" + "hashicorp/packer-plugin-cloudstack" + "hashicorp/packer-plugin-converge" + "digitalocean/packer-plugin-digitalocean" + "hashicorp/packer-plugin-docker" + "hashicorp/packer-plugin-googlecompute" + "hashicorp/packer-plugin-hcloud" + "hashicorp/packer-plugin-hyperone" + "hashicorp/packer-plugin-hyperv" + "hashicorp/packer-plugin-jdcloud" + "hashicorp/packer-plugin-linode" + "hashicorp/packer-plugin-lxc" + "hashicorp/packer-plugin-lxd" + "hashicorp/packer-plugin-ncloud" + "hashicorp/packer-plugin-openstack" + "hashicorp/packer-plugin-oneandone" + "hashicorp/packer-plugin-parallels" + "hashicorp/packer-plugin-profitbricks" + "hashicorp/packer-plugin-proxmox" + "hashicorp/packer-plugin-puppet" + "hashicorp/packer-plugin-qemu" + "hashicorp/packer-plugin-sdk" + "hashicorp/packer-plugin-tencentcloud" + "hashicorp/packer-plugin-triton" + "hashicorp/packer-plugin-ucloud" + "hashicorp/packer-plugin-vagrant" + "hashicorp/packer-plugin-virtualbox" + "hashicorp/packer-plugin-vmware" + "hashicorp/packer-plugin-vsphere" + "hashicorp/packer-plugin-yandex" +) + +## now loop through the above plugin array +## update the plugins and the SDK to the latest available version +for i in "${plugins[@]}" +do + happy=false + while ! $happy + do + echo "upgrading $i" + output=$(go get -d github.com/$i) + happy=true + if [[ $output == *"443: Connection refused"* ]]; then + echo "Try again after 5 seconds" + sleep 5 + happy=false + fi + done + sleep 1 +done + +go mod tidy -compat=1.18 diff --git a/scripts/vagrant-freebsd-priv-config.sh b/scripts/vagrant-freebsd-priv-config.sh index 89915370f36..9d5f0761ed5 100755 --- a/scripts/vagrant-freebsd-priv-config.sh +++ b/scripts/vagrant-freebsd-priv-config.sh @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 chown vagrant:wheel \ diff --git a/scripts/vagrant-freebsd-unpriv-bootstrap.sh b/scripts/vagrant-freebsd-unpriv-bootstrap.sh index 809415ab6c8..89fc9fc87bb 100755 --- a/scripts/vagrant-freebsd-unpriv-bootstrap.sh +++ b/scripts/vagrant-freebsd-unpriv-bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export GOPATH=/opt/gopath diff --git a/scripts/vagrant-linux-priv-config.sh b/scripts/vagrant-linux-priv-config.sh index b658e719179..d89e10ecb0b 100755 --- a/scripts/vagrant-linux-priv-config.sh +++ b/scripts/vagrant-linux-priv-config.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export DEBIAN_FRONTEND=noninteractive diff --git a/scripts/vagrant-linux-priv-go.sh b/scripts/vagrant-linux-priv-go.sh index e59ae7e145d..2d99bc1517b 100755 --- a/scripts/vagrant-linux-priv-go.sh +++ b/scripts/vagrant-linux-priv-go.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 function install_go() { diff --git a/scripts/vagrant-linux-unpriv-bootstrap.sh b/scripts/vagrant-linux-unpriv-bootstrap.sh index ff6b8f8f90f..ca7f004c9eb 100755 --- a/scripts/vagrant-linux-unpriv-bootstrap.sh +++ b/scripts/vagrant-linux-unpriv-bootstrap.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 cd /opt/gopath/src/github.com/hashicorp/packer && make dev diff --git a/tty.go b/tty.go index 62fa5203ffd..a6f16d122ac 100644 --- a/tty.go +++ b/tty.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !solaris // +build !solaris diff --git a/tty_solaris.go b/tty_solaris.go index ed40b7fdb82..257db948865 100644 --- a/tty_solaris.go +++ b/tty_solaris.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/version/VERSION b/version/VERSION index 169f19b4901..0b9006ea850 100644 --- a/version/VERSION +++ b/version/VERSION @@ -1 +1 @@ -1.11.0 \ No newline at end of file +1.9.7 \ No newline at end of file diff --git a/version/version.go b/version/version.go index a7eec6fd4bc..7924607b1be 100644 --- a/version/version.go +++ b/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version @@ -22,7 +22,7 @@ var ( // A pre-release marker for the version can also be specified (e.g -dev). If this is omitted // The main version number that is being run at the moment. - Version = "1.11.0" + Version = "1.9.6" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release diff --git a/website/content/docs/commands/init.mdx b/website/content/docs/commands/init.mdx index 940751c5b67..32008db86bd 100644 --- a/website/content/docs/commands/init.mdx +++ b/website/content/docs/commands/init.mdx @@ -70,7 +70,7 @@ packer { } ``` -HashiCorp does not officially verify third party Packer plugins, plugins not under the HashiCorp namespace `hashicorp/*`; as with all community tools, please do your own due diligence when using a new tool. +HashiCorp does not officially verify third party Packer plugins, plugins not under the HashiCorp namespace `hashicorp/*`; as with all open source tools, please do your own due diligence when using a new tool. ## Plugin Selection diff --git a/website/content/docs/community-tools.mdx b/website/content/docs/community-tools.mdx index 3a222f17a75..ea75ef3df23 100644 --- a/website/content/docs/community-tools.mdx +++ b/website/content/docs/community-tools.mdx @@ -65,9 +65,6 @@ contribution here! to automate the creation of virtual machine images and their guest operating systems on VMware vSphere using HashiCorp Packer and the Packer Plugin for VMware vSphere (vsphere-iso). -- [Parallels/packer-examples](https://github.com/parallels/packer-examples) - Examples in how to use Packer with Parallels Desktop - to automate the creation of virtual machine images and their guest operating systems on macOS, windows and linux. - ## Wrappers - [packer-config](https://github.com/ianchesal/packer-config) - a Ruby model that lets you build Packer configurations in Ruby diff --git a/website/content/docs/index.mdx b/website/content/docs/index.mdx index 5fd386e1dc7..ad32aa8a02c 100644 --- a/website/content/docs/index.mdx +++ b/website/content/docs/index.mdx @@ -6,7 +6,7 @@ page_title: Documentation # Packer Documentation -[Packer](https://www.packer.io/) is a community tool that enables you to create identical machine images for multiple platforms from a single source template. A common use case is creating "golden images" that teams across an organization can use in cloud infrastructure. +[Packer](https://www.packer.io/) is an open source tool that enables you to create identical machine images for multiple platforms from a single source template. A common use case is creating "golden images" that teams across an organization can use in cloud infrastructure. To install Packer and learn the standard Packer workflow, try the [Get Started tutorials](/packer/tutorials). diff --git a/website/content/docs/intro/index.mdx b/website/content/docs/intro/index.mdx index d6fb56902f6..99f8175943e 100644 --- a/website/content/docs/intro/index.mdx +++ b/website/content/docs/intro/index.mdx @@ -17,7 +17,7 @@ features. ## What is Packer? -Packer is a community tool for creating identical machine images for multiple +Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer does not replace configuration diff --git a/website/content/docs/partnerships.mdx b/website/content/docs/partnerships.mdx index 97d1ec526f6..2e87dfdb7c8 100644 --- a/website/content/docs/partnerships.mdx +++ b/website/content/docs/partnerships.mdx @@ -15,7 +15,7 @@ This program is intended to be largely a self-service process with links and gui ### Types of Packer Integrations -Packer is a community tool for creating identical machine images for multiple platforms from a single source configuration. +Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer does not replace configuration management like Chef or Puppet. In fact, when building images, Packer is able to use tools like Chef or Puppet to install software onto the image. A machine image is a single static unit that contains a pre-configured operating system and installed software which is used to quickly create new running machines. Machine image formats change for each platform. Some examples include AMIs for EC2, VMDK/VMX files for VMware, OVF exports for VirtualBox, etc. To know more about use cases of Packer click ([Use Cases - Introduction | Packer by HashiCorp](/packer/docs/intro/use-cases)) diff --git a/website/content/docs/plugins/install-plugins.mdx b/website/content/docs/plugins/install-plugins.mdx index b2d97975216..0460e6c561c 100644 --- a/website/content/docs/plugins/install-plugins.mdx +++ b/website/content/docs/plugins/install-plugins.mdx @@ -8,113 +8,38 @@ page_title: Install Plugins Packer plugins are separate, standalone applications that perform tasks during each build. -You do not need to install the components that ship with the Packer binary. -Packer automatically knows how to find and launch these built-in plugins. +You do not need to install the builder, provisioner, or +post-processor components that ship with the Packer binary. Packer automatically knows how to find and launch these built-in plugins. This page explains how to install custom external plugins. Refer to [External Plugins](/packer/plugins) for a list of available plugins and their documentation. -Depending on the template type you're using (HCL2 or legacy JSON), the methods for installing plugins may differ. +## Plugin Loading Order -If you're using HCL2, `packer init` is recommended as you can install all your requirements with one -command, and those requirements are explicitly documented in the template. - -`packer plugins install` is also used to automate the installation from a source, and will need to -be repeated for as many plugins as you need. -We recommend this for JSON as the template cannot contain the information about the required plugins. - -Finally, you can manually install any plugin. This is mostly useful if you're in an environment with -restricted internet access, or if you're installing non-final versions of plugins. - -Refer to the [Installation Guides](#installation-guides) section of this page for information about -each, including usage examples. - -The remainder of this document will serve as documentation on how Packer interacts with plugins. -We encourage you to read this to get familiar with this process, as it will help you troubleshoot -your builds if you encounter problems with that. - -## Source Addresses - -A plugin's source address is its global identifier. It also tells Packer where -to download it. - -Source addresses consist of three parts delimited by slashes (`/`), as -follows: - -`//` - -- **Hostname:** The hostname of the location/service that - distributes the plugin. Currently, the only valid "hostname" is github.com, - but we plan to eventually support plugins downloaded from other domains. - -- **Namespace:** An organizational namespace within the specified host. - This often is the organization that publishes the plugin. - -- **Type:** A short name for the platform or system the plugin manages. The - type is usually the plugin's preferred local name. - -For example, the fictional `myawesomecloud` plugin could belong to the -`hashicorp` namespace on `github.com`, so its `source` could be -`github.com/hashicorp/myawesomecloud`, - --> Note: the actual _repository_ that myawesomecloud comes from must always have -the name format `github.com/hashicorp/packer-plugin-myawesomecloud`, but the -`required_plugins` block omits the redundant `packer-plugin-` repository prefix -for brevity. - -The source address with all three components given explicitly is called the -plugin's _fully-qualified address_. You will see fully-qualified address in -various outputs, like error messages. - -## Plugin Loading Workflow - -At initialization, Packer attempts to discover the plugins installed locally. The -logic follows what's described in Configuring Packer's -[plugin directory](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory) -section. - -While Packer is not verbose during this step, you can peek into what it is discovering -with `PACKER_LOG=1` enabled, where you can find log lines similar to the following: - -```shell -[TRACE] discovering plugins in [...] -[INFO] Discovered potential plugin: [...] -``` - -This logic however is ignored when plugins are defined in `required_plugins` blocks; -instead, for every plugin required in this way, Packer will only consider them if they're -installed in Packer's plugin directory, under a directory hierarchy that matches the -source, with the plugin name respecting a convention. - -For example, if we install the `github.com/hashicorp/amazon` plugin in version 1.2.8 through -either `packer init` or `packer plugins install`, this will yield the following (in a -Linux x86_64 environment): - -```shell - -└── github.com - └── hashicorp - └── amazon - ├── packer-plugin-amazon_v1.2.8_x5.0_linux_amd64 - └── packer-plugin-amazon_v1.2.8_x5.0_linux_amd64_SHA256SUM -``` - -Both the plugin's binary, and the related SHA256SUM file must be placed alongside -each other for Packer to consider them for a `required_plugins` constraint. +@include "plugins/plugin-location.mdx" ## Installation Guides +Choose the tab that corresponds to the type of plugin you want to install. If you are not sure, check the plugin's name. +- Multi-component plugin names have the prefix `packer-plugin-`. +- Single-component plugin names have a prefix containing the component type, like `packer-provisioner-` or `packer-builder`. + - + -In order to use `packer init` for managing installation of your plugins, there are -two steps required. +-> **Note:** Only _multi-component plugin binaries_ -- plugins named +packer-plugin-\*, like the `packer-plugin-amazon` -- are expected to work with +Packer init. The legacy `builder`, `post-processor` and `provisioner` plugin +types will continue to be detected but Packer cannot install them automatically. +If a plugin you use has not been upgraded to use the multi-component plugin +architecture, contact your maintainer to request an upgrade. -First, add a [`required_plugins`](/packer/docs/templates/hcl_templates/blocks/packer#specifying-plugin-requirements) -block to your [packer block](/packer/docs/templates/hcl_templates/blocks/packer). +## Create a required_plugins block -Each block will tell Packer what version(s) of a particular plugin can be installed. -Make sure to set a valid -[version constraint string](/packer/docs/templates/hcl_templates/blocks/packer#version-constraints). +1. Add a + [`required_plugins`](/packer/docs/templates/hcl_templates/blocks/packer#specifying-plugin-requirements) + block to your [packer block](/packer/docs/templates/hcl_templates/blocks/packer). Each block will tell Packer what version(s) of a + particular plugin can be installed. Make sure to set a valid [version + constraint string](/packer/docs/templates/hcl_templates/blocks/packer#version-constraints). Here is an example `required_plugins` block: @@ -133,18 +58,17 @@ packer { } ``` -Once your template contains those `required_plugins`, run -[`packer init`](/packer/docs/commands/init) to install all missing plugin -binaries. -Given the above example, Packer will try to look for a GitHub -repository owned by user or organization `azr` named -`packer-plugin-myawesomecloud` and `packer-plugin-happycloud`. +2. Run [`packer init`](/packer/docs/commands/init) from your project directory (the + directory containing your Packer templates) to install all missing plugin + binaries. Given the above example, Packer will try to look for a GitHub + repository owned by user or organization `azr` named + `packer-plugin-myawesomecloud` and `packer-plugin-happycloud`. ## Names and Addresses Each plugin has two identifiers: -- A `source` address, which is where the plugin is downloaded from. +- A `source` address, which is necessary when requiring a plugin not bundled with the Packer binary. - A unique **local name**, which is used everywhere else in a Packer configuration. ## Local Names @@ -191,51 +115,155 @@ source "foo-ebs" "example" { } ``` +## Source Addresses + +A plugin's source address is its global identifier. It also tells Packer where +to download it. + +Source addresses consist of three parts delimited by slashes (`/`), as +follows: + +`//` + +- **Hostname:** The hostname of the location/service that + distributes the plugin. Currently, the only valid "hostname" is github.com, + but we plan to eventually support plugins downloaded from other domains. + +- **Namespace:** An organizational namespace within the specified host. + This often is the organization that publishes the plugin. + +- **Type:** A short name for the platform or system the plugin manages. The + type is usually the plugin's preferred local name. + +For example, the fictional `myawesomecloud` plugin could belong to the +`hashicorp` namespace on `github.com`, so its `source` could be +`github.com/hashicorp/myawesomecloud`, + +-> Note: the actual _repository_ that myawesomecloud comes from must always have +the name format `github.com/hashicorp/packer-plugin-myawesomecloud`, but the +`required_plugins` block omits the redundant `packer-plugin-` repository prefix +for brevity. + +The source address with all three components given explicitly is called the +plugin's _fully-qualified address_. You will see fully-qualified address in +various outputs, like error messages. + +## Plugin Installation Workflow + +* [`packer init`](/packer/docs/commands/init) will install plugins in the **last** directory +in the following numbered list. + +1. `PACKER_PLUGIN_PATH` if set will be the sole location for installing plugins. All other +plugin directories will be ignored. +1. `PACKER_CONFIG_DIR`\plugins on Windows systems, or `PACKER_CONFIG_DIR`/plugins on all other systems. + +* During the initialization of Packer, any plugin required in the +**`required_plugins`** section will be looked up in all entries of the following +list. **First** plugin found takes precedence. Two binaries of the same plugin +with two different version will be considered as two different plugins. Highest +found version matching `required_plugins` will be taken into consideration. + +During initialization, on a `darwin_amd64` system, Packer will look-up for the +following files: + +* `PACKER_PLUGIN_PATH/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` +* `PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64` + +The first plugin-name/version files found will take precedence. + +For plugins located under the `github.com/azr/happycloud/` directory structure an accompanying SHA256SUM file +will be required in order for `packer init` to ensure the plugin being loaded has not been tampered with. +The SHA256SUM file will be automatically generated when a plugin is installed via `packer init` if the plugin +was installed manually into `PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/` then the file +`PACKER_CONFIG_DIR/plugins/github.com/azr/happycloud/packer-plugin-happycloud_*_x5.0_darwin_amd64_SHA256SUM` must be generated manually as well. + +## Implicit Github urls + +Using the following example : + +```hcl + required_plugins { + happycloud = { + version = ">= 2.7.0" + source = "github.com/azr/happycloud" + } + } +``` + +The plugin getter will look for plugins located at: + +- github.com/azr/packer-plugin-happycloud + +Packer will error if you set the `packer-plugin-` prefix in a `source`. This +will avoid conflicting with other plugins for other tools, like Terraform. + - + -Plugin installation via `packer plugins install` works similar to that of the `packer init` command, but -no `required_plugins` block are required, and thus can be used with both legacy JSON and HCL2 templates. +-> The [`packer plugins`](/packer/docs/commands/plugins), available from Packer v1.8.0, command allows +you to install plugins without going through `init`. ```shell packer plugins install github.com/hashicorp/vagrant ``` --> You can only install one plugin per invocation of the command. If you need to install - a specific version of a plugin, you can specify a version to install as an optional - argument to the command line. - e.g.: `packer plugins install "github.com/hashicorp/vagrant" "v1.0.1"` +## Plugin Installation Workflow +Plugin installation via `packer plugins install` works similar to that of the `packer init` command, with the following +exceptions no `required_plugins` block required and can be used with both legacy JSON and HCL2 templates. + +* [`packer plugins install`](/packer/docs/commands/plugins) will install plugins in the **last** directory +in the following numbered list. + +1. `PACKER_PLUGINS_PATH` if set will be the sole location for installing plugins. All other +plugin directories will be ignored. +1. `PACKER_CONFIG_DIR`\plugins on Windows systems, or `PACKER_CONFIG_DIR`/plugins on all other systems. + + +For manual installation of plugin binaries, without the `packer plugins` command, please continue reading. + +The easiest way to manually install a plugin is to name it correctly, then place +it in the proper directory. To name a plugin correctly, make sure the binary is +named `packer-plugin-NAME`. For example, `packer-plugin-amazon` for a "plugin" +binary named "amazon". This binary will make one or more components available to +use. Valid types for plugins are down this page. + +The valid types for plugins are: + +- `plugin` - A plugin binary that can contain one or more of each Packer component + type. + +- `builder` - Plugins responsible for building images for a specific + platform. + +- `post-processor` - A post-processor responsible for taking an artifact from + a builder and turning it into something else. + +- `provisioner` - A provisioner to install software on images created by a + builder. -The command will install the plugin in the `PACKER_CONFIG_DIR` set, or its -default location, which depends on the OS/environment, as documented in -[Configuring Packer](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory). - + -If you have obtained or built a plugin binary for your OS/Architecture and want to -use it with Packer, you can install it manually. For Packer to load the plugin, -it must be named with the convention `packer-plugin-NAME`, and placed in Packer's plugin -directory, as documented in -[Configuring Packer](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory). +The easiest way to manually install a plugin is to name it correctly, then place +it in the proper directory. To name a plugin correctly, make sure the binary is +named `packer-COMPONENT-NAME`. For example, `packer-provisioner-comment` for a "plugin" +binary named "comment". This binary will make a single provisioner named `comment` available to +use. Valid types for plugins are down this page. -For example, if your configuration directory is located in `~/.config/packer`, -you can copy the binary to `~/.config/plugins/packer-plugin-NAME`, and -Packer will be able to load it afterwards. +The valid types for plugins are: -If you have a `required_plugins` for the plugin you're manually installing, make sure -it respects the constraints described in the [Plugin loading workflow](#plugin-loading-workflow) -section, otherwise Packer will not be able to load it. +- `plugin` - A plugin binary that can contain one or more of each Packer component + type. -Starting with v1.10.0 of Packer, you can also use `packer plugins install` with the -`--path` flag to install a plugin from a binary, following the layout that is required to -work with `required_plugins` block. +- `builder` - Plugins responsible for building images for a specific + platform. -```shell -packer plugins install --path github.com/hashicorp/vagrant -``` +- `post-processor` - A post-processor responsible for taking an artifact from + a builder and turning it into something else. --> packer plugins install --path only works with release versions of plugins. +- `provisioner` - A provisioner to install software on images created by a + builder. diff --git a/website/content/guides/packer-on-cicd/trigger-tfe.mdx b/website/content/guides/packer-on-cicd/trigger-tfe.mdx index 14b2643bd1e..b43e282a6b2 100644 --- a/website/content/guides/packer-on-cicd/trigger-tfe.mdx +++ b/website/content/guides/packer-on-cicd/trigger-tfe.mdx @@ -12,7 +12,7 @@ and used locally in development, like is often done with VirtualBox images with Vagrant. In most other cases, the new image will be used to provision new infrastructure. -[Terraform](https://www.terraform.io/) is a community tool that is ideal for +[Terraform](https://www.terraform.io/) is an open source tool that is ideal for provisioning new infrastructure with images generated by Packer, and [Terraform Enterprise](https://www.hashicorp.com/products/terraform/) is the best way to perform automated Terraform runs. diff --git a/website/data/plugins-manifest.json b/website/data/plugins-manifest.json index 525d5ede175..5a3c0034ad6 100644 --- a/website/data/plugins-manifest.json +++ b/website/data/plugins-manifest.json @@ -22,6 +22,13 @@ "version": "latest", "sourceBranch": "main" }, + { + "title": "Git", + "path": "git", + "repo": "ethanmdavidson/packer-plugin-git", + "version": "latest", + "sourceBranch": "main" + }, { "title": "Gridscale", "path": "gridscale", @@ -45,6 +52,14 @@ "pluginTier": "community", "version": "latest" }, + { + "title": "Linode", + "path": "linode", + "repo": "linode/packer-plugin-linode", + "pluginTier": "verified", + "version": "latest", + "isHcpPackerReady": true + }, { "title": "Libvirt", "path": "libvirt", @@ -75,6 +90,13 @@ "pluginTier": "verified", "isHcpPackerReady": true }, + { + "title": "Parallels", + "path": "parallels", + "repo": "parallels/packer-plugin-parallels", + "version": "latest", + "pluginTier": "verified" + }, { "title": "Scaleway", "path": "scaleway", @@ -82,6 +104,20 @@ "pluginTier": "verified", "version": "latest" }, + { + "title": "SSH Key", + "path": "sshkey", + "repo": "ivoronin/packer-plugin-sshkey", + "pluginTier": "community", + "version": "latest" + }, + { + "title": "Tart", + "path": "tart", + "repo": "cirruslabs/packer-plugin-tart", + "pluginTier": "community", + "version": "latest" + }, { "title": "UCloud", "path": "ucloud", diff --git a/website/package-lock.json b/website/package-lock.json index 55458aed469..09bd084d46a 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -32,80 +32,17 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/compat-data": { "version": "7.17.7", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", @@ -155,20 +92,28 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.9.tgz", + "integrity": "sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ==", "dev": true, "dependencies": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/generator/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@babel/helper-compilation-targets": { "version": "7.17.7", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", @@ -197,34 +142,37 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", + "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" + "@babel/template": "^7.16.7", + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -283,30 +231,21 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "dev": true, "engines": { "node": ">=6.9.0" @@ -336,13 +275,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz", + "integrity": "sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, "engines": { @@ -387,13 +326,13 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, "engines": { "node": ">=4" @@ -412,9 +351,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.9.tgz", + "integrity": "sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -635,33 +574,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.9.tgz", + "integrity": "sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.9", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.17.9", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.9", + "@babel/types": "^7.17.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -679,13 +618,12 @@ } }, "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1545,52 +1483,29 @@ "node": ">= 10.14.2" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.8.tgz", + "integrity": "sha512-zdpaWDz5IEyHlu1EO+B+qRHmJkSxMVV6SXngDry9n1ZqslLXFH9Dw6lRqDidm/sOJAWdRltJsmZ1SK28/uZKsw==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@mdx-js/util": { @@ -13811,9 +13726,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -14066,65 +13981,12 @@ } }, "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@babel/highlight": "^7.16.7" } }, "@babel/compat-data": { @@ -14165,15 +14027,22 @@ } }, "@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.9.tgz", + "integrity": "sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ==", "dev": true, "requires": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, "@babel/helper-compilation-targets": { @@ -14197,28 +14066,31 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } }, "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", + "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", "dev": true, "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" + "@babel/template": "^7.16.7", + "@babel/types": "^7.17.0" } }, "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "requires": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-imports": { @@ -14262,24 +14134,18 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "requires": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.16.7" } }, - "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true - }, "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "dev": true }, "@babel/helper-validator-option": { @@ -14300,13 +14166,13 @@ } }, "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz", + "integrity": "sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, "dependencies": { @@ -14342,13 +14208,13 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "supports-color": { @@ -14363,9 +14229,9 @@ } }, "@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.9.tgz", + "integrity": "sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg==", "dev": true }, "@babel/plugin-proposal-object-rest-spread": { @@ -14526,30 +14392,30 @@ } }, "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.9.tgz", + "integrity": "sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.9", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.17.9", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.9", + "@babel/types": "^7.17.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -14563,13 +14429,12 @@ } }, "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" } }, @@ -15236,43 +15101,26 @@ "chalk": "^4.0.0" } }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, "@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.8.tgz", + "integrity": "sha512-zdpaWDz5IEyHlu1EO+B+qRHmJkSxMVV6SXngDry9n1ZqslLXFH9Dw6lRqDidm/sOJAWdRltJsmZ1SK28/uZKsw==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "@mdx-js/util": { @@ -24541,9 +24389,9 @@ } }, "word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "wrap-ansi": { From 2dd3f9ee911ba128b7614d34bd429fb3c6ddb4a1 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 1 Dec 2023 13:45:44 +0000 Subject: [PATCH 154/156] backport of commit 5a96009ba192adc292e754b5f4a24db2e4cf17dd --- .../content/docs/plugins/creation/index.mdx | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/website/content/docs/plugins/creation/index.mdx b/website/content/docs/plugins/creation/index.mdx index 5cb3d8d3c00..273144bfbcd 100644 --- a/website/content/docs/plugins/creation/index.mdx +++ b/website/content/docs/plugins/creation/index.mdx @@ -236,6 +236,33 @@ needed to inform users on how to work with your integration. Refer to [Packer sc 1. Open a request for integration issue with the Packer team - [Open Request](https://github.com/hashicorp/packer/issues/new/choose). Please provide all the requested information to help expedite the integration request. +#### [Example] Add integration files to existing plugin repository + +```shell +## Update Plugin repository with integration config, workflows, and scripts +cd packer-plugin-name +mkdir -p .web-docs/scripts + +# Download packer-plugin-scaffolding repo copy files +curl -L -O https://github.com/hashicorp/packer-plugin-scaffolding/archive/refs/heads/main.zip +unzip main.zip +cp packer-plugin-scaffolding-main/.web-docs/metadata.hcl .web-docs/ +cp -r packer-plugin-scaffolding-main/.web-docs/scripts/ .web-docs/scripts/ +cp .github/workflows/notify-integration-release-via-* .github/workflows/ + +# Remove downloaded scaffolding project +rm main.zip +rm -rf packer-plugin-scaffolding-main + +# Add the following commands to your plugin GNUmakefile +generate: install-packer-sdc + @go generate ./... + @rm -rf .docs + @packer-sdc renderdocs -src docs -partials docs-partials/ -dst .docs/ + @./.web-docs/scripts/compile-to-webdocs.sh "." ".docs" ".web-docs" "" + @rm -r ".docs" +``` + By opening an integration request, you are asking a member of the to Packer team to review your plugin integration configuration, plugin documentation, and, finally, to open an internal pull-request to finalize the integration setup. From 0e4e34fbd17ffbff73761959056d7356d9c98e02 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 1 Dec 2023 14:59:50 +0000 Subject: [PATCH 155/156] backport of commit ea92d8b1f38d1debce15a4d7685e38d715b49cd5 --- .../content/docs/plugins/creation/index.mdx | 47 +------------------ 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/website/content/docs/plugins/creation/index.mdx b/website/content/docs/plugins/creation/index.mdx index 273144bfbcd..7d7939f4683 100644 --- a/website/content/docs/plugins/creation/index.mdx +++ b/website/content/docs/plugins/creation/index.mdx @@ -49,15 +49,7 @@ danger of colliding dependencies. - [`github.com/hashicorp/packer-plugin-sdk/plugin`](https://pkg.go.dev/github.com/hashicorp/packer-plugin-sdk/plugin) - Contains the code to serve the plugin. This handles all the inter-process communication. -Basic examples of serving your component are shown below. Note that if you -define a multi-component plugin, you can (but do not need to) add more than one -component per plugin binary. The multi-component plugin is also compatible with -download and installation via `packer init`, whereas the single-component plugin -is not. - - - - +Basic examples of serving your component are shown below. ```go // main.go @@ -107,43 +99,6 @@ the following components available: - the `my-foo` post-processor - the `my-bar` provisioner - - - - -```go -// main.go - -import ( - "github.com/hashicorp/packer-plugin-sdk/plugin" -) - -// Assume this implements the packer.Builder interface -type Builder struct{} - -func main() { - server, err := plugin.Server() - if err != nil { - panic(err) - } - server.RegisterBuilder(new(Builder)) - server.Serve() -} -``` - -This `server.Serve()` invocation handles all the details of communicating with -Packer core and serving your component over RPC. As long as your struct being -registered implements one of the component interfaces, Packer will now be able -to launch your plugin and use it. - -Please note that single-component plugins exist for backwards-compatability. We -would rather you register your component using the multi-component method shown -in the other tab, even if you only have one component in your binary. This is -because the `packer init` command only supports multi-component plugins. - - - - Next, build your plugin as you would any other Go application. The resulting binary is the plugin that can be installed using [standard installation procedures](https://developer.hashicorp.com/packer/docs/plugins#installing-plugins). From 41ee96e9d199e64bf766c6677b25700ef9887972 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 5 Dec 2023 20:31:03 +0000 Subject: [PATCH 156/156] backport of commit cae2c5eb621ed341e93b8672b6455daa3b43d239 --- .../content/docs/plugins/creation/index.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/content/docs/plugins/creation/index.mdx b/website/content/docs/plugins/creation/index.mdx index 7d7939f4683..cb6d7d70682 100644 --- a/website/content/docs/plugins/creation/index.mdx +++ b/website/content/docs/plugins/creation/index.mdx @@ -171,25 +171,25 @@ Here's what you need to create releases using GitHub Actions: ## Registering Plugins -~> Note: Registering a plugin as an integration requires the use of [Packer's Incofiguration configuration](https://github.com/hashicorp/packer-plugin-scaffolding/tree/main/docs). +~> Note: Registering a plugin as an integration requires the documentation to match the [Scaffolding example layout](https://github.com/hashicorp/packer-plugin-scaffolding/tree/main/.web-docs). To help with the discovery of Packer plugins, plugins maintainers can choose to register their plugin as a [Packer Integration](https://developer.hashicorp.com/packer/integrations). -The registration process requires [metadata configuration](https://github.com/hashicorp/integration-template#metadata-configuration) be added to your plugin repository for configuring the Packer integration pipeline and -a specific directory structure for plugin documentation to be render on the [Packer Integrations](https://developer.hashicorp.com/packer/integrations) portal. +The registration process requires [metadata configuration](https://github.com/hashicorp/integration-template#metadata-configuration) to be added to your plugin repository for configuring the Packer integration pipeline and +a specific directory structure for plugin documentation to be rendered on the [Packer Integrations](https://developer.hashicorp.com/packer/integrations) portal. You can execute the following steps to register your plugin as an integration: -1. Update your plugin documentation structure according to the template defined with the [Packer Plugin Scaffolding template]. -New plugins generated from this template may have the necessary structure in place. If so you can jump to step 3. +1. Update your plugin documentation structure to match the [Scaffolding example layout](https://github.com/hashicorp/packer-plugin-scaffolding/tree/main/.web-docs). +New plugins generated from this template have the necessary structure in place. If so you can jump to step 3. 1. For the integrations library, only one top-level README per integration is supported. Any top-level index.mdx files that exist -within a plugins existing documentation will need to migrate to a top-level README. +within a plugin's existing documentation will need to migrate to a top-level README. 1. Update your top-level integration README to include a description, plugin installation steps, available components section, and, any, additional sections needed to inform users on how to work with your integration. Refer to [Packer scaffolding plugin](https://github.com/hashicorp/packer-plugin-scaffolding/blob/main/docs/README.md) for an example. 1. Update the top-level README for each of the components within your integration to follow the structure defined in the scaffolding template. 1. Add the integration configuration file [metadata.hcl](https://github.com/hashicorp/packer-plugin-scaffolding/blob/main/.web-docs/metadata.hcl) to the plugins `.web-docs` directory. -1. Open a request for integration issue with the Packer team - [Open Request](https://github.com/hashicorp/packer/issues/new/choose). -Please provide all the requested information to help expedite the integration request. +1. Open a request for integration issue with the Packer team - [Open Request](https://github.com/hashicorp/packer/issues/new?labels=new-plugin-contribution&template=plugin_integration.md). +Provide all the requested information to help expedite the integration request. #### [Example] Add integration files to existing plugin repository @@ -199,7 +199,7 @@ cd packer-plugin-name mkdir -p .web-docs/scripts # Download packer-plugin-scaffolding repo copy files -curl -L -O https://github.com/hashicorp/packer-plugin-scaffolding/archive/refs/heads/main.zip +wget https://github.com/hashicorp/packer-plugin-scaffolding/archive/refs/heads/main.zip unzip main.zip cp packer-plugin-scaffolding-main/.web-docs/metadata.hcl .web-docs/ cp -r packer-plugin-scaffolding-main/.web-docs/scripts/ .web-docs/scripts/