forked from hashicorp/packer-plugin-amazon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
49 lines (43 loc) · 1.79 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package main
import (
"fmt"
"os"
"github.com/hashicorp/packer-plugin-amazon/builder/chroot"
"github.com/hashicorp/packer-plugin-amazon/builder/ebs"
"github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate"
"github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume"
"github.com/hashicorp/packer-plugin-amazon/builder/instance"
"github.com/hashicorp/packer-plugin-amazon/datasource/ami"
"github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager"
amazonimport "github.com/hashicorp/packer-plugin-amazon/post-processor/import"
"github.com/hashicorp/packer-plugin-sdk/plugin"
"github.com/hashicorp/packer-plugin-sdk/version"
)
var (
// Version is the main version number that is being run at the moment.
Version = "0.0.2"
// VersionPrerelease is 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 such as "dev" (in development), "beta", "rc1", etc.
VersionPrerelease = "dev"
// PluginVersion is used by the plugin set to allow Packer to recognize
// what version this plugin is.
PluginVersion = version.InitializePluginVersion(Version, VersionPrerelease)
)
func main() {
pps := plugin.NewSet()
pps.RegisterBuilder("chroot", new(chroot.Builder))
pps.RegisterBuilder("ebs", new(ebs.Builder))
pps.RegisterBuilder("ebssurrogate", new(ebssurrogate.Builder))
pps.RegisterBuilder("ebsvolume", new(ebsvolume.Builder))
pps.RegisterBuilder("instance", new(instance.Builder))
pps.RegisterDatasource("ami", new(ami.Datasource))
pps.RegisterDatasource("secretsmanager", new(secretsmanager.Datasource))
pps.RegisterPostProcessor("import", new(amazonimport.PostProcessor))
pps.SetVersion(PluginVersion)
err := pps.Run()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}