Skip to content

Commit d770e7d

Browse files
author
Karel Pazdera
committed
fix: Added regenerated docs, update golang-ci-lint version
1 parent 0ec45a4 commit d770e7d

6 files changed

Lines changed: 78 additions & 52 deletions

File tree

.github/workflows/go-validate.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: "Go Validate"
1010
on:
1111
push:
1212
branches:
13-
- 'main'
13+
- "main"
1414
pull_request:
1515

1616
permissions:
@@ -23,7 +23,7 @@ jobs:
2323
go-version: ${{ steps.get-go-version.outputs.go-version }}
2424
steps:
2525
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
26-
- name: 'Determine Go version'
26+
- name: "Determine Go version"
2727
id: get-go-version
2828
run: |
2929
echo "Found Go $(cat .go-version)"
@@ -51,7 +51,8 @@ jobs:
5151
go-version: ${{ needs.get-go-version.outputs.go-version }}
5252
- uses: golangci/golangci-lint-action@82d40c283aeb1f2b6595839195e95c2d6a49081b # v5.0.0
5353
with:
54-
version: v1.64.8
54+
version: v2.12.2
55+
install-mode: goinstall
5556
only-new-issues: true
5657
check-fmt:
5758
needs:

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ necessary for this build to succeed and can be found further down the page.
133133

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

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

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

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

@@ -394,7 +394,7 @@ builders.
394394

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

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

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

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

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

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

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

774+
- `max_timeout` (int) - Specifies the maximum timeout in seconds for the waiter.
775+
This value can also be set via the AWS_MAX_TIMEOUT.
776+
If both option and environment variable are set, the max_timeout will be considered over the AWS_MAX_TIMEOUT.
777+
If none is set, defaults to AWS waiter default which is 600 seconds (10 minutes).
778+
774779
<!-- End of code generated from the comments of the AWSPollingConfig struct in builder/common/state.go; -->
775780

776781

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

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ necessary for this build to succeed and can be found further down the page.
112112
[template engine](/packer/docs/templates/legacy_json_templates/engine), see [Build template
113113
data](#build-template-data) for more information.
114114

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

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

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

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

517+
- `max_timeout` (int) - Specifies the maximum timeout in seconds for the waiter.
518+
This value can also be set via the AWS_MAX_TIMEOUT.
519+
If both option and environment variable are set, the max_timeout will be considered over the AWS_MAX_TIMEOUT.
520+
If none is set, defaults to AWS waiter default which is 600 seconds (10 minutes).
521+
517522
<!-- End of code generated from the comments of the AWSPollingConfig struct in builder/common/state.go; -->
518523

519524

@@ -523,7 +528,7 @@ JSON example:
523528

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

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

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

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

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

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

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

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

974-
- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.
979+
- `tenancy` (ec2types.Tenancy) - Deprecated: Use Placement Tenancy instead.
975980

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

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

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

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

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

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

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

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

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

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

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ necessary for this build to succeed and can be found further down the page.
125125
[template engine](/packer/docs/templates/legacy_json_templates/engine), see [Build template
126126
data](#build-template-data) for more information.
127127

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

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

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

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

530+
- `max_timeout` (int) - Specifies the maximum timeout in seconds for the waiter.
531+
This value can also be set via the AWS_MAX_TIMEOUT.
532+
If both option and environment variable are set, the max_timeout will be considered over the AWS_MAX_TIMEOUT.
533+
If none is set, defaults to AWS waiter default which is 600 seconds (10 minutes).
534+
530535
<!-- End of code generated from the comments of the AWSPollingConfig struct in builder/common/state.go; -->
531536

532537

@@ -536,7 +541,7 @@ JSON example:
536541

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

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

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

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

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

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

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

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

987-
- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.
992+
- `tenancy` (ec2types.Tenancy) - Deprecated: Use Placement Tenancy instead.
988993

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)