Commit Graph

4918 Commits

Author SHA1 Message Date
Li Kexian f2f544c434 fixed get copy region value (#8345) 2019-11-07 11:12:19 +01:00
Megan Marsh d5ba530b26 make it clear we expect pem format not some other formate (#8344) 2019-11-07 10:30:51 +01:00
Lars Lehtonen 5f02150e05
builder/vmware/common: defer close after testing for errors 2019-11-06 14:28:17 -08:00
cove 2898d66812
retry runinstances aws api that wasn't retried and could fail 2019-11-06 14:06:35 -08:00
Adrien Delorme a36b94320a virtualbox: simplify ParseSnapshotData 2019-11-06 10:24:20 +01:00
Lars Lehtonen 5a0dc48f0f
builder/file: defer close after testing for errors 2019-11-05 11:40:42 -08:00
Adrien Delorme 116a038de9 Update snapshot.go
avoid a panic on a too short slice.
2019-11-05 15:48:32 +01:00
Adrien Delorme 44a7c49334
Merge pull request #8320 from hashicorp/do_8228
re-add backwards incompatible changes to 1.5.0
2019-11-05 14:40:48 +01:00
Adrien Delorme ee6b72570b Update builder.hcl2spec.go 2019-11-05 14:21:07 +01:00
Megan Marsh 5692294a96 use absolute path for vagrantfile to avoid confusion with build directory later 2019-11-04 15:15:37 -08:00
Megan Marsh 6c704f7046 Revert "fix template imports"
This reverts commit 0e70e0e5a4.
2019-11-04 14:29:00 -08:00
Megan Marsh d010762dbf Revert "Revert "Qemu builder disk size as a string""
This reverts commit 9c782f4d04.
2019-11-04 14:28:48 -08:00
Megan Marsh 517834d528 Revert "Revert "remove clean_ami_name and clean_image_name; complete the deprecation for these functions in favor of clean_resource_name""
This reverts commit 44f91c9afc.
2019-11-04 14:28:40 -08:00
Adrien Delorme 14243ce56a
Merge pull request #8305 from hashicorp/fix_8301
allow nvme, since virtualbox 6.0 allows it
2019-11-04 17:58:18 +01:00
Adrien Delorme c935eb1435
Merge pull request #8308 from alrs/prune-dead-linode-func
builder/linode: remove unused sshConfig() and associated import
2019-11-04 15:57:29 +01:00
Adrien Delorme a23801d4a9 builder.virtualbox.iso: document that EFI mode needs to be enabled for pcie/nvme to work too 2019-11-04 14:30:59 +01:00
Lars Lehtonen 9924d16fc3
builder/vmware/common: remove unused testHWConfig() 2019-11-01 19:13:26 -07:00
Lars Lehtonen 6eefe55e23
builder/vmware/iso: remove unused testState() 2019-11-01 19:11:42 -07:00
Lars Lehtonen af1e41793d
builder/linode: move commHost() out of orphaned ssh.go 2019-11-01 19:02:52 -07:00
Lars Lehtonen 9dad09b9d3
builder/linode: remove unused sshConfig() function and associated import 2019-11-01 18:58:14 -07:00
Megan Marsh fcb65ee422
Merge pull request #8307 from hashicorp/fix_8116
delete amazon import post-processor intermediary snapshots
2019-11-01 14:55:22 -07:00
Megan Marsh e9e4c102e5 delete amazon import post-processor intermediary snapshots 2019-11-01 14:17:44 -07:00
Megan Marsh 974eba443a update docs to include warning about extension pack 2019-11-01 09:48:35 -07:00
Adrien Delorme b790776096 vbox iso: use NVMe Controller when the hard drive interface if pcie 2019-11-01 14:43:59 +01:00
Adrien Delorme 86e24df947
Merge pull request #8304 from alrs/remove-dead-openstack-test-function
builder/openstack: remove dead testConfig() function
2019-11-01 11:06:50 +01:00
Adrien Delorme 1b7ef252d2
Merge pull request #8303 from alrs/amazon-builder-cleanup
Cleanup builder/amazon/common
2019-11-01 11:06:06 +01:00
Megan Marsh 6f54468dd5 fix mocks 2019-10-31 15:36:22 -07:00
Megan Marsh 65ad3105b3 udpdate generated code 2019-10-31 15:28:36 -07:00
Megan Marsh 9343a23021 add driver calls to enable nvme controller 2019-10-31 15:21:52 -07:00
Megan Marsh d2867c47f0 allow nvme, since virtualbox 6.0 allows it 2019-10-31 14:43:46 -07:00
Lars Lehtonen b68c75ea3e
builder/openstack: remove dead testConfig() function 2019-10-31 13:36:00 -07:00
Lars Lehtonen d072079899
builder/amazon/common: remove dead test type and function mockEC2Conn_Modify_EBS.ModifyInstanceAttribute() 2019-10-31 12:38:32 -07:00
Lars Lehtonen 953be1603b
builder/amazon/common: remove dead test type and function mockEC2ConnSpot.DescribeSpotPriceHistory() 2019-10-31 12:34:11 -07:00
Lars Lehtonen 7a09f9c678
builder/amazon/common: remove dead test function fakeModifyEBSBackedInstanceState() 2019-10-31 12:22:10 -07:00
Lars Lehtonen 0a13b620d6
builder/amazon/common: remove dead test function StepModifyEBSBackedInstance_EnableAMIENASupport() 2019-10-31 12:19:28 -07:00
Lars Lehtonen c74df8b652
builder/amazon/common: remove dead test function getMockConnSpot() 2019-10-31 12:15:53 -07:00
Lars Lehtonen e5e2bfa83f
builder/amazon/common: remove nil check on slice, len() on nil slices is zero 2019-10-31 12:09:32 -07:00
Adrien Delorme 1efd86e809 Linode: remove unused StateTimeout field 2019-10-31 16:13:06 +01:00
Adrien Delorme 819329228a Change back to make sure all durations are a time.Duration
It is simply the best/simplest solution and trying to prevent users from passing and integer here would be like opening a can of worms. Because:

* we cannot make mapstructure validate our duration string ( with an UnmarshalJSON func etc.)
* we cannot make mapstructure spit a string instead of a duration and packer will decode-encode-decode config.
* the hcl2 generated code asks for a string, so this will be enforced by default.
2019-10-31 16:12:07 +01:00
Adrien Delorme bf3d9841c6 Force durations to be passed a strings
Before this commit it was possible to set a duration using an integer or a float. Go's time.Duration is an int64 internally an mapstructure will take advantage of this and load the number as a int64 but `1` means one ns which is unexpected/confusing. To avoid confusion and enforce readability this forces users to pass a string with a unit for a duration; ex "56s".
2019-10-31 11:47:19 +01:00
Adrien Delorme ada9821897
Merge pull request #8294 from hashicorp/do_7974
add insert_key option for toggling whether to add Vagrant's insecure key
2019-10-31 10:27:27 +01:00
Megan Marsh 2fa79c6086 fix tests 2019-10-30 13:48:12 -07:00
Megan Marsh 8f996cd4de update docs 2019-10-30 13:36:56 -07:00
Megan Marsh 3b3aa562ed add insert_key option for toggling whether to add Vagrant's insecure key 2019-10-30 13:27:34 -07:00
Megan Marsh 553ca2e15d
Merge pull request #8293 from alrs/fix-azure-chroot-dropped-err
builder/azure/chroot: fix dropped error
2019-10-30 13:13:25 -07:00
Megan Marsh ca64cc1237
Merge pull request #8261 from shawnmssu/feature/ucloud_import
Packer Post-Processor support UCloud import
2019-10-30 13:11:55 -07:00
Lars Lehtonen 6862e3534f
builder/azure/chroot: fix dropped error 2019-10-30 11:14:32 -07:00
Megan Marsh 6191b9c8c6
Merge pull request #8288 from hashicorp/fix_8271
add some extra layers of validation to make sure that people don't tr…
2019-10-30 10:41:52 -07:00
Megan Marsh d084cd1895 Update builder/amazon/common/ami_config.go 2019-10-30 09:41:23 -07:00
Adrien Delorme d915618819
Merge pull request #8289 from hashicorp/test_filter_builder
add test to catch this case
2019-10-30 10:34:58 +01:00
mingsheng.su 545575b879 optimize code about ufile config 2019-10-29 16:11:44 -07:00
mingsheng.su 37e898e115 optimize code style 2019-10-29 16:11:44 -07:00
mingsheng.su 9de1c42ad4 fix ucloud builder acctest 2019-10-29 16:11:44 -07:00
Megan Marsh a4f95c8e7d fux gebeaj 2019-10-29 16:11:44 -07:00
mingsheng.su 2c513fce64 update ucloud packer 2019-10-29 16:11:43 -07:00
mingsheng.su 61f9d3a9fe add ucloud import 2019-10-29 16:11:43 -07:00
Megan Marsh e9f02e44cb add test to catch this case 2019-10-29 11:28:56 -07:00
Megan Marsh 7cf47fc463 add some extra layers of validation to make sure that people don't trip over magical encrypt_boot settings later in the build 2019-10-29 11:26:22 -07:00
Andrey Kaipov 5da5b00e1c [builder/openstack] adds option to discover provisioning network 2019-10-29 13:02:27 -04:00
Adrien Delorme 8b6f1358fb
Merge pull request #8281 from alrs/fix-builder-oneandone-errors
builder/oneandone: fix dropped errors
2019-10-29 12:25:27 +01:00
Adrien Delorme b2b12d6b04
Merge pull request #8280 from blinohod/cloudstack-display-name
[WIP] Add instance_display_name for cloudstack builder
2019-10-29 12:19:50 +01:00
Megan Marsh e2283445f2 need to initialize variables scoped to the individual loop, because the address of k,v stay the same and that means we overwrite previous variables when assigning them to the struct directly. 2019-10-28 14:31:13 -07:00
Lars Lehtonen 6f7693577d
builder/oneandone: fix dropped errors 2019-10-28 08:25:48 -07:00
Michael Bochkaryov da7e72246c Add instance_display_name parameter for Cloudstack builder
This change introduce instance_display_name optional parameter
for Cloudstack builder to set custom VM display name.
By default it is set to "Created by Packer".
2019-10-26 21:13:45 -07:00
Megan Marsh 0cb098b713 regenerate code because of hyperv refactor 2019-10-25 09:52:37 -07:00
Megan Marsh 2d01b3b7ab
Merge pull request #8274 from hashicorp/fix_8264
Make Vagrant driver code pass through logs as it receives them rather…
2019-10-24 14:38:53 -07:00
Megan Marsh a783a09ea3
Merge pull request #8269 from paulmey/paulmey/generalize-chroot
[amazon/chroot] Move common/generic chroot builder steps to common directory
2019-10-24 14:32:01 -07:00
Megan Marsh a7be0bed30 Make Vagrant driver code pass through logs as it receives them rather than buffering and returning them all at the end of the call. 2019-10-24 13:12:35 -07:00
Megan Marsh eccdb44e3b
Merge pull request #8246 from hashicorp/fix_8089
Add the additional_disk_size option tho the hyperv vmcx builder.
2019-10-24 11:50:58 -07:00
Megan Marsh 7928b5b045 fix transcription error from when we moved to generated docs 2019-10-24 10:19:03 -07:00
Paul Meyer 3be7d81ce2 Move common steps together 2019-10-24 04:21:46 +00:00
Paul Meyer e6dfe301ac Move CommandWrapper & ShellCommand to common 2019-10-24 04:06:29 +00:00
Megan Marsh 1731f87ad0
Merge pull request #8186 from puetzk/issue8178
fix: set openstack metadata for use_blockstorage_volume
2019-10-23 12:53:30 -07:00
Megan Marsh 436e21ae15 Merge branch 'master' into pr/8186 2019-10-23 12:08:02 -07:00
Paul Meyer b54a2ee09d Set correct user agent for Azure clientset 2019-10-23 11:31:29 -07:00
Megan Marsh b9245a402d add structure to its own struct to make generated code stop complaining 2019-10-23 10:46:42 -07:00
Megan Marsh 5614f307fb regerate code
generate flat FlatPolicyDocument
add PolicyDocument to generate command
2019-10-23 10:46:07 -07:00
Kevin Puetz 00d0297d26 Merge branch 'master' into issue8178 2019-10-23 00:34:38 -05:00
Megan Marsh d15f43e4eb
Merge pull request #8232 from hashicorp/artifact-tree
HCL2 configs - part one
2019-10-22 11:54:34 -07:00
Megan Marsh cdc3fdf926
Merge pull request #8247 from b-b3rn4rd/master
New Feature: allow to specify  IAM policy for a temporary instance profile
2019-10-22 09:33:23 -07:00
Bernard Baltrusaitis ec1d70dc44 adding required changes 2019-10-22 21:40:18 +11:00
Megan Marsh 0c2fba089d
Merge pull request #8250 from tencentyun/master
tencentcloud-cvm builder: we added retry on remote api call to improve the user experience
2019-10-21 14:45:37 -07:00
Megan Marsh 34f5bfa498 regenerated things 2019-10-21 14:21:15 -07:00
Megan Marsh e439dd039b fix tests 2019-10-21 14:08:49 -07:00
Megan Marsh fe5ea886a2 refactir hyperv builders to remove duplicated config and prepare code 2019-10-21 13:29:56 -07:00
Megan Marsh eb7bce0728 add additional disk size option to hyperv-vmcx 2019-10-21 13:29:55 -07:00
Megan Marsh 836aaafaa3
Merge pull request #8203 from sumit-kalra/master
Azure-ARM builder: Deploy NSG if list of IP addresses is provided in config
2019-10-21 11:10:58 -07:00
Li Kexian 6fb8988d08
we added retry on remote api call to improve the user experience 2019-10-21 13:21:56 +08:00
Bernard Baltrusaitis 65d1447b64 adding formatting 2019-10-19 21:33:58 +11:00
Bernard Baltrusaitis 6e2146324f Merge branch 'master' of github.com:b-b3rn4rd/packer 2019-10-19 20:56:49 +11:00
Bernard Baltrusaitis 8b83cca064 adding temporary instance profile document policy 2019-10-19 20:56:18 +11:00
Adrien Delorme 8b76453e7f make generate 2019-10-16 10:50:45 +02:00
Adrien Delorme 4542666e25 fix func calls after master merge 2019-10-16 10:40:25 +02:00
Adrien Delorme cf1555bf17 Merge remote-tracking branch 'origin/master' into artifact-tree 2019-10-16 10:22:56 +02:00
Paul Meyer 575de8659e
Merge pull request #8226 from larohra/IncreasePollingDuration
[azure] Increase polling duration
2019-10-15 16:25:36 -07:00
Paul Meyer b716299d8e PR comment 2019-10-15 21:14:20 +00:00
Paul Meyer d3dc1be71c Doc updates 2019-10-15 21:14:20 +00:00
Paul Meyer 9b724d4ca0 Add artifact 2019-10-15 21:14:20 +00:00
Paul Meyer 0866cb3714 Reorganize client/common packages 2019-10-15 21:14:20 +00:00
Paul Meyer fe584f4448 Format updates 2019-10-15 21:14:20 +00:00
Paul Meyer 19a3502b36 Add 'vm' template function 2019-10-15 21:14:20 +00:00
Paul Meyer f72c4ec7a3 Update example and docs 2019-10-15 21:14:20 +00:00
Paul Meyer b5c0742951 Add test that verifies disksize bug (2/2) 2019-10-15 21:14:20 +00:00
Paul Meyer 98175c06d5 Add test that verifies disksize bug (1/2) 2019-10-15 21:14:20 +00:00
Paul Meyer eb5dc9326d Adding more tests 2019-10-15 21:14:20 +00:00
Paul Meyer 5943881051 Default for Gen 1 VMs 2019-10-15 21:14:20 +00:00
Paul Meyer 716f19a457 make fmt 2019-10-15 21:14:20 +00:00
Paul Meyer 8c73450f3d fixup! Add documentation to config struct 2019-10-15 21:14:20 +00:00
Paul Meyer 11ef06b94d Add StepVerifySourceDisk 2019-10-15 21:13:37 +00:00
Paul Meyer cb729e5a38 Add documentation to config struct 2019-10-15 21:13:37 +00:00
Paul Meyer 27a5bfe11c Add implementation for disk as source 2019-10-15 21:13:37 +00:00
Paul Meyer eff3f2bdcf Add test for disk input validation 2019-10-15 21:13:37 +00:00
Paul Meyer 57cff8961a Allow skipping OSDisk cleanup 2019-10-15 21:13:37 +00:00
Paul Meyer 6dee4d2d32 Wait for detach optimization 2019-10-15 21:13:37 +00:00
Paul Meyer bbac79f0a4 Make PIR images work 2019-10-15 21:13:37 +00:00
Paul Meyer b5401d552a Make from_scratch work 2019-10-15 21:13:37 +00:00
Paul Meyer b9b5bb2951 Use DiskStorageAccountTypes 2019-10-15 21:13:37 +00:00
Paul Meyer b4d0865548 Update azure-chroot builder 2019-10-15 21:13:37 +00:00
Paul Meyer e11a5bdb40 Put os disk id in state 2019-10-15 21:13:37 +00:00
Paul Meyer 77b782c5b5 Add StepEarlyCleanup 2019-10-15 21:13:37 +00:00
Paul Meyer 977ca5be1c Add StepCopyFiles and StepChrootProvision 2019-10-15 21:13:37 +00:00
Paul Meyer 9a3e6661b1 Add StepMountExtra 2019-10-15 21:13:37 +00:00
Paul Meyer addbdedea9 Add StepPostMountCommands 2019-10-15 21:13:37 +00:00
Paul Meyer d1f8b8545d Add StepAttachDisk 2019-10-15 21:13:37 +00:00
Paul Meyer 4d750ddefa Reuse amazon/chroot/step_pre_mount_commands.go 2019-10-15 21:13:37 +00:00
Paul Meyer 45d3f28c67 Add StepCreateNewDisk 2019-10-15 21:13:37 +00:00
Paul Meyer 3d329cf87d Add chroot builder framework 2019-10-15 21:13:37 +00:00
Paul Meyer 369ec9a84c Create disk attacher component 2019-10-15 21:13:37 +00:00
Paul Meyer 3c33aa4fc5 Add metadata client 2019-10-15 21:13:37 +00:00
Paul Meyer 113dc12346 Add function to detect whether Packer is running on Azure 2019-10-15 21:13:37 +00:00
Paul Meyer f106adbd12 Add Azure client set for chroot builder 2019-10-15 21:13:37 +00:00
Paul Meyer 2ded8f25ec Add metadata client 2019-10-15 21:13:37 +00:00
Paul Meyer 72fdce09ba Allow GetServicePrincipalToken to be called independently 2019-10-15 21:13:37 +00:00
Adrien Delorme 21a0cbffba fmt 2019-10-15 12:56:43 +02:00
Adrien Delorme 078ba7c8c3 commit old code generation tool
for history
2019-10-15 12:56:42 +02:00
Adrien Delorme 438f704333 fmt 2019-10-15 12:56:42 +02:00
Adrien Delorme 766e5c77ef builder.vmware.vmx: remove duplicate RemoteType field. 2019-10-15 12:56:42 +02:00
Adrien Delorme 00e3f97f5b builder.vmware.iso: remove duplicate Format field 2019-10-15 12:56:42 +02:00
Adrien Delorme 6fbd664b66 builder.vagrant: simplify communicator.Config field 2019-10-15 12:56:42 +02:00
Adrien Delorme 3fe1c96491 builder.proxmox: make ProxmoxURL *url.URL field unexported
the only exported field we/users care about is ProxmoxURLRaw
2019-10-15 12:56:42 +02:00
Adrien Delorme 40692a4e38 builder.profitbricks: remove duplicate communicator.Config field 2019-10-15 12:56:41 +02:00
Adrien Delorme 3fa614b5e1 builder.oracle.oci: make ConfigProvider unexported
so that it doesn't temper with hcl2 code generation & parsing.

The field is set only later on after further processing.
2019-10-15 12:56:41 +02:00
Adrien Delorme 17c069baa5 builder.google:
* make CustomerEncryptionKey our own type so that it can be hcl2 generated
* make Account setting unexported so that it doesn't temper with HCL2 generation ( the field is set a bit later after processing )
2019-10-15 12:56:41 +02:00
Adrien Delorme f8402f1b91 builder.azure.common: make CloudEnvironment private so it doesn't temper with hcl2 code generation
the struct is not read from file but later set after some computations
2019-10-15 12:56:41 +02:00
Adrien Delorme 221e72e9c3 builder.amazon.common: remove pointer (*) from []*string and map[*string]*string types
because they make hcl2/cty decoding panic
2019-10-15 12:56:41 +02:00
Adrien Delorme 8b8c2fc138 builder.amazon.chroot: remove specific BlockDevice definition
because the common one already has a KmsKeyId field
2019-10-15 12:56:41 +02:00
Adrien Delorme d2f5daf98f
Merge pull request #8209 from dvrkps/patch-3
Ignore retry.Config var
2019-10-15 10:29:51 +02:00
Megan Marsh f05fd3969f
Merge pull request #8212 from hashicorp/fix_8204
Fix 8204
2019-10-14 14:40:17 -07:00
Megan Marsh 2e20facc8b fix tests 2019-10-14 14:13:21 -07:00
Megan Marsh 0e70e0e5a4 fix template imports 2019-10-14 13:22:06 -07:00