mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-27 18:24:01 -04:00
57 lines
1.7 KiB
Go
57 lines
1.7 KiB
Go
package command
|
|
|
|
import (
|
|
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, until packer v1.8.0
|
|
)
|
|
|
|
// 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{}
|
|
|
|
// 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
|
|
}
|
|
}
|