Commit Graph

13691 Commits

Author SHA1 Message Date
Jon Allie c31bbcf4cf builder/amazon: AmiFilterOptions.GetOwners: avoid taking the address of a loop iterator var (#8417)
GetOwners() always returned a slice of pointers to the last value. Because slice ranging reuses the same local variable.
2019-11-27 12:28:07 +01:00
Megan Marsh 29d6c05ef8
Merge pull request #8401 from hashicorp/do_8838
use shell struct in shell-local provisioner and post-processor.
2019-11-25 11:49:08 -08:00
Megan Marsh a8ffa60b46 remove the already-included packer config from top level struct 2019-11-25 11:24:00 -08:00
Mike Dziedziela 7c3e032fb7 amazon docs: update block-device-configuration docs (#8395)
So that it works for all builders as some use it with the following field names: launch_block_device_mappings, ami_block_device_mappings or ebs_volumes. the refactored docs weird being to specific.
2019-11-25 11:58:30 +01:00
henry-aj-jones d317d7f3d1 post-processor/docker-tag: Allow to tag an artifact with multiple tags (#8392) 2019-11-22 11:48:36 +01:00
Megan Marsh e92783f303 add docs about efi mode (#8400)
Document what needs to happen if you're launching an efi vm.

Closes #7081
2019-11-22 11:17:08 +01:00
Megan Marsh 7d4353864f use shell struct in shell-local provisioner and post-processor. 2019-11-21 16:47:29 -08:00
Megan Marsh 59e6e1d4d5
Merge pull request #8393 from hashicorp/fix_8362
Add no_ephemeral template option to nuke ephemeral drives from launch mappings
2019-11-21 16:08:50 -08:00
Megan Marsh 664d9c972a
Merge pull request #8399 from hashicorp/update_kms_docs
add unique kms case to permissions docs
2019-11-21 15:17:08 -08:00
Wilken Rivera 40e9c4b517
Merge pull request #8397 from adongy/adong/surrogate_spot
amazon-ebssurrogate: allow enabling ena/sr-iov on spot instances
2019-11-21 16:33:21 -05:00
Megan Marsh 6c1cb2a099 add unique kms case to permissions docs 2019-11-21 13:24:44 -08:00
Megan Marsh 818d9bb087 send to step run spot instance 2019-11-21 13:21:56 -08:00
Megan Marsh 67c3373107 enable no_ephemeral for spot devices, clean up ranging behavior, update docs 2019-11-21 12:46:31 -08:00
Anthony Dong 2e989088e5 amazon-ebssurrogate: allow enabling ena/sr-iov on spot instances 2019-11-21 11:13:32 +01:00
Megan Marsh ca4bb238f7
Merge pull request #8390 from vicyap/f-fixer-for-qemu-disk-size-option
[WIP] Implement fixer to convert qemu disk size type from int to string
2019-11-20 14:27:35 -08:00
Megan Marsh 08e97ba4d8 generate code for no_ephemeral option 2019-11-20 13:49:04 -08:00
Megan Marsh 0e2bdc8be6 forcibly prevent ephemeral drives from being created in the amazon-ebs builder, when no_ephemeral is set 2019-11-20 13:42:14 -08:00
Victor Yap 9a961bb079 Implement fixer to convert qemu disk size type to string 2019-11-20 10:41:08 -06:00
Megan Marsh ef87cace9f update changelog 2019-11-19 15:07:11 -08:00
Wilken Rivera 68da46cdc4
Merge pull request #8391 from DanHam/validate-aws-vpc-info
builder/amazon/common/step_pre_validate: Return DescribeVpcs errors
2019-11-19 16:28:38 -05:00
DanHam b40e5d90b6
builder/amazon/common/step_pre_validate: Return DescribeVpcs errors 2019-11-19 20:18:53 +00:00
Wilken Rivera c5df4ed2a3
Merge pull request #8387 from DanHam/fix-validate-aws-vpc-info
Only validate the user has provided a subnet_id when vpc_id has been set
2019-11-19 14:56:04 -05:00
nywilken afb880c134 test/builder/amazon/common/step_pre_validate: Update DescribeVpcs mock
* Update condition to check for a empty VpcId
2019-11-19 14:48:07 -05:00
DanHam 074be9942d
Only validate the user has provided a subnet_id when vpc_id has been set 2019-11-19 14:09:58 +00:00
Lars Lehtonen 3571c585bb builder/googlecompute: fix dropped error (#8385) 2019-11-19 11:41:39 +01:00
Wilken Rivera ad74a87b5c
Merge pull request #8360 from hashicorp/fix-7167
builder/amazon: Add validation for `subnet_id` when specifying `vpc_id`
2019-11-18 16:50:11 -05:00
nywilken f9f4726eff builder/amazon/step_pre_validate: Add check for non-default VPCs
Subnet information is only really needed when the specified `vpc_id` is
not the default VPC for the region where the builder is being executed.
This change uses the AWS API to determine if the VPC provided is a
non-default VPC and only validates the existence of a `subnet_id` if a
user has provided a non-default `vpc_id`.

Tests after change
```
> make test TEST=./builder/amazon/... TESTARGS='-count=1 -v -run=TestStepPreValidate_checkVpc'
...

=== RUN   TestStepPreValidate_checkVpc
=== RUN   TestStepPreValidate_checkVpc/DefaultVpc
=== RUN   TestStepPreValidate_checkVpc/NonDefaultVpcNoSubnet
=== RUN   TestStepPreValidate_checkVpc/NonDefaultVpcWithSubnet
=== RUN   TestStepPreValidate_checkVpc/SubnetWithNoVpc
=== RUN   TestStepPreValidate_checkVpc/NoVpcInformation
--- PASS: TestStepPreValidate_checkVpc (0.00s)
    --- PASS: TestStepPreValidate_checkVpc/DefaultVpc (0.00s)
    --- PASS: TestStepPreValidate_checkVpc/NonDefaultVpcNoSubnet (0.00s)
    --- PASS: TestStepPreValidate_checkVpc/NonDefaultVpcWithSubnet (0.00s)
    --- PASS: TestStepPreValidate_checkVpc/SubnetWithNoVpc (0.00s)
    --- PASS: TestStepPreValidate_checkVpc/NoVpcInformation (0.00s)
PASS

...
```
2019-11-18 16:44:09 -05:00
Megan Marsh ef137a8f08
Merge pull request #8380 from bennu/qemu-args
fix: persist default drive/device
2019-11-18 11:05:45 -08:00
Megan Marsh ad34a4551b provisioner/windows-restart: revert sleep hack now that we've fixed the underlying bug in #8369 (#8377) 2019-11-18 10:48:33 +01:00
Megan Marsh dfa134cd98 ditch else statement for improved clarity 2019-11-18 10:11:59 +01:00
Megan Marsh ce8bca349f Update builder/amazon/ebs/step_create_ami.go
Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
2019-11-18 10:11:59 +01:00
Megan Marsh a35ac0127e fix bug in step_region_copy 2019-11-18 10:11:59 +01:00
bugbuilder 30ccab472f fix: persist default drive/device 2019-11-17 04:38:30 -03:00
Megan Marsh 261331ee2d
Merge pull request #8375 from hashicorp/fix_8373
helper/communicator/step_connect_ssh: Update proxy connection settings to use `SSHProxyUsername` and `SSHProxyPassword`
2019-11-15 15:21:40 -08:00
Megan Marsh 22c754c049
Merge pull request #8369 from hashicorp/eof_dieeee
Resolve ntlm nil pointer bug by bumping go-ntlmssp dependency
2019-11-15 15:00:36 -08:00
Megan Marsh 452ca602ee update go-ntlmssp dependency to fix upstream bug affecting winrm users 2019-11-15 13:08:38 -08:00
nywilken a61fe833ef helper/communicator/step_connect_ssh: Update proxy connection settings to use `SSHProxyUsername` and `SSHProxyPassword` 2019-11-15 15:08:05 -05:00
Lars Lehtonen 2e7ba19d8c post-processor/vagrant-cloud: fix dropped test errors 2019-11-15 11:44:33 +01:00
Megan Marsh 437983343a
Merge pull request #8371 from stephentawn/master
Fix error message when ovftool is missing
2019-11-14 16:07:12 -08:00
Megan Marsh 202ba41170
Merge pull request #8370 from alrs/fix-builder-lxc-dropped-error
builder/lxc: fix dropped error
2019-11-14 15:46:59 -08:00
Stephen Tawn c66219084e Fix error message when ovftool is missing 2019-11-14 23:11:16 +00:00
Lars Lehtonen 59472c6aad
builder/lxc: fix dropped error 2019-11-14 13:40:40 -08:00
Megan Marsh c09bb52a92
Merge pull request #8357 from hashicorp/fix_8330
ask for VM by name to reduce looping.
2019-11-13 14:06:57 -08:00
Megan Marsh 58a7448c86
Merge pull request #8356 from hashicorp/fix_7879
if someone logs a line longer than 64*1024 bytes before it contains a…
2019-11-12 15:08:19 -08:00
Megan Marsh fef4b05871
Merge pull request #8365 from hashicorp/td-amazon-helper-awserr-check
builder/amazon: Add helper function for checking against AWSError
2019-11-12 15:07:43 -08:00
Megan Marsh 50e84624b9
Merge pull request #8364 from hashicorp/fix_8222
update to newest version of go-tty to fix control flow bug
2019-11-12 13:08:54 -08:00
nywilken 488e539f63 builder/amazon: Add helper function for checking against AWSError
Replace all straight forward occurrences of `if err, ok := err.(awserr.Error)` with the `isAWSErr` helper function
2019-11-12 15:27:47 -05:00
Megan Marsh ffc4876812
Merge pull request #8363 from alrs/scripts-plugins-err-before-close
scripts: close file after error handling
2019-11-12 10:21:54 -08:00
Megan Marsh 53bbce4cd7 update to newest version of go-tty to fix control flow bug 2019-11-12 10:17:21 -08:00
Lars Lehtonen 3c170522f3
scripts: close file after error handling 2019-11-12 09:52:40 -08:00