From 0a009ef4ca39b9a96af5be9432c213faeff68348 Mon Sep 17 00:00:00 2001 From: Lilian Deloche Date: Tue, 2 Apr 2024 16:15:57 +0200 Subject: [PATCH] feat(bsu): rename option to skip_create_omi --- builder/bsu/builder.go | 4 ++-- builder/bsu/builder.hcl2spec.go | 4 ++-- docs/builders/bsu.mdx | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builder/bsu/builder.go b/builder/bsu/builder.go index 620f892..d78b4d9 100644 --- a/builder/bsu/builder.go +++ b/builder/bsu/builder.go @@ -32,7 +32,7 @@ type Config struct { osccommon.BlockDevices `mapstructure:",squash"` osccommon.RunConfig `mapstructure:",squash"` VolumeRunTags osccommon.TagMap `mapstructure:"run_volume_tags"` - SkipSnapshot bool `mapstructure:"skip_snapshot"` + SkipCreateOmi bool `mapstructure:"skip_create_omi"` ctx interpolate.Context } @@ -184,7 +184,7 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) }, } - if !b.config.SkipSnapshot { + if !b.config.SkipCreateOmi { steps = append(steps, &stepCreateOMI{ RawRegion: b.config.RawRegion, diff --git a/builder/bsu/builder.hcl2spec.go b/builder/bsu/builder.hcl2spec.go index aa962c8..38a76d3 100644 --- a/builder/bsu/builder.hcl2spec.go +++ b/builder/bsu/builder.hcl2spec.go @@ -120,7 +120,7 @@ type FlatConfig struct { WinRMUseNTLM *bool `mapstructure:"winrm_use_ntlm" cty:"winrm_use_ntlm" hcl:"winrm_use_ntlm"` SSHInterface *string `mapstructure:"ssh_interface" cty:"ssh_interface" hcl:"ssh_interface"` VolumeRunTags common.TagMap `mapstructure:"run_volume_tags" cty:"run_volume_tags" hcl:"run_volume_tags"` - SkipSnapshot *bool `mapstructure:"skip_snapshot" cty:"skip_snapshot" hcl:"skip_snapshot"` + SkipCreateOmi *bool `mapstructure:"skip_create_omi" cty:"skip_create_omi" hcl:"skip_create_omi"` } // FlatMapstructure returns a new FlatConfig. @@ -244,7 +244,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "winrm_use_ntlm": &hcldec.AttrSpec{Name: "winrm_use_ntlm", Type: cty.Bool, Required: false}, "ssh_interface": &hcldec.AttrSpec{Name: "ssh_interface", Type: cty.String, Required: false}, "run_volume_tags": &hcldec.AttrSpec{Name: "run_volume_tags", Type: cty.Map(cty.String), Required: false}, - "skip_snapshot": &hcldec.AttrSpec{ Name: "skip_snapshot", Type: cty.Bool, Required: false }, + "skip_create_omi": &hcldec.AttrSpec{Name: "skip_create_omi", Type: cty.Bool, Required: false}, } return s } diff --git a/docs/builders/bsu.mdx b/docs/builders/bsu.mdx index 0673ac3..875694b 100644 --- a/docs/builders/bsu.mdx +++ b/docs/builders/bsu.mdx @@ -159,12 +159,12 @@ builder. shutdown in case Packer exits ungracefully. Possible values are "stop" and "terminate", default is `stop`. +- `skip_create_omi` (boolean) - Set to true if you want to skip snapshot creation. + No image will be created if set to true. Default `false`. + - `skip_region_validation` (boolean) - Set to true if you want to skip validation of the region configuration option. Default `false`. -- `skip_snapshot` (boolean) - Set to true if you want to skip snapshot creation. - No image will be created if set to true. Default `false`. - - `snapshot_groups` (array of strings) - A list of groups that have access to create volumes from the snapshot(s). By default no groups have permission to create volumes from the snapshot(s). `all` will make the snapshot