Joshua Foster
63f9282f5c
fix vshere ToolsSyncTime and ToolsUpgradePolicy
2020-07-01 13:58:50 -04:00
Moss
41edd09d3c
undocument temporary_key_pair_name and ssh_private_key_file
2020-07-01 16:33:18 +02:00
Megan Marsh
af9d2e6f22
Merge pull request #9509 from hashicorp/fix_9508
...
make statement an array of strings
2020-06-30 13:15:51 -07:00
Megan Marsh
50c65847d1
Merge pull request #9497 from ad-m/hyperone-username
...
builder/hyperone: Add support for custom username in vm create
2020-06-30 10:51:25 -07:00
Megan Marsh
122e80f591
generated code
2020-06-30 10:12:50 -07:00
Megan Marsh
0122530a07
make statement an array of strings
2020-06-30 10:01:49 -07:00
Roman Tomjak
212200c88f
Proxmox NIC firewall flag ( #9487 )
...
* add test for firewall toggle
* generate hcl config
* send firewall toggle to proxmox
* update docs
* drop the pointer to bool
* use setDeviceParamIfDefined
2020-06-30 11:04:19 +02:00
Adam Dobrawy
80d49a1509
builder/hyperone: Add support for custom username in vm create
2020-06-29 03:17:38 +02:00
Adam Dobrawy
4692cdd55c
builder/hyperone: Allow skip chroot device discovery
2020-06-26 15:04:08 +02:00
Anthony Dong
2322d3ae6b
aws: retry fetching blockdevicemapping if empty
2020-06-25 10:48:24 +02:00
Wilken Rivera
85bffc40da
Merge pull request #9479 from hashicorp/fix_9475
...
only set up localhost port forwarding if skipnatmapping is false.
2020-06-24 14:11:23 -04:00
Megan Marsh
f8e21db9bc
Merge pull request #9450 from jhawk28/vsphere_multi_ip_wait
...
(vsphere) look at all IPs when waiting for the IP
2020-06-24 10:43:11 -07:00
Megan Marsh
cd5cf77998
only set up localhost port forwarding if skipnatmapping is false.
2020-06-24 10:40:42 -07:00
Wilken Rivera
38eef12b83
Merge pull request #9467 from ArseniiPetrovich/patch-1
...
Fix data disks URI
2020-06-24 11:50:58 -04:00
Wilken Rivera
8d209caf34
Fix spacing and line endings
2020-06-24 09:20:32 -04:00
Arsenii Petrovich
f3c33f9a27
remove spaces
2020-06-24 16:08:48 +03:00
mingsheng.su
8a8abdf615
update ucloud-uhost builder ( #9466 )
...
* update ucloud-uhost builder, docs and deps
Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
2020-06-24 14:31:05 +02:00
Ivo van Geel
e54ad3f1fb
Add boot_command support to vsphere-clone builder, including support … ( #9397 )
2020-06-24 11:14:30 +02:00
Arsenii Petrovich
c2f352ee6e
Update JSONs to fix tests and make them work with the latest URL changes
2020-06-24 01:35:35 +03:00
Wilken Rivera
a8dfb66d6c
docs/builder/amazon: Add WinRM unsupported note to Session Manager docs
...
Closes #9451
Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
2020-06-23 07:41:21 -04:00
Arsenii Petrovich
d7b8d50acd
Fix data disks URI
...
Fixing bug appeared in 0589f57d4d
2020-06-23 12:58:53 +03:00
Adrien Delorme
b2320ca911
HCL2: add singular run_volume_tag block to ebs & ebssurrogate builders ( #9457 )
...
close #9280
related to #8889
2020-06-23 10:49:50 +02:00
Megan Marsh
a96194081a
Merge pull request #9453 from hashicorp/fix_ssh
...
Allow users to provide a list of ciphers that they want Packer to support.
2020-06-18 11:58:53 -07:00
Wilken Rivera
aa91ef7edf
Merge pull request #9455 from hashicorp/fix_9393
...
docs/builder/google: Add note about boolean values for compute instance metadata
2020-06-18 13:05:30 -04:00
Wilken Rivera
ce6284f760
docs/builder/google: Add note about boolean values for compute instance metadata
...
Closes #9393
2020-06-18 09:50:40 -04:00
Megan Marsh
801c827058
create parent dirs of target ( #9452 )
2020-06-18 10:25:04 +02:00
Megan Marsh
4f77bb0c4a
add new ssh_ciphers option
2020-06-17 16:48:23 -07:00
Megan Marsh
e951b3731a
Merge pull request #9441 from jhawk28/vsphere_httpip_default
...
use ip_wait_address range to determine the default for the http server IP
2020-06-17 14:46:04 -07:00
Joshua Foster
50b6c86b1c
look at all the IPs of the VM when waiting for an IP
2020-06-17 17:40:21 -04:00
Joshua Foster
dd40c68ff8
fix default IP address in test to all ipv4 addresses
2020-06-17 16:00:38 -04:00
Joshua Foster
fb159e7060
add test cases for Network
2020-06-17 11:40:39 -04:00
Gennady Lipenkov
5cb2ef6e9d
Fix test
2020-06-17 17:23:52 +03:00
Gennady Lipenkov
1157f0dcfe
Add acceptance test
2020-06-17 17:06:05 +03:00
Gennady Lipenkov
77ff387e25
Terraform code to quick provision instance with assigned SA.
...
Will be used for (local) acceptance test runs.
2020-06-17 16:23:54 +03:00
Gennady Lipenkov
a6ec1fa135
Support Instance SA authentication
2020-06-17 12:41:11 +03:00
Gennady Lipenkov
744fffab5d
Rename test data dir
2020-06-17 12:28:01 +03:00
Megan Marsh
88c94cc987
Fix 8904 ( #9435 )
2020-06-17 11:04:45 +02:00
Joshua Foster
7fc2ea8422
add a fallback to an ipv4 address if the the range can't find one
2020-06-17 01:46:30 -04:00
Joshua Foster
aaf9103330
use the ip_wait_address range to determine the default for the http server IP
2020-06-17 01:36:55 -04:00
Megan Marsh
4178625afb
re-add winrm_no_proxy option. Winrm code needs to be modified in order to read no_proxy env var when client is created rather than when net/http library is instantiated.
2020-06-16 10:27:30 -07:00
Megan Marsh
004ace4340
Merge pull request #9406 from hashicorp/fix_9084
...
Add usb_driver to common boot_command and use it on vsphere
2020-06-15 15:55:54 -07:00
Calle Pettersson
0bcfefd0bc
Update Proxmox storagePoolTypes ( #9418 )
2020-06-15 14:00:32 +02:00
Moss
c1c350a657
remove comments
2020-06-12 14:51:52 +02:00
Moss
45058847c0
return BootConfig prepare err
2020-06-12 14:51:52 +02:00
Moss
653eb95bdb
adds tests to usb_driver and step_http_ip_discover
2020-06-12 14:51:52 +02:00
Moss
65cfb880fd
Fix boot_command and update docs
2020-06-12 14:51:52 +02:00
Moss
ba767d1663
remove duplicated press
2020-06-12 14:51:52 +02:00
Moss
585a86fe03
Add usb_driver to common boot_command and use it on vsphere
2020-06-12 14:51:52 +02:00
Charlie Kenney
70a2c7d364
upgrade linodego to v0.14.0 ( #9395 )
...
* upgrade linodego to v0.14.0
* fix builder/linode linter errors
* Update go.mod
Co-authored-by: Adrien Delorme <adrien.delorme@icloud.com>
2020-06-12 11:36:54 +02:00
Conlan
4afcc794be
Fix typo in VSphere Docs ( #9405 )
...
* Fix typo in VSphere Docs
* Update ConfigParamsConfig-not-required.mdx
Co-authored-by: Adrien Delorme <adrien.delorme@icloud.com>
2020-06-12 11:18:51 +02:00
Joshua Foster
e59fab952d
create the folders if they don't exist
2020-06-11 10:37:24 -04:00
Megan Marsh
8aeaf28bf3
Merge pull request #9380 from hashicorp/azr-docs-remove-duplicate-guest-additions-mode-docfield
...
docs: virtualbox/iso: remove duplicate guest_additions_mode field ( it's already defined in `GuestAdditionsConfig` )
2020-06-10 11:08:17 -07:00
Megan Marsh
dc14e6a1e2
Merge pull request #9390 from jhawk28/bug_8766
...
use datacenter inventory path for find folder
2020-06-10 10:52:17 -07:00
Megan Marsh
3a13eafa61
Merge pull request #9387 from arizvisa/GH-9382
...
Fixed a race in the ReadNetworkingConfig implementation from the vmware builders
2020-06-10 09:53:16 -07:00
Svetlin
49bf9c9d37
[gcp] Fixup for the deprecated Secure Boot guest OS feature ( #9371 )
...
GCP informed us that the GuestOsFeature SECURE_BOOT is deprecated and
that they are using UEFI_COMPATIBLE instead. This means, using an image
with 'UEFI_COMPATIBLE' guest OS feature confirms the 'secureBoot'
feature compatibility.
2020-06-10 16:21:11 +02:00
Joshua Foster
f5a795a22e
use path.Join to make a cleaner path
2020-06-10 09:12:21 -04:00
Joshua Foster
c7a6315ca4
use datacenter inventory path for find folder
2020-06-10 08:24:23 -04:00
Ali Rizvi-Santiago
3da5a64a8d
Fixed a race in the ReadNetworkingConfig implementation from the parsers belonging to the vmware builders that existed between reading the version and consuming tokens from the rest of the file.
2020-06-09 19:37:38 -05:00
Adrien Delorme
63896b98ec
docs: virtualbox/iso: remove duplicate guest_additions_mode field ( it's already defined in `GuestAdditionsConfig` )
2020-06-09 15:12:13 +02:00
Megan Marsh
5d67183c4c
fix test
2020-06-05 14:05:59 -07:00
Megan Marsh
48b448dfd5
Merge pull request #9366 from hashicorp/fix_9248
...
Add ToolSyncTime and ToolUpgradePolicy to vSphere
2020-06-05 13:03:58 -07:00
Megan Marsh
7fcd702b45
Merge pull request #9358 from jhawk28/bug_9349
...
(vsphere-iso) add the ability to check if the IP is within the an IP range
2020-06-05 12:18:51 -07:00
Megan Marsh
093cfcfd9f
Merge pull request #9322 from arizvisa/GH-8528
...
Fix the VMware builders when the guest platform's dhcpcd switches the ip address in-between a build
2020-06-05 10:58:00 -07:00
Ali Rizvi-Santiago
8985ba077c
Re-added the (mistakenly removed) host override to the CommHost for the vmware builders.
2020-06-05 12:39:20 -05:00
Megan Marsh
4cd3429914
add ssh override test
2020-06-05 10:15:11 -07:00
Moss
112638da01
Add ToolSyncTime and ToolUpgradePolicy to vSphere
2020-06-05 17:20:44 +02:00
Sylvia Moss
1422085ede
Validate host and network when looking for network ( #9361 )
2020-06-05 11:01:58 +02:00
Joshua Foster
d87e53b841
return false instead of continue to match logic from govmomi
2020-06-05 00:09:57 -04:00
Joshua Foster
3a6d42e0df
ip check should continue if the ip is NOT in the range
2020-06-04 23:17:02 -04:00
Joshua Foster
90463e5394
make default for wait address to be any ipv4 address. add some better documentation
2020-06-04 23:13:46 -04:00
Ali Rizvi-Santiago
9c5a65263f
Added @SwampDragons' suggestion to the `CommHost()` implementation for the vmware builders which uses the communicator config's `Config.Port()` function to determine the communication port-number independent of the configured protocol.
2020-06-04 19:04:12 -05:00
Megan Marsh
baed65156c
Merge pull request #9319 from arizvisa/GH-8528.refactor
...
This refactors the dhcpd lease parser in the vmware builders and adds unit tests for everything.
2020-06-04 12:18:49 -07:00
Joshua Foster
27a1ceef6d
add example for any ipv4 address
2020-06-04 12:15:53 -04:00
Sylvia Moss
aa52e690ee
Update go-getter and add samba shared files tests to step_download ( #8954 )
2020-06-04 15:00:18 +02:00
Ali Rizvi-Santiago
898321bcfe
Added suggestions from @SwampDragons to the parsers from the vmware builders, included unit-tests and sample file for fusion's networking file, and fixed a few situations where the channel wasn't being closed.
2020-06-04 05:07:18 -05:00
Joshua Foster
1fb22a7b7b
add the ability to check if the IP is within the an IP range
2020-06-04 01:55:25 -04:00
Joshua Foster
d35f342319
add the ability to configure the http bind address. defaults to 0.0.0.0.
2020-06-03 16:40:18 -07:00
Megan Marsh
02590f6c44
Merge pull request #9329 from hashicorp/je.website-maintenance-5-29-20
...
🌷 Website Spring Maintenance
2020-06-03 16:25:23 -07:00
Megan Marsh
f520ced2a8
Merge pull request #9356 from GennadySpb/remove-platform-validation-for-instances-with-gpu
...
Do not require 'gpu-standard-v1' platform_id for any GPU-based config.
2020-06-03 14:52:36 -07:00
Paul Meyer
e260212be3
Merge pull request #9323 [azure-chroot] copy data disks between shared image galleries
...
[azure-chroot] copy data disks between shared image galleries
2020-06-03 12:32:19 -07:00
Gennady Lipenkov
542819c464
Remove test
2020-06-03 21:17:12 +03:00
Gennady Lipenkov
df371b7e25
Do not require 'gpu-standard-v1' platform_id for any GPU-based config.
...
Support use another kind of GPU platforms.
2020-06-03 20:58:39 +03:00
Sylvia Moss
434c9bcae0
Check if task result is nil and return error ( #9354 )
2020-06-03 17:37:30 +02:00
Megan Marsh
df37918467
Merge pull request #9303 from arizvisa/GH-8528.unit-tests
...
Unit tests for the driver_parser.go functionality of the vmware builder
2020-06-02 15:28:13 -07:00
Jeff Escalante
f4d7b5f493
fix some stuff
2020-06-02 17:22:40 -04:00
Wei Cheng
e0cfb404fb
builder/googlecompute: add support to specify storage location for GCP images ( #9326 )
...
* feat: add support to specify storage location for GCP images
Signed-off-by: Wei Cheng <calvinpohwc@gmail.com>
2020-06-02 13:42:33 -04:00
Megan Marsh
e851757e5f
Merge pull request #9342 from jhawk28/bug_9328
...
(vsphere-iso) use the Datacenter's VmFolder
2020-06-02 10:24:48 -07:00
Sylvia Moss
ce45a1990a
Refactor communicator config for Qemu and add SkipNatMapping option ( #9307 )
2020-06-02 11:56:36 +02:00
Joshua Foster
30bff17799
use the Datacenter's VmFolder instead of hand generating it
2020-06-01 19:53:54 -04:00
RedTail72
374f82b978
buidler/vsphere-iso: ISOUrl Fix ( #9321 )
...
* ISOUrl Fix
Added the check for ISOUrls back in addition to a check for RawSingleISOUrl. This should allow both ISOUrls[] or ISOUrl to work while not requiring them all the time.
* Update config.go
Fixed formatting.
2020-06-01 15:27:26 -04:00
Ali Rizvi-Santiago
e5b6d8c37c
Didn't know that WinRM uses a different variable for the port number when trying to determine the communication host in `CommHost`...now it's fixed.
2020-05-30 02:17:21 -05:00
Megan Marsh
5efb1a195e
update docs for configuration_paramaters to explain what it actually is.
2020-05-29 15:07:34 -07:00
Jeff Escalante
9a38fbe2c7
patch source for a couple code block changes
2020-05-29 17:22:16 -04:00
Megan Marsh
184dc6cc44
Merge pull request #9260 from hashicorp/fix_9256
...
make package_include match output_vagrantfile parsing and abspath cal…
2020-05-29 10:41:26 -07:00
Megan Marsh
8a9833f5b1
Merge pull request #9287 from rgl/feature-qemu-add-timeout-wait-for-ip-address
...
builder/qemu: timeout waiting for the guest to become available in the network bridge
2020-05-29 09:47:06 -07:00
Paul Meyer
2288ab3b53
fix typo
2020-05-29 04:15:53 +00:00
Feiyu Shi
1c1991c073
fix a bug
2020-05-28 19:17:22 -07:00
Feiyu Shi
f86f5b958a
Merge remote-tracking branch 'origin/master' into identity
2020-05-28 19:03:44 -07:00
Megan Marsh
03b2c4355e
include Wilken's suggestion
2020-05-28 16:46:33 -07:00
Paul Meyer
53e5137411
[bug] Fix test error message
2020-05-28 23:38:17 +00:00
Paul Meyer
83851bc9aa
[bug] fix diskset type in Artifact creation
2020-05-28 23:38:17 +00:00
Paul Meyer
aa8250bcc8
give temp data disks lun suffix
2020-05-28 23:38:17 +00:00
Paul Meyer
4c96847683
log data disks in images
2020-05-28 23:38:17 +00:00
Paul Meyer
f0cd60b5fa
[bug] provide data disk prefix to disk creation
2020-05-28 23:38:17 +00:00
Paul Meyer
af96cf7881
Generated files
2020-05-28 23:38:14 +00:00
Paul Meyer
ac3d19ee23
Use separate caching/sku for data disks
2020-05-28 23:37:44 +00:00
Paul Meyer
f601f54d0b
Use all disks in managed image
2020-05-28 23:37:43 +00:00
Paul Meyer
de4839b66e
Use all snapshots when creating a shared image
2020-05-28 23:37:43 +00:00
Paul Meyer
c6b995a34d
create snapshots for all disks in a diskset
2020-05-28 23:37:43 +00:00
Paul Meyer
0ee77f8b0e
Add datadisks to disk set when using SIG as source
2020-05-28 23:37:43 +00:00
Paul Meyer
12f746b2b5
Move to using a diskset
...
Need to store lun numbers for data disks as well
2020-05-28 23:37:43 +00:00
Paul Meyer
3a3e6e525b
Shift names to diskset
...
Instead of one disk, we'll be working with a set of disks.
2020-05-28 23:37:43 +00:00
Paul Meyer
c9284d03aa
Add config for data disk/snapshot naming
2020-05-28 23:37:38 +00:00
Ali Rizvi-Santiago
229b5d17ff
Re-worked the vmware builder drivers so that they're able to check multiple ip addresses when trying to connect via the CommHost.
2020-05-28 15:36:45 -05:00
Ali Rizvi-Santiago
0609909f1a
Fixed some lint issues.
2020-05-28 13:53:49 -05:00
Ali Rizvi-Santiago
ad7194c920
Rewrote the GuestIP implementation in the vmware builder to use the new dhcpd lease parsers instead of the old regexp-based logic.
2020-05-28 13:22:58 -05:00
Ali Rizvi-Santiago
020b005522
Finished implementing the final dhcpd lease entries parser for the vmware builders and also included its own unit tests.
2020-05-28 13:22:58 -05:00
Ali Rizvi-Santiago
cf5332fa20
Updated the dhcpd lease entry parser in the vmware builder to return errors if any are encountered.
2020-05-28 13:22:58 -05:00
Ali Rizvi-Santiago
afa4696985
Tightened the regular expressions used by the vmware builder to parse the dhcpd leases, and added support for parsing the weekdays.
2020-05-28 13:22:58 -05:00
Ali Rizvi-Santiago
e2a7c317eb
Implemented the dhcpd lease entry decoder and the address decoder for the vmware builder.
2020-05-28 13:22:57 -05:00
Ali Rizvi-Santiago
efb775accb
Added a number of parsing combinators to the vmware builder and some minor tests for them to help with parsing dhcpd leases.
2020-05-28 13:22:57 -05:00
Ali Rizvi-Santiago
f17007d546
Removed the sentinelSignaller chan from the vmware builder parsers and its unit-tests, and also commented all of the goroutines that are used.
2020-05-28 13:22:56 -05:00
Ali Rizvi-Santiago
159ea595df
More lint issues fixed...
2020-05-28 13:12:42 -05:00
Ali Rizvi-Santiago
32b64e0576
Fixed some lint issues in the unit tests for the vmware builder driver parsers.
2020-05-28 13:07:54 -05:00
Adrien Delorme
40947c2bf6
HCL2: generate hcl tags with go-cty tags too ( #9306 )
...
This will allow to generate the config files:
```go
package main
import (
"fmt"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/hashicorp/packer/builder/alicloud/ecs"
)
func main() {
name := "name"
app := ecs.FlatConfig{
AlicloudImageName: &name,
ECSSystemDiskMapping: &ecs.FlatAlicloudDiskDevice{
DiskName: &name,
},
}
f := hclwrite.NewEmptyFile()
block := gohcl.EncodeAsBlock(&app, `source "something" "something"`)
f.Body().AppendBlock(block)
fmt.Printf("%s", f.Bytes())
}
```
Will output:
```
source "something" "something" {
packer_user_variables = null
packer_sensitive_variables = null
image_name = "name"
image_share_account = null
image_unshare_account = null
image_copy_regions = null
image_copy_names = null
tags = null
tag = null
system_disk_mapping = { disk_category = null, disk_delete_with_instance = null, disk_descri
ption = null, disk_device = null, disk_encrypted = null, disk_name = "name", disk_size = null, disk_
snapshot_id = null }
image_disk_mappings = null
ssh_remote_tunnels = null
ssh_local_tunnels = null
ssh_public_key = null
ssh_private_key = null
}
```
This is a good first step for #9015 and #9282
fix #9304
2020-05-28 11:19:00 +02:00
Adrien Delorme
0fa60c68fb
Drop the iso_checksum_type & iso_checksum_url fields ( #8437 )
...
* Drop the iso_checksum_type & iso_checksum_url fields
In favor of simply using iso_checksum that will know what to do.
* fix after master merge
* Update builder_test.go
* Update builder_test.go
* Update builder_test.go
* Update builder_test.go
* Update builder_test.go
* remove checksum lowercasing tests
* Update builder_test.go
* Update builder_test.go
* better docs
* Update builder_test.go
* even better docs
* Update config.go
* Update builder_test.go
* Update step_create_vmx_test.go
* make generate
* better docs
* fix imports
* up tests
* Update _ISOConfig-required.html.md
* Update builder_test.go
* don't use sha1.Sum("none") as a caching path
* Update builder_test.go
* better docs
* Update iso_config_test.go
remove ISOChecksumType/ISOChecksumURL references
* Update step_download_test.go
* add iso_checksum_url and iso_checksum_type fixers + tests
* add concrete examples of checksum values
* add examples of checksumming from local file
* update go-getter dep
* up deps
* use new go-getter version
* up ESX5Driver.VerifyChecksum: use go-getter's checksumming
* ISOConfig.Prepare: get checksum there in case we need it as a string in ESX5Driver.VerifyChecksum
* Update iso_config.go
* get go-getter from v2 branch
* Update driver_esx5.go
add more comments
* Update driver_esx5.go
* show better error message when the checksum is invalid
* Update builder_test.go
put in a valid checksum to fix tests, checksum is md5("packer")
* Update builder_test.go
test invalid and valid checksum
* more test updating
* fix default md5 string to be a valid md5
* TestChecksumFileNameMixedCaseBug: use 'file:' prefix for file checksumming
* Update iso_config_test.go
* Update iso_config_test.go
* Update builder_test.go
* Update builder_test.go
* Update builder_test.go
* Update CHANGELOG.md
* Update CHANGELOG.md
* Update go.mod
* Update go.mod
* Update CHANGELOG.md
2020-05-28 11:02:09 +02:00
Joshua Foster
828440d852
rebase and run generate
2020-05-27 15:05:23 -07:00
Joshua Foster
43714049e8
add set_host_for_datastore_uploads flag
2020-05-27 15:00:08 -07:00
Joshua Foster
9895f90451
dont set the host for the datastore upload
2020-05-27 15:00:08 -07:00
Ali Rizvi-Santiago
2a8bc45bc4
Added unit-tests for the netmap parsing components in the vmware builder.
2020-05-26 23:03:30 -05:00
Ali Rizvi-Santiago
7c1ad4adcf
Added unit-tests for the dhcpd configuration components in the vmware builder, and fixed a few discovered race conditions.
2020-05-26 22:59:35 -05:00
Feiyu Shi
fdb0b2ab03
Revert "validate if user assigned identity exists"
...
This reverts commit 9bd19df040
.
2020-05-26 17:17:48 -07:00
Feiyu Shi
c016f3752a
upgrade SIG source api-version to match identity api-version to avoid potential setback for identity
2020-05-26 16:08:00 -07:00
Megan Marsh
01839e272e
Merge pull request #9277 from nitrocode/add-source-ami-creation-date
...
Added SourceAMICreationDate
2020-05-26 12:24:47 -07:00
nitrocode
6d29ec956b
Added SourceAMICreationDate
2020-05-26 15:04:03 -04:00
Rui Lopes
4839b9189d
builder/qemu: timeout waiting for the guest to become available in the network bridge
2020-05-26 07:46:06 +01:00
Feiyu Shi
3fdab998f8
check error
2020-05-25 12:33:33 -07:00
Megan Marsh
5dfd2a763e
send logs about floppy failure directly to UI not just logs ( #9272 )
2020-05-25 12:02:29 +02:00
Feiyu Shi
9bd19df040
validate if user assigned identity exists
2020-05-24 19:05:46 -07:00
Feiyu Shi
b334458b91
use empty struct for UserAssignedIdentities map value; omitempty
2020-05-24 19:05:45 -07:00
Feiyu Shi
c5e2eff847
change to []*Resource
2020-05-24 19:05:45 -07:00
Feiyu Shi
3e3fdaa24e
make generate
2020-05-24 19:05:45 -07:00
Feiyu Shi
76a7ab25e2
add SetIdentity test
2020-05-24 19:05:45 -07:00
Feiyu Shi
764f99ec7b
add correct api-version
2020-05-24 19:05:45 -07:00
Feiyu Shi
f7f033a7fd
add config validation test
2020-05-24 19:05:45 -07:00
Feiyu Shi
10b0a4548f
add identity resource id validation
2020-05-24 19:05:45 -07:00
Feiyu Shi
7c1a62dfed
set identity field in the template
2020-05-24 19:05:45 -07:00
Feiyu Shi
d9c9bfbae8
add identity field to the template
2020-05-24 19:05:45 -07:00
Feiyu Shi
b5b2982772
add user_assigned_managed_identities to the config
2020-05-24 19:05:45 -07:00
Megan Marsh
082d806b1f
fix httpip acquisition
2020-05-21 09:39:54 -07:00
Rui Lopes
06fad6cc4f
qemu: add support for using a network bridge
2020-05-20 16:46:32 -07:00
Megan Marsh
266bba279b
linting
2020-05-19 16:45:14 -07:00
Megan Marsh
aadd95497a
fix tests
2020-05-19 16:39:17 -07:00
Megan Marsh
a892d13d56
make package_include match output_vagrantfile parsing and abspath calculation
2020-05-19 16:32:54 -07:00
Megan Marsh
58b32ebefa
Merge pull request #9251 from hashicorp/fix_9249
...
builder/azure-arm: Update runtime constants with a valid DataDiskName
2020-05-19 11:00:44 -07:00
jhawk28
820f353573
(vsphere-iso) remove deprecated network and disk fields ( #9149 )
...
* remove deprecated network and disk fields
2020-05-19 10:06:12 -04:00
Sylvia Moss
1c30a71d09
Replace file shared state by statebag ( #9238 )
2020-05-19 11:49:48 +02:00
Wilken Rivera
c954831bb2
builder/azure-arm: Update runtime constants with a valid DataDiskName
...
This change fixes an issue where using the `disk_additional_size` configuration option would cause builds to fail.
Build results before the change
```
==> Builds finished but no artifacts were created.
Build 'azure-arm' errored: Code="DeploymentFailed" Message="At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details." Details=[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code
\": \"InvalidParameter\",\r\n \"message\": \"The entity name 'dataDisk.name' is invalid according to its validation rule: ^[^_\\\\W][\\\\w-._]{0,79}(?\u003c![-.])$.\",\r\n \"target\": \"dataDisk.name\"\r\n }\r\n}"}]
```
Build results after change
```
Build 'azure-arm' finished.
==> Builds finished. The artifacts of successful builds are:
--> azure-arm: Azure.ResourceManagement.VMImage:
OSType: Linux
ManagedImageResourceGroupName: test-pkr
ManagedImageName: wilkenPacker9249
```
Closes #9249
2020-05-18 14:57:20 -04:00
Wilken Rivera
f31f5bc61b
docs/builder/azure-arm: Fix a small typo for the custom_managed_image_* config options
...
Closes #9199
2020-05-14 13:31:40 -04:00
Evan Digby
e4eaff6bba
s/Directoty/Directory ( #9221 )
2020-05-14 15:00:27 +02:00
Megan Marsh
0d900fd007
Merge pull request #9198 from hashicorp/fix_9190
...
don't error if metadata can't be set. Old versions of openstack don't…
2020-05-13 14:45:18 -07:00
Megan Marsh
a17ef01ea9
Merge pull request #9212 from andrewsomething/asb/do-image-id
...
builder/digitalocean: Use correct image type for Droplet creates.
2020-05-13 14:43:13 -07:00
Megan Marsh
37d953881f
Merge pull request #9219 from hashicorp/azr_autodoc_alicloud_pp
...
alicloud: better docs + autogenerated post processor docs
2020-05-13 14:41:44 -07:00
Andrew Starr-Bochicchio
84f0079c3a
Move to a new func to make testable.
2020-05-13 13:29:22 -04:00
Andrew Starr-Bochicchio
a1f334daff
Use constant and move check to template generator.
2020-05-13 13:28:44 -04:00
Andrew Starr-Bochicchio
bf0ab6b722
Force test to be skipped unless PACKER_ACC set.
2020-05-13 11:48:49 -04:00
Wilken Rivera
b5639d4697
tests/builder/amazon: Enhance the test coverage for SSM Tunnel related steps ( #9213 )
...
* test/builder/amazon: Update mocks to properly test SSM tunnel and driver code base
* Update mod files
2020-05-13 10:10:55 -04:00
Adrien Delorme
a50c27c05d
single `
2020-05-13 15:51:18 +02:00
Adrien Delorme
c2d3e494b6
alicloud: better docs + autogenerated post processor docs
2020-05-13 15:49:34 +02:00
Megan Marsh
fe472f45ae
don't put error in state, or we'll fail.
2020-05-12 16:51:40 -07:00
Megan Marsh
807a09a770
don't error if metadata can't be set. Old versions of openstack don't seem to play nicely with this API call
2020-05-12 16:51:40 -07:00
Wilken Rivera
6f5f6bf999
builder/amazon Fix invalid pointer issue for non SSMAgengtEnabled builds
...
Tests before change
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1392ca2]
goroutine 299 [running]:
github.com/hashicorp/packer/builder/amazon/common.(*StepCreateSSMTunnel).Cleanup(0xc0003dc460, 0x4d1a4c0, 0xc0006e9800)
/home/wilken/Development/packer/builder/amazon/common/step_create_ssm_tunnel.go:95 +0xf2
github.com/hashicorp/packer/helper/multistep.(*BasicRunner).Run(0xc0006e98f0, 0x4d408c0, 0xc00065fcc0, 0x4d1a4c0, 0xc0006e9800)
/home/wilken/Development/packer/helper/multistep/basic_runner.go:79 +0x2c6
github.com/hashicorp/packer/builder/amazon/ebs.(*Builder).Run(0xc000726800, 0x4d408c0, 0xc00065fcc0, 0x4d5e300, 0xc0006e8d80, 0x4cc7220, 0xc000434120, 0x0, 0x0, 0x0, ...)
/home/wilken/Development/packer/builder/amazon/ebs/builder.go:330 +0x17e2
github.com/hashicorp/packer/packer.(*CoreBuild).Run(0xc000720500, 0x4d408c0, 0xc00065fcc0, 0x4d5e180, 0xc0006fe510, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/wilken/Development/packer/packer/build.go:287 +0x7ef
github.com/hashicorp/packer/command.(*BuildCommand).RunContext.func1(0xc0004d14d0, 0xc0003dc3c0, 0xc000441500, 0xa, 0x4d5e1e0, 0xc000720500, 0x4d408c0, 0xc00065fcc0, 0x4d5e180, 0xc0006fe510, ...)
/home/wilken/Development/packer/command/build.go:290 +0x189
created by github.com/hashicorp/packer/command.(*BuildCommand).RunContext
/home/wilken/Development/packer/command/build.go:284 +0xd5a
FAIL github.com/hashicorp/packer/provisioner/shell 188.335s
FAIL
```
Test After change
```
--- PASS: TestShellProvisioner (212.39s)
--- PASS: TestShellProvisioner/testing_amazon-ebs_builder_against_shell_provisioner (212.39s)
PASS
```
2020-05-12 14:49:57 -04:00
Andrew Starr-Bochicchio
05d56034dd
builder/digitalocean: Add acceptance test for creating Droplet using image ID.
2020-05-12 14:15:35 -04:00
Andrew Starr-Bochicchio
374a29d75c
builder/digitalocean: Add logging of Droplet create attributes.
2020-05-12 12:38:51 -04:00
Andrew Starr-Bochicchio
80b4e0425e
builder/digitalocean: Use correct type for image for Droplet creates.
2020-05-12 11:46:58 -04:00
Andrew Starr-Bochicchio
e8783873d0
builder/digitalocean: Fix failing acceptance test.
2020-05-12 11:37:07 -04:00
Adrien Delorme
4ebcbad332
update consul and vault dependencies ( #9205 )
...
* update consul and vault dependencies
* update triton sign call accorting to https://github.com/joyent/triton-go/pull/135
* Delete readme.md
* put back github.com/mitchellh/reflectwalk to v1.0.0 and explain why
* fix/fixer_pp_docker_tag_tags.go: simplify deduplication loop and keep seen/stable order
2020-05-11 15:26:01 -04:00
Megan Marsh
480c938162
generate virtualbox-vm docs instead of letting them be copy pasted
2020-05-08 15:58:36 -07:00
Megan Marsh
4ef34f7fba
fix iso config prepare
2020-05-08 14:11:51 -07:00
Megan Marsh
9476aa03de
Merge pull request #9105 from hashicorp/google_iap
...
Implement iap proxy for googlecompute
2020-05-08 12:40:42 -07:00
Megan Marsh
fcef10fd2f
Merge pull request #9082 from hashicorp/f-amazon_builder-ssm-session-tunnel-poc
...
builder/amazon: Add SSM Session Manager as a SSH interface connection
2020-05-08 12:40:03 -07:00
Megan Marsh
a55b73473a
fix logic
2020-05-08 10:24:28 -07:00
Megan Marsh
dde162622d
use local port in listener config, when set
2020-05-08 10:20:47 -07:00
Megan Marsh
81e043f2b0
fix windows tests
2020-05-08 10:13:43 -07:00
Megan Marsh
60600e6cf6
make windows work with account files containing spaces
2020-05-08 10:13:43 -07:00
Megan Marsh
dae60799bc
fix tests
2020-05-08 10:13:43 -07:00
Megan Marsh
fda55fe928
deduplicate excess code
2020-05-08 10:13:43 -07:00
Megan Marsh
54b33ad8d1
fix tests
2020-05-08 10:13:43 -07:00
Megan Marsh
850303b8b8
get gcloud integration working on Windows
2020-05-08 10:13:43 -07:00
Megan Marsh
c578afc62c
working on windows
2020-05-08 10:13:43 -07:00
Megan Marsh
32752d4577
fix linting and tests
2020-05-08 10:13:43 -07:00
Megan Marsh
b5744efb42
add config prepare tests
2020-05-08 10:13:43 -07:00
Megan Marsh
f583674cd6
linding
2020-05-08 10:13:43 -07:00
Megan Marsh
4fc92d7858
add tests
2020-05-08 10:13:42 -07:00
Megan Marsh
937a4859d4
Make retries a bit smarter, clean up language to be gentler, and give up on parsing stdout for tunnel launch
2020-05-08 10:13:42 -07:00
Megan Marsh
3e1ddad0c7
fix behavior when not using IAP, try to use more sophisticated streaming than buffer.String()
2020-05-08 10:13:42 -07:00
Megan Marsh
9353635b43
send sigint instead of sigkill; we can at least ask the tunnel nicely to shut down.
2020-05-08 10:13:42 -07:00
Megan Marsh
f67a8ab431
revert unneeded changes to driver roles
2020-05-08 10:13:42 -07:00
Megan Marsh
80ecd2013d
basic untested implementation for Windows. May leave zombie processes lying around
2020-05-08 10:13:42 -07:00
Megan Marsh
3cd28e98a7
linting
2020-05-08 10:13:42 -07:00
Megan Marsh
365eb09842
import context
2020-05-08 10:13:42 -07:00
Megan Marsh
eb05f6ff88
fix windows
2020-05-08 10:13:42 -07:00
Megan Marsh
d713f7ec64
add conditional building becasue windows support is still forthcoming
2020-05-08 10:13:42 -07:00
Megan Marsh
e6073bcec7
implement iap proxy for googlecompute. ssh-only so far
2020-05-08 10:13:42 -07:00
Ryo Tagami
fdc73376ba
floppy_label Parameter for vsphere-iso Builder ( #9187 )
...
Add ability to specify `floppy_label` parameter for `vsphere-iso`
builder, which would be especially beneficial when someone wants to pass
information to cloud-init via floppy disk images.
Signed-off-by: Ryo Tagami <rtagami@airstrip.jp>
2020-05-08 16:13:54 +02:00
Markus Liljedahl
d807e81adb
Changed default disk size for when using googlecompute to match minimum disk sice to the google api. Closes https://github.com/hashicorp/packer/issues/9023 ( #9071 )
2020-05-08 15:55:38 +02:00
Wilken Rivera
89fb7bb080
Apply suggestions from code review
...
Co-authored-by: Megan Marsh <megan@hashicorp.com>
2020-05-08 09:36:43 -04:00
Wilken Rivera
056f1f6e76
docs/amazon/builder: Add not about using a temporary_iam_instance_profile_policy_document
2020-05-08 09:32:54 -04:00
Wilken Rivera
bf1da57a05
Update address to localhost to be consistent with other proxies
2020-05-08 09:32:54 -04:00
Wilken Rivera
7cea7466ba
buider/amazon: Add `session_manager_port` option for setting a custom local port
2020-05-08 09:32:54 -04:00
Wilken Rivera
0d13c634b7
Update logging constructs for Session Manger driver
2020-05-08 09:32:49 -04:00
Wilken Rivera
81c40b8d08
Add section to docs about the session-manager-plugin tunnel
2020-05-08 09:32:49 -04:00
Wilken Rivera
5f68303504
Remove no longer needed port check
...
The communicator code base will default to the correct port settings for
valid communicators and fail the build for non valid communicators.
2020-05-08 09:32:49 -04:00
Wilken Rivera
3ae7ab994b
step_create_ssm_tunnel: Add port availability check for LocalPortNumber
2020-05-08 09:32:49 -04:00
Wilken Rivera
08dc2cb847
Remove call to unstubbed session start
2020-05-08 09:32:49 -04:00
Wilken Rivera
f498866c3a
Update validation for session_manager connectivity
...
Validation will now check that either a IamInstanceProfile or a TemporaryIamInstanceProfilePolicyDocument is set
2020-05-08 09:32:49 -04:00
Wilken Rivera
2f09b74587
amazon/builder: Move port validation for security group into RunConfig.Prepare
2020-05-08 09:32:48 -04:00
Wilken Rivera
3f6b28b70c
Add SSMTunnel step to other amazon builders, minus chroot
2020-05-08 09:32:48 -04:00
Wilken Rivera
743df19af2
Add tests for driver and ssm tunnel step
2020-05-08 09:32:48 -04:00
Wilken Rivera
e53d6aea66
amazon/ssm_driver: Update to support command context
...
* Defer the release of the found port to prevent possible Packer build collisions.
2020-05-08 09:32:48 -04:00
Wilken Rivera
5e14089851
tests/builder/amazon: Add basic testing for session_manager
...
* Add a test to ensure the proper host is returned when using session_manager
* Add a basic driver test for the validating that the SSMDriver will fail if the plugin is not in the path.
2020-05-08 09:32:48 -04:00
Wilken Rivera
60e0ba7e68
Update iam instance profile name
2020-05-08 09:32:48 -04:00
Wilken Rivera
d5a0262d6c
builder/amazon/instance: Add session manager support
2020-05-08 09:32:48 -04:00
Wilken Rivera
e515aefee3
Add validation checks for session_manager
...
* Session manager connectivity only supported via SSH
* Session manager requires the use of an iam instance profile with system manager permissions
2020-05-08 09:32:48 -04:00
Wilken Rivera
c1d2477d18
builder/amzon: Update port configuration for WinRM
...
Connectivity for WinRM works for the initial connection, but fails to upload any provisioning scripts - need to dive in deeper.
For now connectivity over SSH works as expected.
2020-05-08 09:32:48 -04:00
Wilken Rivera
fbffbd1899
docs/builder/amazon: Add short blurb for connecting via the AWS session_manager interface
2020-05-08 09:32:48 -04:00
Wilken Rivera
520061dee6
builder/amazon: Update Session Manger connectivity
...
* Update security group creation step skip ingress rules if using session manager
* Update create ssm tunnel step to dynamically set a session port
* Add SSHPort function to common to return session-manager tunnel port
* Update SSHHost to return proper host for session-manager
2020-05-08 09:32:48 -04:00
Wilken Rivera
3dd46eb5f4
Add PoC of connectivity using session-manager-plugin
...
* Add a bunch of hard coded values for testing on port 8081; ssh configs
are set to localhost and 8081
* Add a base drive for communicating with the session manager plugin
* Update step for creating tunnel to actually create SSM session tunnel via driver
2020-05-08 09:32:48 -04:00
Wilken Rivera
16604373ac
initial ssm tunnel changes - not working
2020-05-08 09:32:48 -04:00
Ryan Hartje
b86efe7604
Vbox Checksum Bugfix ( #9101 )
...
* attempting to repro github issue 9049
* update vbox ovf configtest to table test for mixedcase bug
2020-05-07 19:08:52 -04:00
Megan Marsh
26d05abd4f
Merge pull request #9182 from hashicorp/fix_9131
...
support pushing multiple tags
2020-05-07 12:09:19 -07:00
Adrien Delorme
62556c464c
Update builder/docker/artifact_import.go
2020-05-07 11:39:09 +02:00
Megan Marsh
02c1cf5b28
support pushing multiple tags
2020-05-06 16:39:41 -07:00
Megan Marsh
49af617be3
Merge pull request #9179 from hashicorp/fix_9177
...
fix docs for video_ram to use correct units
2020-05-06 09:53:40 -07:00
Megan Marsh
279fbb45ab
Merge pull request #9174 from hashicorp/do_9145
...
output_filename virtualbox option.
2020-05-06 09:40:33 -07:00
Megan Marsh
9baf2edd94
fix docs for video_ram to use correct units
2020-05-06 09:39:41 -07:00
Megan Marsh
5b4de6b16f
fix tests
2020-05-06 09:27:20 -07:00
Megan Marsh
aa09c52059
generated docs
2020-05-06 09:23:15 -07:00
Megan Marsh
2e2374b6be
add tests
2020-05-05 18:52:31 -07:00
Megan Marsh
f0d2680426
remove spot_price_auto_product from docs ( #9173 )
2020-05-05 20:48:27 -04:00
Megan Marsh
73eda08540
allow user defined output filename
2020-05-05 16:09:05 -07:00
Megan Marsh
6a682aca2e
Merge pull request #9124 from GennadySpb/yandex-export-post-processor
...
[WIP] Yandex export post processor
2020-05-05 11:01:13 -07:00
Megan Marsh
7e0cfd8b77
add undocumented tag to struct-markdown generator so that we can leave internal-use-only fields out of docs
2020-05-01 10:31:38 -07:00
Megan Marsh
3f8ee2b426
add exported files to VSphere artifact ( #9020 )
...
* add exported files to VSphere artifact
* clean up grammar for vsphere template docs
* add to vsphere clone
2020-04-30 15:22:57 -04:00
Rui Lopes
86ac132056
hyperv: add support for setting the boot order ( #9046 )
2020-04-30 13:31:41 +02:00
Wilken Rivera
86ab71f56e
test/azure/arm: Add regression test case for ssh_username overrides ( #9136 )
...
This test is for the regression fixed in #9103
Before fix
```
⇶ go test ./builder/azure/arm/... -run=TestConfigUserNameOverride
--- FAIL: TestConfigUserNameOverride (0.42s)
config_test.go:75: Expected 'c.Comm.SSHPassword' to be set to generated password, but found ""!
config_test.go💯 Expected 'UserName' to be set to 'override_winrm_username', but found "packer"!
FAIL
FAIL github.com/hashicorp/packer/builder/azure/arm 0.425s
FAIL
```
After fix
```
⇶ go test ./builder/azure/arm/... -run=TestConfigUserNameOverride
ok github.com/hashicorp/packer/builder/azure/arm 0.379s
```
* Fix variable names in error messages
2020-04-30 10:49:58 +02:00
Megan Marsh
30061b3def
Merge pull request #9095 from VladRassokhin/vsphere-disable-shutdown
...
Add disable_shutdown option to VSphere builders
2020-04-29 15:18:24 -07:00
Megan Marsh
2a560a517e
Merge pull request #8946 from thor/feature/vgpu-profiles
...
Add support for specifying vGPU profiles
2020-04-29 13:27:19 -07:00
Vladislav Rassokhin
03c4bebf00
Add disable_shutdown option to VSphere builders
...
Also don't try to shut down VM if it's already off, otherwise VSphere would raise an error: "The attempted operation cannot be performed in the current state (Powered off)."
2020-04-29 14:19:43 +03:00
Gennady Lipenkov
aa595fa1aa
Rename arg
2020-04-27 02:37:10 +03:00
Gennady Lipenkov
9489a46f32
Make some steps exportable, add 'GetInstanceMetadata' method
2020-04-27 02:19:08 +03:00
jhawk28
c43a52aafe
fix issue where -force is not working with vsphere builders ( #9039 )
...
* add better error support to check if vm exists use path.Join so that it looks up the VM correctly turn off VM if it is still running
* fix the vsphere-clone also
* add a common precleanvm to the driver to dedupe iso and clone logic, reduce the if nesting
2020-04-23 08:07:07 -04:00
Wilken Rivera
e0d2f4fd69
builder/azure-arm: Fix SSH connection for temporary admin users specified in `ssh_username` ( #9103 )
2020-04-23 11:04:49 +02:00
Paul Meyer
26d768f429
[builder/azure-chroot] Shared image source ( #9070 )
2020-04-23 11:03:17 +02:00
Lars Lehtonen
ab119d3270
builder/azure/chroot: fix dropped error ( #9106 )
2020-04-23 10:53:13 +02:00
Adrien Delorme
da4a5224be
HCL2 singular blocks: use key/value or name/value depending on how the service names things ( #9078 )
...
* make sure keyvalue and namevalue filters are using the same naming as the service being used
* make docs a bit more readable for KeyValues too
* Update website/pages/docs/from-1.5/expressions.mdx
Co-Authored-By: Megan Marsh <megan@hashicorp.com>
Co-authored-by: Megan Marsh <megan@hashicorp.com>
2020-04-23 10:46:49 +02:00
Megan Marsh
50823e2573
Merge pull request #9093 from Hakujou/osc-bsu-fix
...
Compliance with oAPI spec for Outscale osc-bsu builder
2020-04-21 10:49:46 -07:00
Matthew Sanabria
761abdda4e
Updating documentation for azure-arm builder ( #9097 )
2020-04-21 10:47:48 +02:00
GennadySpb
1155ab8e3c
Add 'target_image_folder_id' for builder/yandex ( #9080 )
...
Add 'target_image_folder_id' for builder/yandex
Closes #9079
2020-04-20 15:20:05 +02:00
Romain Lecat
1f4e8785f3
Compliance with oAPI spec for Outscale OSC-BSU
2020-04-20 15:00:51 +02:00
vijayrajah
5d2fee04b2
builder/azure: enable boot Diagnostics ( #9053 )
...
* enable boot Diagnostics
2020-04-20 07:29:13 -04:00
Wilken Rivera
cc367bd0b7
Merge pull request #9045 from lausser/cloud-init
...
feat(proxmox): add ability to add a cloud-init drive
2020-04-17 14:09:02 -04:00
Paul Meyer
89f3aa0bd6
[builder/azure-arm] Use VM/build location for image location ( #9068 )
...
* [builder/azure-arm] Use VM/build location for image locationThe builder was using the location of the containing resource group asthe image location, but the API call can only create images in the samelocation as the source VM that is being captured.
2020-04-17 05:43:03 -04:00
Megan Marsh
855808ec6f
Merge pull request #8970 from szamfirov/shielded_vm_support
...
Adding custom shielded images support (GCP)
2020-04-16 16:32:04 -07:00
Svetlin Zamfirov
b706f02408
Fixing auto-generated code errors
2020-04-16 16:22:42 -07:00
Svetlin Zamfirov
d827f4f757
Adding custom shielded images support (GCP)
...
Adds `enable_secure_boot`, `enable_vtpm` and `enable_integrity_monitoring`
config options to enable building of custom Shielded GCP Compute images.
Feedback on this is more than welcome as this is my first attempt in
contributing to anything Packer related.
Packer is great for us to build custom images on top of GCP but we would
like to enhance that to support Shielded VM images. This will allow us
to have more secure and trusted images which our team(s) will be using.
2020-04-16 16:22:41 -07:00
Megan Marsh
08787ba31f
Merge pull request #9028 from vijayrajah/set_azure_custom_res_names
...
Set Custom Resource Names for Azure-Arm builds
2020-04-16 15:58:41 -07:00
Vijay Rajah
da7382980a
Fix failing test & format code
2020-04-17 00:17:39 +05:30
vijayrajah
fff06353b7
Update builder/azure/arm/tempname.go
...
refactor the code.. thanks for the suggestion @sylviamoss
Co-Authored-By: Sylvia Moss <sylviamoss.m@gmail.com>
2020-04-17 00:04:39 +05:30
Adrien Delorme
73242e8de4
make sure keyvalue and namevalue filters are using the same naming as the service being used
2020-04-16 17:22:13 +02:00
Gerhard Lausser
dc2813c8e2
feat(proxmox): add ability to add a cloud-init drive
2020-04-15 22:00:42 +02:00
Wilken Rivera
d580ea7950
Merge pull request #9069 from tencentyun/master
...
builder/tencent: fixed InstanceOperationInProgress error #9054
2020-04-15 07:21:33 -04:00
Thor K. Høgås
ebfc5bcdcb
Merge branch 'master' into feature/vgpu-profiles
2020-04-15 12:02:37 +02:00
Wilken Rivera
e8f8ebf132
builder/vmware: Add some additional debug logging to the driver version check ( #9064 )
2020-04-15 10:34:48 +02:00
Li Kexian
632610d9c0
fixed InstanceOperationInProgress error #9054
2020-04-15 12:38:50 +08:00
Megan Marsh
440f540e28
fix merge issues with generated code
2020-04-14 10:31:57 -07:00
Vladislav Rassokhin
5f2849b5b4
builder/vsphere-clone: support firmware changing
2020-04-14 10:28:43 -07:00
Vladislav Rassokhin
91a1ad63fa
builder/vsphere-iso: support EFI Secure Boot using another value in `firmware` ( #8873 )
2020-04-14 10:28:22 -07:00
Adrien Delorme
840e67f775
HCL2: when we see a map generate an attribute spec instead of a block spec ( #9035 )
...
* mapstructure-to-hcl2: when we see a map generate an attribute spec and not a block spec
this will alow to do
tags = {
key = "value"
}
instead of
tags {
key = "value"
}
This will also enable using variables directly for those tags
* generate code
* update tests
2020-04-14 16:05:13 +02:00
Joshua Foster
7f0dbdebb2
clean up documentation for new NIC and storage params
...
adding examples, updating .gitattributes so *.mdx files have LF endings for windows
2020-04-13 14:28:50 -04:00
Paul Meyer
df47fd5076
Merge pull request #9021 from paulmey/azure-chroot-shared-image-destination
...
[azure/chroot] Add azure-chroot shared image destination
2020-04-09 14:42:13 -07:00
Paul Meyer
621bd8ccac
Fix error message grammar
2020-04-09 20:55:10 +00:00
Paul Meyer
89a8238a07
Fix artifact output
2020-04-09 20:54:50 +00:00
Paul Meyer
47107e6355
Default polling delay 5 sec
2020-04-09 20:37:23 +00:00
Vijay Rajah
9209826bfe
Update the doc with more info
2020-04-10 00:34:56 +05:30
Paul Meyer
4ffe5611b8
Add more tests
2020-04-08 21:05:26 +00:00
Megan Marsh
a48c0ecf49
update docs for headless to help users know they may need to launch the gui
2020-04-08 13:53:19 -07:00
Vijay Rajah
1e66a1b355
Fix linting & code generation
2020-04-09 00:00:13 +05:30
Vijay Rajah
56bf8bd686
Merge branch 'set_azure_custom_res_names' of github.com:vijayrajah/packer into set_azure_custom_res_names
2020-04-08 23:54:21 +05:30
vijayrajah
a3c580f2ac
Merge branch 'master' into set_azure_custom_res_names
2020-04-08 23:51:58 +05:30
Vijay Rajah
53f54000e6
generate spec & fix typo
2020-04-08 23:42:49 +05:30
Thor K. H
2a40f471b7
Add vgpu_profile support for using GRID vGPUs
...
It hooks directly into Configure, common for both vsphere-clone and
vsphere-iso.
Note that acceptance tests are still missing.
2020-04-08 17:11:14 +02:00
Paul Meyer
b12aedcda9
Remove lint
2020-04-07 23:09:42 +00:00
Paul Meyer
5c89d22fa2
generated & docs
2020-04-07 23:05:09 +00:00
Paul Meyer
2240ead39c
[azure/chroot] Add shared image output
2020-04-07 22:49:24 +00:00
Paul Meyer
73edd9d3d2
Make skip_cleanup generic
2020-04-07 22:49:24 +00:00
Paul Meyer
90188bb18d
add func for searching string slice
2020-04-07 22:49:24 +00:00
Paul Meyer
a3d8bf27e1
Add snapshot and gallery clients
2020-04-07 22:49:24 +00:00
Paul Meyer
cfe37057bd
Use const for statebag key
2020-04-07 22:49:24 +00:00
Paul Meyer
f3703a775f
Use subscription id from client set
2020-04-07 22:49:24 +00:00
Paul Meyer
6131301fdd
Standardize compute SDK version
2020-04-07 22:49:24 +00:00
Paul Meyer
f73a673b99
Extract build steps generation
...
Add tests for build step generation
2020-04-07 22:49:21 +00:00
Paul Meyer
c167ef91ce
Move PIR :latest resolution to step
2020-04-07 22:49:21 +00:00
Paul Meyer
f0ec912ba6
Make VirtualMachineImagesClient easier to mock
2020-04-07 22:49:21 +00:00
Paul Meyer
a3b49cdc08
Stub metadata service for builder tests
2020-04-07 22:49:21 +00:00
Paul Meyer
b3e361a139
Extract testUI func
2020-04-07 22:49:20 +00:00
Jeff Escalante
81b08898ba
update generated pages after rebase
2020-04-07 17:53:26 -04:00
Jeff Escalante
2999934326
fix generation script, bugfixes in source comments, update website paths in primary codebase
2020-04-07 17:53:22 -04:00
Jeff Escalante
9165be87da
packer.io prefix removal, html extension remove for in-code errors
2020-04-07 17:53:22 -04:00
Jeff Escalante
af257c2bb9
fix all local relative links
2020-04-07 17:50:53 -04:00
Jeff Escalante
4afd107eeb
patch source files for extensions changes
2020-04-07 17:50:51 -04:00
Jeff Escalante
37300c7203
fix backtick errors
2020-04-07 17:50:47 -04:00
Jeff Escalante
bcc848a83d
were rendering yay
2020-04-07 17:50:47 -04:00
Jeff Escalante
92d4553890
initial port
2020-04-07 17:50:46 -04:00
Megan Marsh
07be1a0a30
Merge pull request #8986 from vijayrajah/feature/datadisk-change_name
...
datadisk name change
2020-04-07 11:06:35 -07:00
Moss
185deeeb38
Fix provisioner acc-test builder and provisioner store
2020-04-06 16:52:24 -04:00
Wilken Rivera
b183c5498f
provisioner/powershell: Add basic Powershell provisioner acceptance tests
...
* Modifies the amazon-ebs builder with a windows build configuration
```
⇶ ACC_TEST_BUILDERS=amazon-ebs ACC_TEST_PROVISIONERS=powershell go test -v ./provisioner/powershell/... -run=TestPowershellProvisioner_Inline
--- PASS: TestPowershellProvisioner_Inline (256.50s)
--- PASS: TestPowershellProvisioner_Inline/testing_amazon-ebs_builder_against_powershell_provisioner (256.50s)
PASS
ok github.com/hashicorp/packer/provisioner/powershell 256.525s
```
2020-04-06 16:52:05 -04:00
Vijay Rajah
cd41ad1a40
change resource names
2020-04-07 02:17:50 +05:30
Vijay Rajah
90a0c5ec49
fix more typos ( ')]' )
2020-04-06 22:02:43 +05:30
vijayrajah
620c791473
Merge branch 'master' into feature/datadisk-change_name
2020-04-06 21:52:43 +05:30
Vijay Rajah
1009e8c983
fix more typos
2020-04-06 21:50:05 +05:30
Vijay Rajah
1314d69b51
fix typo (add missing ')]' )
2020-04-06 11:40:05 +05:30
Vijay Rajah
0589f57d4d
Update tests for datadisk name change
2020-04-05 01:16:24 +05:30
Megan Marsh
b804e5a8f5
Merge pull request #8987 from VaijanathB/azure-devtestlabs-take2
...
Building Azure devtestlabs Images using Packer - update
2020-04-03 11:14:31 -07:00
Sylvia Moss
665330de92
Write generic Builder-Provisioner acceptance test logic ( #8963 )
2020-04-03 18:17:09 +02:00
vijayrajah
aba9797730
Fix :: allow Managed data disks to be used with azure shared image gallery image Sources ( #8912 )
2020-04-03 10:18:02 +02:00
Vaijanath Angadihiremath
20379c9eff
Rebasing with origin/master and fixing issues
2020-04-02 18:15:08 -07:00
Vaijanath Angadihiremath
8194b664af
Fixing issues due to merge.
2020-04-02 17:25:41 -07:00
Vaijanath Angadihiremath
b7d85b8a23
Added acceptance tests for DTL. Fixed couple of issues with DTL root resource group not set to new directory
2020-04-02 17:23:21 -07:00
Vaijanath Angadihiremath
69015b1870
Fixing the linting errors
2020-04-02 17:22:39 -07:00
Vaijanath Angadihiremath
fd21b669db
Fixing the linting errors now required for merging
2020-04-02 17:22:16 -07:00
Vaijanath Angadihiremath
d43fb441b9
Updating the credentials to be picked up from environment variables.
2020-04-02 17:18:00 -07:00
Vaijanath Angadihiremath
e726902116
Fixing the latest changes from the merge
2020-04-02 17:16:31 -07:00
Vaijanath Angadihiremath
645cdf1a59
Updating the modules to include update to autorest 12.4
2020-04-02 17:13:36 -07:00
Megan Marsh
0f9415297f
Merge pull request #8679 from kwibus/gcp-fallback-image
...
[WIP] fix #8589 gcp public fallback image
2020-04-02 16:49:50 -07:00
Vijay Rajah
5340af4d49
Merge remote-tracking branch 'upstream/master' into feature/datadisk-change_name
2020-04-02 21:53:47 +05:30
Vijay Rajah
d82475566a
change datadisk names -- WIP
2020-04-02 21:28:38 +05:30
Sylvia Moss
b0c7fe491c
Remove net_device prepare validation ( #8979 )
2020-04-02 11:34:05 +02:00
Megan Marsh
1963f3aa6f
Merge pull request #8893 from itzimourakas/feature7379
...
[WIP] Feature7379 - https://github.com/hashicorp/packer/issues/7379
2020-04-01 09:33:25 -07:00
Joshua Foster
cf3c448d17
disk_size should not be required if storage is defined
2020-03-31 11:47:09 -04:00
Megan Marsh
0dc92991f4
Merge pull request #8945 from hashicorp/fix_8777
...
only set NoDevice if NoEphemeral is set; otherwise, legit block devic…
2020-03-27 10:07:27 -07:00
Wilken Rivera
413e19b842
Merge pull request #8942 from desolatorxxl/google-fix-ssh-keys-metadata
...
[builder/google] Use "ssh-keys" metadata rather than deprecated "sshKeys"
2020-03-24 14:49:31 -04:00
Megan Marsh
8ae6256c03
add test of NoEphemeral
2020-03-24 09:10:31 -07:00
Megan Marsh
fc36a37db8
only set NoDevice if NoEphemeral is set; otherwise, legit block device mappings get destroyed
2020-03-24 08:51:32 -07:00
Rui Lopes
c387dc2c53
builder/vsphere-clone: Find the vm within the folder ( #8938 )
2020-03-24 11:28:00 -04:00
Sylvia Moss
b17b211aa9
Add cleanup_remote_cache config option to vmware-iso ( #8917 )
2020-03-24 16:16:25 +01:00
Sylvia Moss
e6368b9246
Fix azure winrm_password attribution and allow to set winrm_username ( #8928 )
2020-03-24 14:43:24 +01:00
desolatorxxl
87f7160084
[builder/google] Use "ssh-keys" metadata rather than deprecated "sshKeys"
2020-03-24 08:33:55 +01:00
Jorge Marey
2c6f0968b3
Allow accepting image for the members in OpenStack builder ( #8931 )
...
* Allow accepting image for the members in OS builder
* Add more documentation to image_auto_accept_members parameter
2020-03-23 17:07:00 -04:00
Jeff Mixon
e78dfdddd1
feat(proxmox): add onboot directive support
...
Closes #8934
2020-03-22 17:25:48 -07:00
Wilken Rivera
a7c5daf80d
vsphere/iso: Add support for ovf export options
...
* Fix generated documentation for the additional export options field
2020-03-19 14:46:30 -04:00
jhawk28
99b0b98311
Add ovf export capability to vsphere builders ( #8764 )
...
* add ovf export capability to vsphere builders
* remove unneeded floppy ejection
* add prepare step for export. updated output directory to be the actual destination directory
* add step export documentation
* add extra export options
* add ui messages for export step
Co-authored-by: Megan Marsh <megan@hashicorp.com>
Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
2020-03-19 13:51:43 -04:00
Vijay Rajah
dd04108ac8
Fix :: allow Managed data disks to be used with azure shared image gallery image Sources
2020-03-19 12:11:34 +05:30
Megan Marsh
3dae5df6e4
Merge pull request #8905 from hashicorp/fix_8493
...
Fix azure key vault cleanup failure
2020-03-18 15:29:38 -07:00
Megan Marsh
be1a6c9f35
return error when LoadSnapshots turns up empty
2020-03-18 14:03:22 -07:00
Megan Marsh
28797dd709
replace the homegrown vault delete functions in azure with the sdk ones.
2020-03-18 13:48:54 -07:00
Megan Marsh
e7dba3e55e
fix error cleaning up existing keyvault
2020-03-18 13:48:54 -07:00
Megan Marsh
23f56036a4
Merge pull request #8889 from hashicorp/hcl2_singular_blocks
...
Hcl2 singular blocks
2020-03-17 12:39:04 -07:00
Adrien Delorme
fab344a1fc
Update ami_config.go
...
quote string in err
2020-03-17 15:41:58 +01:00
Adrien Delorme
4ccf158fbf
Update image_config.go
2020-03-17 15:26:18 +01:00
Adrien Delorme
88297c796d
Merge branch 'master' into hcl2_singular_blocks
2020-03-17 14:47:17 +01:00
Adrien Delorme
834f44190f
go generate
2020-03-17 12:30:36 +01:00
Adrien Delorme
94a1f0bcb6
go fmt
2020-03-17 12:05:37 +01:00
Adrien Delorme
911dc5ad95
wip
2020-03-17 11:33:11 +01:00
Adrien Delorme
b5e8750f5f
Change key/value to name/value to remain consistent with Terraform
2020-03-17 11:23:11 +01:00
Jeff Mixon
e503afb9da
feat(proxmox): add ability to specific vga adapter
...
Resolves #8867
2020-03-16 15:58:46 -07:00
Adrien Delorme
3cae1a81ef
up tests
2020-03-16 17:54:52 +01:00
Adrien Delorme
d532bb376c
wip
2020-03-16 17:47:44 +01:00
Adrien Delorme
c845436e32
KeyValues.CopyOn: make sure a receiving nil map is set too
2020-03-16 15:46:08 +01:00
Adrien Delorme
87d6b2433f
make generate
2020-03-16 15:21:29 +01:00
Adrien Delorme
9a74ce60d5
Update config.go
2020-03-16 15:12:13 +01:00
Adrien Delorme
e1c84806cc
rewrap
2020-03-16 14:55:03 +01:00
Adrien Delorme
ac7cc8c5ac
Update target_image_config.go
2020-03-16 14:53:06 +01:00
Adrien Delorme
5c91c7aae6
Update source_machine_config.go
2020-03-16 12:42:56 +01:00
Adrien Delorme
bd387edf5a
Update run_config.go
2020-03-16 12:40:09 +01:00
Adrien Delorme
392afa30cf
Update block_device.go
2020-03-16 12:37:36 +01:00
Adrien Delorme
fc837e3698
Update run_config.go
2020-03-16 12:36:20 +01:00
Adrien Delorme
ce8d3d3747
wip
2020-03-16 12:35:25 +01:00
Adrien Delorme
a9ed8eac2a
Update config.go
2020-03-16 12:32:57 +01:00
Adrien Delorme
0cbf80dafe
wip
2020-03-16 12:26:03 +01:00
Adrien Delorme
45695608b5
WIP
2020-03-16 12:21:46 +01:00
Adrien Delorme
dab689ce2e
WIP
2020-03-16 12:19:34 +01:00
Adrien Delorme
dbb4981d66
WIP
2020-03-16 12:13:05 +01:00
Ilias Tzimourakas
0f2cb45fc6
added instance principals support for oci builder
2020-03-15 17:22:06 +00:00
Megan Marsh
6008f911fd
Merge pull request #8847 from takaishi/support-keyboard-interactive
...
communicator/ssh: support keyboard-interactive auth to connect bastion
2020-03-13 11:48:12 -07:00
Megan Marsh
56045619d4
Merge pull request #8877 from paulcichonski/remote-esxi-bastion
...
vmware-iso esxi: Do not test if NIC is reachable when ssh bastion is required
2020-03-13 11:40:40 -07:00
Adrien Delorme
6f2f17c400
WIP
2020-03-13 18:07:55 +01:00
Adrien Delorme
6e6490d688
WIP
2020-03-13 18:04:48 +01:00
Adrien Delorme
260dc59500
use the hcl2template.KVFilter where we can
2020-03-13 17:17:46 +01:00
Adrien Delorme
b4efd13a4d
aws: use the empty func when possible
2020-03-13 17:17:24 +01:00
r_takaishi
f50ff1d270
make generate
2020-03-13 11:29:42 +09:00
Megan Marsh
aeedc9af7a
Merge pull request #8879 from mbrancato/specify_keyvault_sku
...
Add support for configurable KeyVault SKU
2020-03-12 13:47:51 -07:00
Joshua Foster
49bd57ee12
add the remote iso first so that it is first in boot order
2020-03-12 11:29:19 -04:00
Wilken Rivera
7b705545d9
docs: Various doc clean-ups to fix code block formatting and syntax highlighting ( #8868 )
2020-03-12 15:05:08 +01:00
Mike Brancato
ebb161ae41
Fix config documentation
2020-03-11 21:43:37 -04:00
Mike Brancato
892622987c
Add KeyVault parameter and fix whitespace
2020-03-11 21:13:10 -04:00
Mike Brancato
0f09638f7a
Add HCL2 spec for KeyVault SKU
2020-03-11 20:48:34 -04:00
Mike Brancato
3c6b248bd5
Fix formatting
2020-03-11 20:45:44 -04:00
Mike Brancato
926e3ac2e4
Add support for configurable KeyVault SKU
2020-03-11 20:33:57 -04:00
Paul Cichonski (pcichons)
c3d793255e
Do not test if NIC is reachable when ssh bastion is required
...
Relates to https://github.com/hashicorp/packer/issues/8866
2020-03-11 19:27:48 -04:00
Wilken Rivera
66ad6f3483
builders: Fix gosimple S1007 linting issue ( #8871 )
...
Results before change
```
⇶ golangci-lint run ./... --disable-all --enable=gosimple | grep 1007
builder/alicloud/ecs/image_config.go:208:9: S1007: should use raw string
post-processor/vsphere-template/step_mark_as_template.go:130:8: S1007: shape twice (gosimple)
builder/azure/arm/config.go:58:27: S1007: should use raw string (`...`)
builder/azure/arm/config.go:59:27: S1007: should use raw string (`...`)
builder/qemu/driver.go:192:15: S1007: should use raw string (`...`)
```
Results after change
```
⇶ golangci-lint run ./... --disable-all --enable=gosimple | grep 1007
```
2020-03-11 10:29:22 +01:00
Megan Marsh
4133acbdf3
update spot price docs
2020-03-09 08:46:30 -07:00
jnsc
764b4cb50a
updated link to GuestOsIdentifier ( #8849 )
...
Co-authored-by: Adrien Delorme <adrien.delorme@icloud.com>
2020-03-06 15:30:11 +01:00
Wilken Rivera
698924f246
vSphere ISO supports more common options ( #8845 )
...
The `convert_to_template` and `create_snapshot` are supported across
both builders, but currently only shown in the vSphere Clone docs, this adds
them to it.
2020-03-05 15:04:15 -05:00
Megan Marsh
7e382d0df7
Merge pull request #8828 from mvitaly/fix_8816
...
Remove all floppy controllers before adding a new one
2020-03-05 09:35:20 -08:00
Megan Marsh
8832b3e2ca
Merge pull request #8787 from jhawk28/vsphere_iso_multiple_disks
...
(vsphere-iso) add ability to define multiple disks
2020-03-04 15:17:54 -08:00
Wilken Rivera
e1a46ec293
Fix gosimple S1025 linting errors ( #8838 )
...
Remove unneeded use of fmt.Sprintf for variables that are already strings.
2020-03-04 15:31:30 -05:00
Joshua Foster
1dbe5abc14
update documentation based on feedback
2020-03-04 09:48:01 -05:00
Joshua Foster
d7230827cd
(vsphere-iso) add ability to define multiple disks
...
Closes #8749
2020-03-04 09:48:01 -05:00
Vitaly Polonetsky
25f59a1592
Add a simple test for the call to remove all floppy controllers
2020-03-03 20:58:09 -08:00
Sylvia Moss
ce674ff272
Add exclude mapstructure tag to exclude from hcl2spec struct ( #8785 )
2020-03-03 17:13:39 +01:00
Megan Marsh
6dbe86fcf4
only re-set path name if it needs to be unquoted; otherwise unquote r… ( #8826 )
2020-03-03 11:17:48 +01:00
Vitaly Polonetsky
67c9c2a59a
Remove all floppy controllers before adding a new one
2020-03-02 21:56:20 -08:00
Megan Marsh
9c9826ee4b
Merge pull request #8714 from williamb1024/hyperv-gen1-boot-order
...
WIP: Add Hyper-V builder `first_boot_device` setting to allow the selection of the initial device or device class used for booting the VM.
2020-03-02 12:27:25 -08:00
Calle Pettersson
17fa6a3e95
proxmox: template_name cannot contain spaces
2020-02-26 08:44:27 +01:00
William Brooks
8e0ed66318
Fix raw string breaks escaping
2020-02-22 02:40:41 -06:00
William Brooks
efa9d94d8e
use raw string around regex to make go lint happy
2020-02-22 02:22:59 -06:00
William
d246d0c82a
More testing ( #4 )
...
Additional testing for SetFirstBootDevice and checking configuration in config.Prepare()
2020-02-22 02:03:42 -06:00
William
b5b190b1f0
Bootdevice testing ( #3 )
...
Start step_first_boot_device_test and rejigger ParseBootDeviceIdentifier to avoid regex where reasonable.
2020-02-22 00:29:05 -06:00
William Brooks
723a9eba9a
really, really, really fix driver_mock
2020-02-21 01:53:13 -06:00
William Brooks
11fae17308
again, really fix driver_mock
2020-02-21 01:44:49 -06:00
William Brooks
2de731453f
really fix driver_mock this time
2020-02-21 01:43:03 -06:00
William Brooks
0a0fbfc33b
fmt
2020-02-21 01:31:18 -06:00
William Brooks
dd8f4370c6
initial support for gen2 and fix driver_mock
2020-02-21 01:30:59 -06:00
William Brooks
5e1e4ec701
fmt && generate
2020-02-21 01:07:58 -06:00
William Brooks
d7300f4635
Remove legacy_boot and replace with first_boot_device (initial)
2020-02-21 01:01:09 -06:00
Rens Sikma
3d8bda31a4
modify docstring
2020-02-20 12:54:35 +01:00
Megan Marsh
dde74232f2
Clearly document all template-engine-enabled options ( #8770 )
2020-02-20 11:05:27 +01:00
Megan Marsh
eb35617985
Merge pull request #8756 from aeber/feature_eagerly_scrub_disks
...
vsphere-iso: add support for eagerly zeroed / scrubbed disks
2020-02-19 09:47:49 -08:00
Megan Marsh
5846c0cdd7
Merge pull request #8753 from jhawk28/bug_8743
...
fix #8743 by using interface instead of Network object
2020-02-18 10:12:34 -08:00
Joshua Foster
3f80414e6d
fix #8743 by using interface instead of Network object
2020-02-18 10:05:18 -05:00
Li Kexian
f3231018ca
showing tencentcloud image id after copy to desination region ( #8763 )
2020-02-18 11:17:19 +01:00
Jason A. Beranek
9cbb49bacb
builder/vmware/iso: Expand `guest_os_type` docs ( #8760 )
2020-02-18 11:11:20 +01:00
Anselm Eberhardt
94130b5def
add autogenerated help for disk_eagerly_scrub
2020-02-17 17:01:00 +01:00
Anselm Eberhardt
6c749eecf7
add support for eagerly zeroed / scrubbed disks
2020-02-17 16:26:07 +01:00
William
807f39284d
Merge pull request #2 from hashicorp/master
...
merge from hashicorp/packer
2020-02-15 23:13:38 -06:00
jhawk28
7f0de5fc8d
add ability to define multiple NICs for vsphere-iso ( #8739 )
2020-02-14 17:51:57 +01:00
Wilken Rivera
9ec8b67392
Add golangci-lint to project ( #8686 )
...
* Add golangci-lint as linting tool
* Disable failing staticchecks to start; GitHub issue to handle coming soon
* Run `goimports -w` to repair all source files that have improperly
formatted imports
* makefile: Add ci-lint target to run on travis
This change adds a new make target for running golangci-lint on newly
added Go files only. This target is expected to run during Packer ci builds.
* .github/contributing: Add code linting instructions
* travis: Update job configuration to run parallel builds
2020-02-14 11:42:29 -05:00
Megan Marsh
4f7670a1e6
Merge pull request #8690 from daxgames/vsphere_iso_remove_cdrom
...
vsphere iso remove cdroms
2020-02-13 11:00:47 -08:00
Sylvia Moss
23fa3107a3
Render variables one time on prepare method ( #8727 )
2020-02-13 17:35:23 +01:00
Dax T. Games
78012dc56f
add autogenerated help for vsphere iso remove cdrom
2020-02-12 11:31:46 -05:00
Wilken Rivera
c99dc56544
Update Azure ARM documentation
...
* Change generated documentation to indicate what image selection
options are required, and when.
* Refactor the structure of the documentation to highlight required
options for different types of builds
2020-02-10 21:14:11 -05:00
Megan Marsh
a90f75585b
Merge pull request #8709 from hashicorp/aws_max_retries
...
add max_retries option to aws builders
2020-02-10 14:58:44 -08:00
Wilken Rivera
7e45a10e90
Merge pull request #8717 from luba239/master
...
Add service account ID to config #8716
2020-02-10 14:27:59 -05:00
Megan Marsh
dfefe7e8d9
Merge pull request #8704 from hashicorp/custom_vault_azure
...
Custom vault azure
2020-02-10 10:51:06 -08:00
Luba Grinkevich
a067b23e6d
Execute `make generate` #8716
2020-02-10 18:51:29 +03:00
Luba Grinkevich
38fe16e01f
Add service account ID to config #8716
2020-02-10 18:36:19 +03:00
William Brooks
61f5f867eb
make generate
2020-02-09 16:41:07 -06:00
William Brooks
9891e75f75
update hyper-v driver_mock.go
2020-02-09 15:39:35 -06:00
William Brooks
31622b50ac
applied fmt
2020-02-09 15:22:36 -06:00
William Brooks
7152732597
changing SetBootDvdDrive messaging to be truthful
2020-02-09 14:26:46 -06:00
William Brooks
55ae803852
Add Hyper-V support for Gen-1 boot order with ISO
2020-02-09 13:08:22 -06:00
Adrien Delorme
7d5f0c11af
add max_retries option to aws builders
2020-02-07 16:36:14 +01:00
Sylvia Moss
6d7c6ba18c
Add step_http_ip_discover to virtualbox to allow HTTPIP in vboxmanage ( #8700 )
2020-02-07 10:38:48 +01:00
Megan Marsh
2181f10e79
fix statebag setup; simplify conditional
2020-02-06 16:54:07 -08:00
Megan Marsh
7dd1fa44db
regenerate code
2020-02-06 16:41:28 -08:00
Megan Marsh
9643ad35f1
add tests
2020-02-06 16:41:28 -08:00
Megan Marsh
6d6b94d515
Add ability to use custom keyvault into azure builds
2020-02-06 16:41:28 -08:00
Wilken Rivera
a1d9ba0e32
Merge pull request #8699 from fly1028/fix-instance-running-timeout
...
Instance Running waiter not aware of global waiter settings
2020-02-06 17:18:59 -05:00
Rens Sikma
c8062cc8b3
fix #8679 with source_image_project_id as list
2020-02-06 10:30:04 +01:00
Patrick Ng
e5e5fd1198
Instance Running waiter not aware of global waiter settings
2020-02-05 15:09:09 -08:00
Dax T. Games
1cb6f4e456
Merge branch 'vsphere_iso_remove_cdrom' of https://github.com/daxgames/packer into vsphere_iso_remove_cdrom
...
* 'vsphere_iso_remove_cdrom' of https://github.com/daxgames/packer :
format
Update builder.go
2020-02-05 11:11:43 -05:00
Dax T. Games
76680ac1c6
add docs
2020-02-05 11:10:50 -05:00
Dax T. Games
6b82bf5a93
format
2020-02-05 15:25:49 +00:00
Dax T Games
9756a9858a
Update builder.go
2020-02-04 14:41:44 -05:00
Dax T. Games
4fa0f6baa3
recreate https://github.com/jetbrains-infra/packer-builder-vsphere/pull/238
2020-02-04 14:25:45 -05:00
Wilken Rivera
561f02cc2f
builder/azure-arm: Update logic for setting subscriptionID ( #8685 )
...
* builder/azure-arm: Update logic for setting subscriptionID
Previously, when using managed identities, the Azure builder would set the SubscriptionID in the Prepare method. But would not update it after getting the updated SubscriptionID from the metadata server. This change updates the Run method to ensure a valid subscriptionID is saved to the statebag before continuing with an image build.
Co-authored-by: Paul Meyer <paul.meyer@outlook.com>
2020-02-04 10:54:58 -05:00
Sylvia Moss
08b0bd1d2c
Fix HCL2 code generation for slices within another slice ( #8669 )
2020-02-03 17:03:28 +01:00
Yu SungDuk
df18187032
builder/ncloud: Migrate ncloud-sdk-go-v1 to ncloud-sdk-go-v2 ( #8678 )
2020-02-03 14:55:01 +01:00
Megan Marsh
d252a24b82
allow user to set winrm_host override like we do ssh_host override
2020-01-30 15:22:22 -08:00
nywilken
654cc4c4d5
builder/azure-arm: Set WinRMPassword on the communicator config
...
Build results before change
```
azure-arm: output will be in this color.
==> azure-arm: Running builder ...
azure-arm:
==> azure-arm: Provisioning with Powershell...
==> azure-arm: Provisioning with powershell script:
/tmp/powershell-provisioner922851060
==> azure-arm: Exception calling "RegisterTaskDefinition" with "7" argument(s): "(38,4):Task:"
==> azure-arm: At C:\Windows\Temp\packer-elevated-shell-5e320d29-bdbd-b619-9e64-0c8a301b9d1d.p
==> azure-arm: s1:60 char:1 ==> azure-arm: + $f.RegisterTaskDefinition($name, $t, 6,
"packer", $password, $logon_type,
==> azure-arm: $null) ...
==> azure-arm: +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> azure-arm: ~~~
==> azure-arm: + CategoryInfo : NotSpecified:
(:) [], MethodInvocationException
==> azure-arm: + FullyQualifiedErrorId :
ComMethodTargetInvocation
==> azure-arm:
==> azure-arm: Exception calling "GetTask" with "1"
argument(s): "The system cannot find the
==> azure-arm: file specified. (Exception from HRESULT:
0x80070002)"
==> azure-arm: At
C:\Windows\Temp\packer-elevated-shell-5e320d29-bdbd-b619-9e64-0c8a301b9d1d.p
==> azure-arm: s1:61 char:1
==> azure-arm: + $t = $f.GetTask("\$name")
==> azure-arm: + ~~~~~~~~~~~~~~~~~~~~~~~~~
==> azure-arm: + CategoryInfo : NotSpecified:
(:) [], MethodInvocationException
==> azure-arm: + FullyQualifiedErrorId :
ComMethodTargetInvocation
==> azure-arm:
==> azure-arm: Method invocation failed because
[System.__ComObject] does not contain a
==> azure-arm: method named 'Run'.
==> azure-arm: At
C:\Windows\Temp\packer-elevated-shell-5e320d29-bdbd-b619-9e64-0c8a301b9d1d.p
==> azure-arm: s1:62 char:1
==> azure-arm: + $t.Run($null) | Out-Null
==> azure-arm: + ~~~~~~~~~~~~~~~~~~~~~~~~
==> azure-arm: + CategoryInfo :
InvalidOperation: (Run:String) [], RuntimeExcept
==> azure-arm: ion
==> azure-arm: + FullyQualifiedErrorId : MethodNotFound
==> azure-arm:
Cancelling build after receiving interrupt
==> azure-arm: Removing the created Deployment object:
'pkrdp087bb80ibj'
==> azure-arm: Removing the created Deployment object:
'kvpkrdp087bb80ibj'
==> azure-arm:
==> azure-arm: Cleanup requested, deleting resource group
...
==> azure-arm: Resource group has been deleted.
Build 'azure-arm' errored: Build was cancelled.
Cleanly cancelled builds after being interrupted.
```
Build results after change
```
azure-arm: WinRM connected.
==> azure-arm: <Objs Version="1.1.0.1"
xmlns="http://schemas.microsoft.com/powershell/2004/04 "><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64
N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><Obj S="progress" RefId="1"><TNRef RefId="0" /><MS><I64 N="SourceId">2</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><Obj S="progress" RefId="2"><TNRef RefId="0" /><MS><I64 N="SourceId">3</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>
==> azure-arm: Connected to WinRM!
==> azure-arm: Running local shell script:
/tmp/packer-shell091779215 azure-arm: 022xUtbwAH3DdqIoRCOh9caZi8tOYqcY
==> azure-arm: Provisioning with Powershell...
==> azure-arm: Provisioning with powershell script: /tmp/powershell-provisioner469853889
azure-arm: HELLO NEW USER; automatically generated aws password is: 022xUtbwAH3DdqIoRCOh9caZi8tOYqcY
==> azure-arm: Querying the machine's properties ...
```
2020-01-30 12:07:48 -05:00
Sylvia Moss
dc31bad539
Sharing info with post-processors via artifact ( #8632 )
2020-01-30 11:27:58 +01:00
nywilken
d2a9e6b32e
Format code with `gofmt -s -w`
2020-01-28 16:52:50 -05:00
Megan Marsh
e57004b2ec
Merge pull request #8662 from hashicorp/return_with_ssh_wait_timeout
...
WIP Add ssh_wait_timeout back for backward compatibility
2020-01-28 12:08:42 -08:00
Megan Marsh
6a07d76416
Merge pull request #8654 from hashicorp/fix_8583
...
Extract http ip discover to a new step
2020-01-28 08:50:48 -08:00
Moss
6ad7f593bf
Undo ssh_wait_timeout backward incompatibility
2020-01-28 17:26:01 +01:00
Moss
61bee60ecf
Add StepHttpIpDiscover tests
2020-01-28 10:31:17 +01:00
Chris Lundquist
56206aa3ae
Merge pull request #8636 from hashicorp/clundquist/fix-lxd-dir-upload
...
fixes and closes #8547
2020-01-27 19:22:49 -08:00
Moss
df38d11270
Fix compilation error
2020-01-27 17:15:13 +01:00
Moss
0566f1f999
Extract http ip discover to a new step
2020-01-27 17:06:56 +01:00
Megan Marsh
8c8de27509
add note about error abort to vmware warning
2020-01-24 09:02:30 -08:00
Megan Marsh
b0b10f6939
Merge pull request #8496 from ryanhartje/delete_arm_deployment_on_cleanup
...
attempting to resolve deployment quota issue due to non-cleanup
2020-01-23 09:48:20 -08:00
Ryan Hartje
c4a9715e50
updated the deleteTemplate invocation to a defer at the start of cleanup
2020-01-22 16:58:26 -06:00
Wilken Rivera
111bab86d9
Merge pull request #8622 from datalot/pre-validate-with-filters
...
Allow aws builder pre validation to pass when subnet filters are present
2020-01-22 15:00:44 -05:00
Chris Lundquist
15cbe4769c
fixes and closes #8547
2020-01-21 19:49:49 -08:00
Sylvia Moss
0b7251a4bb
Share .Device and .MountPath between builders, provisioners and post-processors ( #8621 )
2020-01-20 16:29:38 +01:00
Calle Pettersson
8e4c165173
Proxmox upload ISO
2020-01-17 22:17:28 +01:00
Rich Cavanaugh
4fb0de5256
allow validation to pass when subnet filters are present
2020-01-17 11:57:42 -05:00
Sylvia Moss
39c25b2c66
Add retry mechanism to amazon DeleteSnapshot ( #8614 )
2020-01-16 14:38:46 +01:00
Sylvia Moss
0677b02e18
Share SourceImageName with provisioners and manifest post-processor ( #8603 )
2020-01-16 12:04:03 +01:00
Megan Marsh
83dc0a7c8b
fix config decode
2020-01-15 14:27:55 -08:00
Megan Marsh
fac320d290
Merge pull request #8480 from hashicorp/merge-vsphere-builder
...
Merge the vSphere builder
2020-01-15 14:11:20 -08:00
Megan Marsh
ecf0e5794a
Merge pull request #8607 from hashicorp/fix_vagrant_crash
...
Fix a crash in the vagrant driver
2020-01-15 13:33:23 -08:00
Megan Marsh
a847530a83
Update builder/vagrant/driver_2_2.go
...
Co-Authored-By: Wilken Rivera <dev@wilkenrivera.com>
2020-01-15 13:12:44 -08:00
Megan Marsh
d55f256cac
Merge pull request #8414 from footplus/fix_osc_ssh_host_detection
...
builder/osc: fix ssh host detection in Public Cloud and Nets
2020-01-15 12:13:28 -08:00
Megan Marsh
48811ed4e5
replace buffer copy loop with a scanner that handles carriage returns
2020-01-15 12:05:29 -08:00
Megan Marsh
6315f69019
break out of loop once channel is read from.
2020-01-15 11:00:41 -08:00
Megan Marsh
b8edaa9850
Merge pull request #8605 from hashicorp/fix_8599
...
remove unhelpful quotes to fix bug with reading key from a path with …
2020-01-15 10:56:23 -08:00
Megan Marsh
bbd64896a0
use strconv.unquote instead of DIY
2020-01-15 10:23:25 -08:00
Sylvia Moss
0e177915f8
Add retry mechanism to DeregisterImage from awsec2 ( #8598 )
2020-01-15 10:28:14 +01:00
Megan Marsh
5980d32efb
remove unhelpful quotes to fix bug with reading key from a path with spaces in it.
2020-01-14 13:57:11 -08:00
Megan Marsh
82f03fca7c
fix to work with hcl2; update tests
2020-01-13 15:52:05 -08:00
Megan Marsh
dfb45e86cc
remove unused file, set up prepare() properly to work with HCL2 in vsphere-clone builder
2020-01-13 12:33:56 -08:00
Megan Marsh
9459e2233b
fix config loading to work with HCL2
2020-01-13 11:51:36 -08:00
Megan Marsh
f84634aff3
small log line improvements
2020-01-13 11:43:53 -08:00
Sylvia Moss
d6a351b173
Rename communicator config variables and remove deprecated code ( #8584 )
2020-01-09 08:37:30 -08:00
Sylvia Moss
baa203bb53
Adds acpi_shutdown to virtualbox builder ( #8587 )
2020-01-09 08:36:19 -08:00
Moss
6a2d73a0e9
Add missing doc variable description
2020-01-08 15:28:53 -08:00
Megan Marsh
e87aa237dd
Get plugin up to parity with v1.5.0. Remove custom jetbrains-internal testing logic; disable acceptance tests (for now) until we can set up a test rig inside of HashiCorp. Regenerate code based on vendoring changes.
2020-01-08 14:41:51 -08:00
Shengyu Liu
c3c2622204
builder/tencentcloud: Correct the image name length validation, the max length of image name is 60 ( #8536 )
2020-01-08 12:05:37 +01:00
Megan Marsh
073eda76aa
remove extraneous files from when vsphere builder was a plugin, and move README into packer website as separated docs for vsphere-clone and vsphere-iso. Move option descriptions into struct code, and generate documentation directly from those structs as we do inside of the other builders
2020-01-07 16:59:31 -08:00
Megan Marsh
8cb1f7b1c1
Merge branch 'master' into merge-vsphere-builder
2020-01-07 14:23:38 -08:00
Megan Marsh
eeac289fa5
Merge pull request #8535 from alexyueer/master
...
fix issue #8534
2020-01-07 12:47:23 -08:00
Megan Marsh
21edd085c7
Merge pull request #8560 from alexyueer/feature/support_aliyun_profile_20200103
...
support aliyun profile
2020-01-07 12:45:54 -08:00
Megan Marsh
e9bb81a440
Merge pull request #8578 from hashicorp/unstick_vmware_shutdown_tests
...
bump the timeout to a very high level to protect against laggy CI mac…
2020-01-07 12:44:48 -08:00
Megan Marsh
7d789a1483
Merge pull request #8579 from hashicorp/do_8562
...
step_download: return without error if Urls is empty
2020-01-07 12:01:24 -08:00
Megan Marsh
c446bf07c5
Merge pull request #8574 from hashicorp/fix_8541
...
Fix 8541
2020-01-07 12:00:27 -08:00
Megan Marsh
90bdcf58bd
update step_download to return an ActionContinue if the URls field is empty. this allows us to simplify the hyperv builder, and is still safe because all other builders and uses of step_download already validate that the iso url is not empty if that's what they need, most of them inside of the IsoConfig prepare function.
2020-01-07 10:45:24 -08:00
Megan Marsh
be3c1ef106
bump the timeout to a very high level to protect against laggy CI machines
2020-01-07 09:59:25 -08:00
Megan Marsh
af2c4346f8
Merge pull request #8561 from ata18/ata18-end-of-life
...
Set expiry for image versions in SIG
2020-01-07 09:53:14 -08:00
Adrien Delorme
7b5a868de2
virtualbox/vm.Builder: use config as a non pointer to avoid a panic
...
this is a continuation to #8513
2020-01-07 16:55:50 +01:00
Adrien Delorme
13ea97a1df
mapstructure-to-hcl2: make basic named types pointers ( optional )
2020-01-07 12:46:27 +01:00
Adrien Delorme
731904d3d2
mapstructure-to-hcl2: use accessor for named types and not named type + go genrate + tests
2020-01-07 11:44:22 +01:00
Megan Marsh
be97507088
delete qmp socket path. Also, clean up unnecessary use of statebag to recieve step values. ( #8572 )
2020-01-07 11:18:01 +01:00
Aishwarya Thangappa
9f24869e36
Update the error handling for end-of-life-date parsing
2020-01-06 22:58:26 -08:00
Aishwarya Thangappa
9569d35d14
Set expiry for image versions in SIG
...
Updates azure builder to support setting end-of-life-date for
image versions in shared image gallery. In addition, this change adds
the ability to set the global replica count for the image version
and allows the vms deployed from the latest version of the Image
Definition to exclude this Image Version.
2020-01-06 22:58:26 -08:00
Megan Marsh
b7ee807cf1
Merge pull request #8571 from hashicorp/fix_8565
...
fix ssh interface docs for amazon builders
2020-01-06 14:34:40 -08:00
Megan Marsh
6655f93b59
fix typo and regenerate code
2020-01-06 14:12:29 -08:00
Megan Marsh
7411a8a6ef
Merge pull request #8550 from tpounds/add-ami-owner-to-template
...
Add source AMI owner ID/name to build template
2020-01-06 13:38:49 -08:00
Megan Marsh
76251e5fd2
fix ssh interface docs for amazon builders
2020-01-06 12:01:30 -08:00
Lars Lehtonen
8098ba9cdf
builder/virtualbox/common: remove unused url variable ( #8559 )
2020-01-06 16:45:05 +01:00
alexyueer
ec4a7b6af0
support aliyun profile
2020-01-03 12:17:34 +08:00
Trevor Pounds
47e48ebc24
Add source AMI owner ID/name to build template.
2019-12-30 14:04:49 -05:00
wujin
2e2f197bc3
add SecurityGroupId when DescribeSecurityGroups if user specify SecurityGroupId
2019-12-24 09:47:52 +08:00
Megan Marsh
348e00422e
Merge pull request #8509 from hashicorp/fix_step_import_panic
...
Remove config dependency from inside StepImport
2019-12-20 09:19:30 -08:00
Moss
7912e496aa
Remove config dependency inside StepImport
2019-12-20 11:58:28 +01:00
Megan Marsh
127905e855
remove time flaky time limited tests ( #8522 )
...
* remove flaky test. It isn't very useful anyway given that we're slowly adding retries to the checks for lockfiles
* remove time-component from retry test; in underpowered CI builds, this can flake fairly often.
2019-12-20 08:16:18 +01:00
zhuzhih2017
66445ecd2d
Merge pull request #8425 from haoshuwei/master
...
add show expired arg when describe image
2019-12-20 13:33:55 +08:00
haoshuwei
37dc411f30
add skip_image_validation arg to use an expired image as the soure image
...
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
2019-12-20 11:28:31 +08:00
Wilken Rivera
f45d315be4
Merge pull request #8518 from hashicorp/update_jdcloud_config_pointer
...
update jdcloud statebag to use pointers for config, to bring in line …
2019-12-19 15:45:40 -05:00
Megan Marsh
f47d9f1b1f
Merge pull request #8514 from hashicorp/fix_5821
...
Configure NAT interface before forwarded port mapping
2019-12-19 11:30:33 -08:00
Megan Marsh
09489da149
update jdcloud statebag to use pointers for config, to bring in line with other implementations
2019-12-19 11:17:04 -08:00
Adrien Delorme
f1e6f8eac1
removed unused config puts
2019-12-19 18:06:39 +01:00
Adrien Delorme
a67948f155
fix config pointers
2019-12-19 17:51:57 +01:00
Moss
9216f43463
Configure NAT interface before forwarded port mapping
2019-12-19 17:03:31 +01:00
Moss
42cf9ef064
Remove pointer fixing panic on interface conversion
2019-12-19 13:30:54 +01:00
Wilken Rivera
a72242cd70
Merge pull request #8498 from hashicorp/f-builder_docker-typeassertion-check
...
builder/docker: Fix interface conversion issue when getting config from state bag
2019-12-17 18:08:00 -05:00
Megan Marsh
dca2c03cdb
Merge pull request #7866 from hashicorp/sharing_info
...
Add new struct to Provision() method signature, allowing us to share connection and credential info generated at build time with provisioners.
2019-12-17 14:55:20 -08:00
nywilken
9403d55549
builder/docker: Add type assertion check when reading config from state bag
2019-12-17 17:48:35 -05:00
nywilken
0ba6b22fee
builder/docker: Update type of config stored in state bag
2019-12-17 17:48:35 -05:00
Ryan Hartje
bfc3b72050
attempting to resolve deployment quota issue due to non-cleanup
2019-12-17 09:57:57 -06:00
nywilken
1eb55c2ae3
builder/azure: Remove double override of GalleryImageVersionsClient.PollDuration
...
This change fixes an issues where custom timeouts set for the
GalleryImagesVersionClient was being over written by the default client
poll duration.
2019-12-17 10:47:32 -05:00
Adrien Delorme
4b7132c87c
Merge remote-tracking branch 'origin/master' into sharing_info
2019-12-17 11:57:09 +01:00
Adrien Delorme
0785c2f6fc
build using HCL2 ( #8423 )
...
This follows #8232 which added the code to generate the code required to parse
HCL files for each packer component.
All old config files of packer will keep on working the same. Packer takes one
argument. When a directory is passed, all files in the folder with a name
ending with “.pkr.hcl” or “.pkr.json” will be parsed using the HCL2 format.
When a file ending with “.pkr.hcl” or “.pkr.json” is passed it will be parsed
using the HCL2 format. For every other case; the old packer style will be used.
## 1. the hcl2template pkg can create a packer.Build from a set of HCL (v2) files
I had to make the packer.coreBuild (which is our one and only packer.Build ) a public struct with public fields
## 2. Components interfaces get a new ConfigSpec Method to read a file from an HCL file.
This is a breaking change for packer plugins.
a packer component can be a: builder/provisioner/post-processor
each component interface now gets a `ConfigSpec() hcldec.ObjectSpec`
which allows packer to tell what is the layout of the hcl2 config meant
to configure that specific component.
This ObjectSpec is sent through the wire (RPC) and a cty.Value is now
sent through the already existing configuration entrypoints:
Provisioner.Prepare(raws ...interface{}) error
Builder.Prepare(raws ...interface{}) ([]string, error)
PostProcessor.Configure(raws ...interface{}) error
close #1768
Example hcl files:
```hcl
// file amazon-ebs-kms-key/run.pkr.hcl
build {
sources = [
"source.amazon-ebs.first",
]
provisioner "shell" {
inline = [
"sleep 5"
]
}
post-processor "shell-local" {
inline = [
"sleep 5"
]
}
}
// amazon-ebs-kms-key/source.pkr.hcl
source "amazon-ebs" "first" {
ami_name = "hcl2-test"
region = "us-east-1"
instance_type = "t2.micro"
kms_key_id = "c729958f-c6ba-44cd-ab39-35ab68ce0a6c"
encrypt_boot = true
source_ami_filter {
filters {
virtualization-type = "hvm"
name = "amzn-ami-hvm-????.??.?.????????-x86_64-gp2"
root-device-type = "ebs"
}
most_recent = true
owners = ["amazon"]
}
launch_block_device_mappings {
device_name = "/dev/xvda"
volume_size = 20
volume_type = "gp2"
delete_on_termination = "true"
}
launch_block_device_mappings {
device_name = "/dev/xvdf"
volume_size = 500
volume_type = "gp2"
delete_on_termination = true
encrypted = true
}
ami_regions = ["eu-central-1"]
run_tags {
Name = "packer-solr-something"
stack-name = "DevOps Tools"
}
communicator = "ssh"
ssh_pty = true
ssh_username = "ec2-user"
associate_public_ip_address = true
}
```
2019-12-17 11:25:56 +01:00
Megan Marsh
0f6d1beccf
add an extra string array to the Prepare() return values in the builder interfaces; this sets up the ability for builders to give the provisioners custom user-accessible build-time variables.
2019-12-16 21:23:05 -08:00
Sylvia Moss
c57f093efe
Remove unnecessary source_path validation for virtualbox-ovf ( #8489 )
2019-12-16 16:50:21 +01:00
Sylvia Moss
0a8b172bf9
Remove duplicated retry mechanism when deleting VM ffrom virtual box ( #8485 )
...
This retry was also added to fix a locked by session error reported in #5501 and fixed in #5512 .
2019-12-16 14:31:15 +01:00
Megan Marsh
84063d2132
implement ID and Type values in the provisioner template info sharing
2019-12-13 11:57:01 -08:00
Kris Hicks
40357e2534
docs/builder/azure-arm: Remove errant html comment ( #8484 )
...
* Remove errant html comment from source
* make generate
2019-12-13 10:35:24 -05:00
Sylvia Moss
2ee3311082
Retry command execution when VM session is locked ( #8483 )
2019-12-13 10:47:19 +01:00
Megan Marsh
3389d843f0
update all provisioners that used the winrmpassword tooling to use the new generateddata option
2019-12-12 16:42:53 -08:00
Sylvia Moss
c6b9efb522
Fix virtualbox-iso TestBuilderAcc_basic ( #8481 )
...
make sure the test works for later usage
2019-12-12 10:43:51 +01:00
Megan Marsh
6f418d0e54
get data sharing to a working state with the powershell provisioner
2019-12-11 15:43:38 -08:00
Megan Marsh
601007e3e2
pas data into provisioners well
2019-12-11 15:43:38 -08:00
Oded Priva
5e81c6f44e
added the option to skip IAM instance profile validation ( #8457 )
2019-12-10 09:17:38 +01:00
Chris Doherty
1140504935
Merge remote-tracking branch 'packer-builder-vsphere/master' into cd/merge
2019-12-09 17:15:08 -08:00
Chris Doherty
ffcae91e8e
Re-arrange directory structure for merge.
2019-12-09 17:14:55 -08:00
Sylvia Moss
2f63c581a0
Remove unnecessary 1 sec sleep ( #8453 )
2019-12-06 11:43:28 +01:00
Sylvia Moss
5ff5623433
Add disable_shutdown option to VirtualBox builder ( #8449 )
2019-12-05 14:34:56 +01:00
deisenzimmer
2b3935778e
amazon-ebssurrogate plugin: StepSnapshotVolumes: Added mutex to synchronise map access across threads. ( #8432 )
2019-12-04 15:13:07 +01:00
Megan Marsh
de9f391a1c
Merge pull request #8430 from hashicorp/fix_8359
...
Fix request retry mechanism to launch aws instance
2019-12-03 16:03:03 -08:00
Megan Marsh
05b972e550
Merge pull request #8444 from ad-m/hyperone-builder
...
Fix tags & modernize config for HyperOne builder
2019-12-03 10:30:26 -08:00
Megan Marsh
9fc37f9456
Merge pull request #8438 from hashicorp/fix_qemu_sizes
...
make sure we continue to default to Megabytes for qemu disk size to p…
2019-12-03 09:58:21 -08:00
Adam Dobrawy
a97ff7ce8b
builder/hyperone: Update schema for cli config
2019-12-03 14:57:41 +01:00
Adam Dobrawy
3b091e6046
builder/hyperone: fix & add tests for tags
2019-12-03 14:57:40 +01:00
Megan Marsh
7d8f1c01c4
Revert "fix: persist default drive/device" ( #8440 )
...
This reverts commit 30ccab4
which introduced the issue 8436.
2019-12-03 13:42:11 +01:00
Megan Marsh
fcda07ee6a
clarify docs by removing unclear string ( #8439 )
...
the docs generator from code PR #7724 mis scrapped it
2019-12-03 10:07:46 +01:00
Megan Marsh
f5806afda8
update docs
2019-12-02 16:04:29 -08:00
Megan Marsh
effd330945
make sure we continue to default to Megabytes for qemu disk size to prevent backwards incompatabilities.
2019-12-02 15:13:17 -08:00
Lars Lehtonen
df031db9da
builder/azure/common/template: remove unused TemplateBuilder.getResourceByType2() ( #8419 )
...
builder/azure/common/template: remove unused TemplateBuilder.toKeyVaultID()
2019-12-02 18:09:42 +01:00
Ilhaan Rasheed
2c22b9f721
Update LXD directory upload command ( #8416 )
2019-12-02 12:01:18 +01:00
Moss
28c720bd3a
Organize imports
2019-12-02 10:17:36 +01:00
Moss
250643d54b
Remove 5 sec sleep after adding iam instance profile
2019-12-02 10:13:26 +01:00
Moss
4516978555
Fix request retry mechanism to run aws instance
2019-11-29 18:11:10 +01:00
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
Aurélien Guillaume
1a397b9fcd
builder/osc: fix ssh host detection in Public Cloud and Nets
2019-11-26 17:50:30 +01: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
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
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
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
DanHam
b40e5d90b6
builder/amazon/common/step_pre_validate: Return DescribeVpcs errors
2019-11-19 20:18:53 +00: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