Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/go-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: "Go Validate"
on:
push:
branches:
- 'main'
- "main"
pull_request:

permissions:
Expand All @@ -23,7 +23,7 @@ jobs:
go-version: ${{ steps.get-go-version.outputs.go-version }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: 'Determine Go version'
- name: "Determine Go version"
id: get-go-version
run: |
echo "Found Go $(cat .go-version)"
Expand Down Expand Up @@ -51,7 +51,8 @@ jobs:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- uses: golangci/golangci-lint-action@82d40c283aeb1f2b6595839195e95c2d6a49081b # v5.0.0
with:
version: v1.64.8
version: v2.12.2
install-mode: goinstall
only-new-issues: true
check-fmt:
needs:
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.24.0
1.26.0

17 changes: 11 additions & 6 deletions .web-docs/components/builder/chroot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ necessary for this build to succeed and can be found further down the page.

- `root_device_name` (string) - The root device name. For example, xvda.

- `root_volume_size` (int64) - The size of the root volume in GB for the chroot environment and the
- `root_volume_size` (int32) - The size of the root volume in GB for the chroot environment and the
resulting AMI. Default size is the snapshot size of the source_ami
unless from_scratch is true, in which case this field must be defined.

Expand Down Expand Up @@ -259,7 +259,7 @@ builders.
[template engine](/packer/docs/templates/legacy_json_templates/engine), see [Build template
data](#build-template-data) for more information.

- `ami_virtualization_type` (string) - The type of virtualization for the AMI
- `ami_virtualization_type` (ec2types.VirtualizationType) - The type of virtualization for the AMI
you are building. This option is required to register HVM images. Can be
paravirtual (default) or hvm.

Expand Down Expand Up @@ -394,7 +394,7 @@ builders.

[Time-based copies]: https://docs.aws.amazon.com/ebs/latest/userguide/time-based-copies.html

- `imds_support` (string) - Enforce version of the Instance Metadata Service on the built AMI.
- `imds_support` (ec2types.ImdsSupportValues) - Enforce version of the Instance Metadata Service on the built AMI.
Valid options are unset (legacy) and `v2.0`. See the documentation on
[IMDS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
for more information. Defaults to legacy.
Expand Down Expand Up @@ -501,7 +501,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
false will result in an unencrypted device, and true will result in an
encrypted one.

- `iops` (\*int64) - The number of I/O operations per second (IOPS) that the volume supports.
- `iops` (\*int32) - The number of I/O operations per second (IOPS) that the volume supports.
See the documentation on
[IOPs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
for more information
Expand All @@ -511,7 +511,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept

- `snapshot_id` (string) - The ID of the snapshot.

- `throughput` (\*int64) - The throughput for gp3 volumes, only valid for gp3 types
- `throughput` (\*int32) - The throughput for gp3 volumes, only valid for gp3 types
See the documentation on
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
for more information
Expand All @@ -529,7 +529,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,
sc1 for Cold HDD, and standard for Magnetic volumes.

- `volume_size` (int64) - The size of the volume, in GiB. Required if not specifying a
- `volume_size` (int32) - The size of the volume, in GiB. Required if not specifying a
snapshot_id.

- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption.
Expand Down Expand Up @@ -771,6 +771,11 @@ JSON example:
If both option and environment variable are set, the delay_seconds will be considered over the AWS_POLL_DELAY_SECONDS.
If none is set, defaults to AWS waiter default which is 15 seconds.

- `max_timeout` (int) - Specifies the maximum timeout in seconds for the waiter.
This value can also be set via the AWS_MAX_TIMEOUT.
If both option and environment variable are set, the max_timeout will be considered over the AWS_MAX_TIMEOUT.
If none is set, defaults to AWS waiter default which is 600 seconds (10 minutes).

<!-- End of code generated from the comments of the AWSPollingConfig struct in builder/common/state.go; -->


Expand Down
27 changes: 16 additions & 11 deletions .web-docs/components/builder/ebs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ necessary for this build to succeed and can be found further down the page.
[template engine](/packer/docs/templates/legacy_json_templates/engine), see [Build template
data](#build-template-data) for more information.

- `ami_virtualization_type` (string) - The type of virtualization for the AMI
- `ami_virtualization_type` (ec2types.VirtualizationType) - The type of virtualization for the AMI
you are building. This option is required to register HVM images. Can be
paravirtual (default) or hvm.

Expand Down Expand Up @@ -247,7 +247,7 @@ necessary for this build to succeed and can be found further down the page.

[Time-based copies]: https://docs.aws.amazon.com/ebs/latest/userguide/time-based-copies.html

- `imds_support` (string) - Enforce version of the Instance Metadata Service on the built AMI.
- `imds_support` (ec2types.ImdsSupportValues) - Enforce version of the Instance Metadata Service on the built AMI.
Valid options are unset (legacy) and `v2.0`. See the documentation on
[IMDS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
for more information. Defaults to legacy.
Expand Down Expand Up @@ -514,6 +514,11 @@ JSON example:
If both option and environment variable are set, the delay_seconds will be considered over the AWS_POLL_DELAY_SECONDS.
If none is set, defaults to AWS waiter default which is 15 seconds.

- `max_timeout` (int) - Specifies the maximum timeout in seconds for the waiter.
This value can also be set via the AWS_MAX_TIMEOUT.
If both option and environment variable are set, the max_timeout will be considered over the AWS_MAX_TIMEOUT.
If none is set, defaults to AWS waiter default which is 600 seconds (10 minutes).

<!-- End of code generated from the comments of the AWSPollingConfig struct in builder/common/state.go; -->


Expand All @@ -523,7 +528,7 @@ JSON example:

<!-- Code generated from the comments of the RunConfig struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->

- `instance_type` (string) - The EC2 instance type to use while building the
- `instance_type` (ec2types.InstanceType) - The EC2 instance type to use while building the
AMI, such as t2.small.

- `source_ami` (string) - The source AMI whose root volume will be copied and
Expand Down Expand Up @@ -559,15 +564,15 @@ JSON example:
- `availability_zone` (string) - Destination availability zone to launch
instance in. Leave this empty to allow Amazon to auto-assign.

- `block_duration_minutes` (int64) - Requires spot_price to be set. The
- `block_duration_minutes` (int32) - Requires spot_price to be set. The
required duration for the Spot Instances (also known as Spot blocks). This
value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). You can't
specify an Availability Zone group or a launch group if you specify a
duration. Note: This parameter is no longer available to new customers
from July 1, 2021. [See Amazon's
documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#fixed-duration-spot-instances).

- `capacity_reservation_preference` (string) - Set the preference for using a capacity reservation if one exists.
- `capacity_reservation_preference` (ec2types.CapacityReservationPreference) - Set the preference for using a capacity reservation if one exists.
Either will be `open` or `none`. Defaults to `none`

- `capacity_reservation_id` (string) - Provide the specific EC2 Capacity Reservation ID that will be used
Expand Down Expand Up @@ -814,7 +819,7 @@ JSON example:
criteria provided in `source_ami_filter`; this pins the AMI returned by the
filter, but will cause Packer to fail if the `source_ami` does not exist.

- `spot_allocation_strategy` (string) - One of `price-capacity-optimized`, `capacity-optimized`, `diversified` or `lowest-price`.
- `spot_allocation_strategy` (ec2types.SpotAllocationStrategy) - One of `price-capacity-optimized`, `capacity-optimized`, `diversified` or `lowest-price`.
The strategy that determines how to allocate the target Spot Instance capacity
across the Spot Instance pools specified by the EC2 Fleet launch configuration.
If this option is not set, Packer will use default option provided by the SDK (currently `lowest-price`).
Expand Down Expand Up @@ -971,7 +976,7 @@ JSON example:

Refer to the [Placement docs](#placement-configuration) for more information on the supported attributes for placement configuration.

- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.
- `tenancy` (ec2types.Tenancy) - Deprecated: Use Placement Tenancy instead.

- `temporary_security_group_source_cidrs` ([]string) - A list of IPv4/IPv6 CIDR blocks to be authorized access to the instance, when
packer is creating a temporary security group.
Expand Down Expand Up @@ -1098,7 +1103,7 @@ JSON example:

- `host_id` (string) - The ID of the host used when Packer launches an EC2 instance.

- `tenancy` (string) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used
- `tenancy` (ec2types.Tenancy) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used
when Packer launches the EC2 instance, allowing it to be launched on dedicated hardware.

The default is "default", meaning shared tenancy. Allowed values are "default",
Expand Down Expand Up @@ -1386,7 +1391,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
false will result in an unencrypted device, and true will result in an
encrypted one.

- `iops` (\*int64) - The number of I/O operations per second (IOPS) that the volume supports.
- `iops` (\*int32) - The number of I/O operations per second (IOPS) that the volume supports.
See the documentation on
[IOPs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
for more information
Expand All @@ -1396,7 +1401,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept

- `snapshot_id` (string) - The ID of the snapshot.

- `throughput` (\*int64) - The throughput for gp3 volumes, only valid for gp3 types
- `throughput` (\*int32) - The throughput for gp3 volumes, only valid for gp3 types
See the documentation on
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
for more information
Expand All @@ -1414,7 +1419,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,
sc1 for Cold HDD, and standard for Magnetic volumes.

- `volume_size` (int64) - The size of the volume, in GiB. Required if not specifying a
- `volume_size` (int32) - The size of the volume, in GiB. Required if not specifying a
snapshot_id.

- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption.
Expand Down
27 changes: 16 additions & 11 deletions .web-docs/components/builder/ebssurrogate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ necessary for this build to succeed and can be found further down the page.
[template engine](/packer/docs/templates/legacy_json_templates/engine), see [Build template
data](#build-template-data) for more information.

- `ami_virtualization_type` (string) - The type of virtualization for the AMI
- `ami_virtualization_type` (ec2types.VirtualizationType) - The type of virtualization for the AMI
you are building. This option is required to register HVM images. Can be
paravirtual (default) or hvm.

Expand Down Expand Up @@ -260,7 +260,7 @@ necessary for this build to succeed and can be found further down the page.

[Time-based copies]: https://docs.aws.amazon.com/ebs/latest/userguide/time-based-copies.html

- `imds_support` (string) - Enforce version of the Instance Metadata Service on the built AMI.
- `imds_support` (ec2types.ImdsSupportValues) - Enforce version of the Instance Metadata Service on the built AMI.
Valid options are unset (legacy) and `v2.0`. See the documentation on
[IMDS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
for more information. Defaults to legacy.
Expand Down Expand Up @@ -527,6 +527,11 @@ JSON example:
If both option and environment variable are set, the delay_seconds will be considered over the AWS_POLL_DELAY_SECONDS.
If none is set, defaults to AWS waiter default which is 15 seconds.

- `max_timeout` (int) - Specifies the maximum timeout in seconds for the waiter.
This value can also be set via the AWS_MAX_TIMEOUT.
If both option and environment variable are set, the max_timeout will be considered over the AWS_MAX_TIMEOUT.
If none is set, defaults to AWS waiter default which is 600 seconds (10 minutes).

<!-- End of code generated from the comments of the AWSPollingConfig struct in builder/common/state.go; -->


Expand All @@ -536,7 +541,7 @@ JSON example:

<!-- Code generated from the comments of the RunConfig struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->

- `instance_type` (string) - The EC2 instance type to use while building the
- `instance_type` (ec2types.InstanceType) - The EC2 instance type to use while building the
AMI, such as t2.small.

- `source_ami` (string) - The source AMI whose root volume will be copied and
Expand Down Expand Up @@ -572,15 +577,15 @@ JSON example:
- `availability_zone` (string) - Destination availability zone to launch
instance in. Leave this empty to allow Amazon to auto-assign.

- `block_duration_minutes` (int64) - Requires spot_price to be set. The
- `block_duration_minutes` (int32) - Requires spot_price to be set. The
required duration for the Spot Instances (also known as Spot blocks). This
value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). You can't
specify an Availability Zone group or a launch group if you specify a
duration. Note: This parameter is no longer available to new customers
from July 1, 2021. [See Amazon's
documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#fixed-duration-spot-instances).

- `capacity_reservation_preference` (string) - Set the preference for using a capacity reservation if one exists.
- `capacity_reservation_preference` (ec2types.CapacityReservationPreference) - Set the preference for using a capacity reservation if one exists.
Either will be `open` or `none`. Defaults to `none`

- `capacity_reservation_id` (string) - Provide the specific EC2 Capacity Reservation ID that will be used
Expand Down Expand Up @@ -827,7 +832,7 @@ JSON example:
criteria provided in `source_ami_filter`; this pins the AMI returned by the
filter, but will cause Packer to fail if the `source_ami` does not exist.

- `spot_allocation_strategy` (string) - One of `price-capacity-optimized`, `capacity-optimized`, `diversified` or `lowest-price`.
- `spot_allocation_strategy` (ec2types.SpotAllocationStrategy) - One of `price-capacity-optimized`, `capacity-optimized`, `diversified` or `lowest-price`.
The strategy that determines how to allocate the target Spot Instance capacity
across the Spot Instance pools specified by the EC2 Fleet launch configuration.
If this option is not set, Packer will use default option provided by the SDK (currently `lowest-price`).
Expand Down Expand Up @@ -984,7 +989,7 @@ JSON example:

Refer to the [Placement docs](#placement-configuration) for more information on the supported attributes for placement configuration.

- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.
- `tenancy` (ec2types.Tenancy) - Deprecated: Use Placement Tenancy instead.

- `temporary_security_group_source_cidrs` ([]string) - A list of IPv4/IPv6 CIDR blocks to be authorized access to the instance, when
packer is creating a temporary security group.
Expand Down Expand Up @@ -1111,7 +1116,7 @@ JSON example:

- `host_id` (string) - The ID of the host used when Packer launches an EC2 instance.

- `tenancy` (string) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used
- `tenancy` (ec2types.Tenancy) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used
when Packer launches the EC2 instance, allowing it to be launched on dedicated hardware.

The default is "default", meaning shared tenancy. Allowed values are "default",
Expand Down Expand Up @@ -1388,7 +1393,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
false will result in an unencrypted device, and true will result in an
encrypted one.

- `iops` (\*int64) - The number of I/O operations per second (IOPS) that the volume supports.
- `iops` (\*int32) - The number of I/O operations per second (IOPS) that the volume supports.
See the documentation on
[IOPs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
for more information
Expand All @@ -1398,7 +1403,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept

- `snapshot_id` (string) - The ID of the snapshot.

- `throughput` (\*int64) - The throughput for gp3 volumes, only valid for gp3 types
- `throughput` (\*int32) - The throughput for gp3 volumes, only valid for gp3 types
See the documentation on
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
for more information
Expand All @@ -1416,7 +1421,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,
sc1 for Cold HDD, and standard for Magnetic volumes.

- `volume_size` (int64) - The size of the volume, in GiB. Required if not specifying a
- `volume_size` (int32) - The size of the volume, in GiB. Required if not specifying a
snapshot_id.

- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption.
Expand Down
Loading