Skip to content

Commit 3c9034f

Browse files
jaysoffianlbajolet-hashicorp
authored andcommitted
Add support for arm64_mac architecture
1 parent dae26ee commit 3c9034f

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

.web-docs/components/builder/chroot/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ necessary for this build to succeed and can be found further down the page.
214214
prefix `kms_key_id` with `alias/`.
215215

216216
- `ami_architecture` (string) - what architecture to use when registering the final AMI; valid options
217-
are "arm64", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
217+
are "arm64", "arm64_mac", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
218218

219219
- `boot_mode` (string) - The boot mode. Valid options are `legacy-bios` and `uefi`. See the documentation on
220220
[boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) for

.web-docs/components/builder/ebssurrogate/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ necessary for this build to succeed and can be found further down the page.
7272
will allow you to create those programatically.
7373

7474
- `ami_architecture` (string) - what architecture to use when registering the final AMI; valid options
75-
are "arm64", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
75+
are "arm64", "arm64_mac", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
7676

7777
- `boot_mode` (string) - The boot mode. Valid options are `legacy-bios` and `uefi`. See the documentation on
7878
[boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) for

builder/chroot/builder.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ type Config struct {
195195
// prefix `kms_key_id` with `alias/`.
196196
RootVolumeKmsKeyId string `mapstructure:"root_volume_kms_key_id" required:"false"`
197197
// what architecture to use when registering the final AMI; valid options
198-
// are "arm64", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
198+
// are "arm64", "arm64_mac", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
199199
Architecture string `mapstructure:"ami_architecture" required:"false"`
200200
// The boot mode. Valid options are `legacy-bios` and `uefi`. See the documentation on
201201
// [boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) for
@@ -370,14 +370,14 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
370370

371371
}
372372
valid := false
373-
for _, validArch := range []string{"arm64", "i386", "x86_64", "x86_64_mac"} {
373+
for _, validArch := range []string{"arm64", "arm64_mac", "i386", "x86_64", "x86_64_mac"} {
374374
if validArch == b.config.Architecture {
375375
valid = true
376376
break
377377
}
378378
}
379379
if !valid {
380-
errs = packersdk.MultiErrorAppend(errs, errors.New(`The only valid ami_architecture values are "arm64", "i386", "x86_64", or "x86_64_mac"`))
380+
errs = packersdk.MultiErrorAppend(errs, errors.New(`The only valid ami_architecture values are "arm64", "arm64_mac", "i386", "x86_64", or "x86_64_mac"`))
381381
}
382382

383383
if b.config.TpmSupport != "" && b.config.TpmSupport != ec2.TpmSupportValuesV20 {

builder/ebssurrogate/builder.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type Config struct {
7171
// will allow you to create those programatically.
7272
VolumeRunTag config.NameValues `mapstructure:"run_volume_tag" required:"false"`
7373
// what architecture to use when registering the final AMI; valid options
74-
// are "arm64", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
74+
// are "arm64", "arm64_mac", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
7575
Architecture string `mapstructure:"ami_architecture" required:"false"`
7676
// The boot mode. Valid options are `legacy-bios` and `uefi`. See the documentation on
7777
// [boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) for
@@ -186,14 +186,14 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
186186
b.config.Architecture = "x86_64"
187187
}
188188
valid := false
189-
for _, validArch := range []string{"arm64", "i386", "x86_64", "x86_64_mac"} {
189+
for _, validArch := range []string{"arm64", "arm64_mac", "i386", "x86_64", "x86_64_mac"} {
190190
if validArch == b.config.Architecture {
191191
valid = true
192192
break
193193
}
194194
}
195195
if !valid {
196-
errs = packersdk.MultiErrorAppend(errs, errors.New(`The only valid ami_architecture values are "arm64", "i386", "x86_64", or "x86_64_mac"`))
196+
errs = packersdk.MultiErrorAppend(errs, errors.New(`The only valid ami_architecture values are "arm64", "arm64_mac", "i386", "x86_64", or "x86_64_mac"`))
197197
}
198198

199199
if b.config.TpmSupport != "" && b.config.TpmSupport != ec2.TpmSupportValuesV20 {

docs-partials/builder/chroot/Config-not-required.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
prefix `kms_key_id` with `alias/`.
153153

154154
- `ami_architecture` (string) - what architecture to use when registering the final AMI; valid options
155-
are "arm64", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
155+
are "arm64", "arm64_mac", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
156156

157157
- `boot_mode` (string) - The boot mode. Valid options are `legacy-bios` and `uefi`. See the documentation on
158158
[boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) for

docs-partials/builder/ebssurrogate/Config-not-required.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
will allow you to create those programatically.
2929

3030
- `ami_architecture` (string) - what architecture to use when registering the final AMI; valid options
31-
are "arm64", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
31+
are "arm64", "arm64_mac", "i386", "x86_64", or "x86_64_mac". Defaults to "x86_64".
3232

3333
- `boot_mode` (string) - The boot mode. Valid options are `legacy-bios` and `uefi`. See the documentation on
3434
[boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) for

0 commit comments

Comments
 (0)