14303 Commits

Author SHA1 Message Date
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
William
e490b7651d Merge pull request #1 from hashicorp/master
Synchronize fork from upstream repository
2020-02-08 23:25:54 -06:00
Megan Marsh
ff4674a49c
Merge pull request #8701 from thumperward/fix/windows-iso-symlink-doc
update the note about Windows symlinks
2020-02-07 10:31:46 -08: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
bfa8b17039 regenerate docs 2020-02-06 17:02:01 -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
Chris Cunningham
e94ed9a683 update the note about Windows symlinks
GH-7534 and GH-7545 disabled the use of symlinks for copying local ISOs, 
per:

https://github.com/hashicorp/packer/blob/master/common/step_download.go#L106

Update the documentation to match, as without reading the source it is 
implied that this should work.
2020-02-06 17:38:57 +01:00
Adrien Delorme
193dad46e6
Hcl2 input variables, local variables and functions (#8588)
Mainly redefine or reused what Terraform did.

* allow to used `variables`, `variable` and `local` blocks
* import the following functions and their docs from Terraform: abs, abspath, basename, base64decode, base64encode, bcrypt, can, ceil, chomp, chunklist, cidrhost, cidrnetmask, cidrsubnet, cidrsubnets, coalesce, coalescelist, compact, concat, contains, convert, csvdecode, dirname, distinct, element, file, fileexists, fileset, flatten, floor, format, formatdate, formatlist, indent, index, join, jsondecode, jsonencode, keys, length, log, lookup, lower, max, md5, merge, min, parseint, pathexpand, pow, range, reverse, rsadecrypt, setintersection, setproduct, setunion, sha1, sha256, sha512, signum, slice, sort, split, strrev, substr, timestamp, timeadd, title, trim, trimprefix, trimspace, trimsuffix, try, upper, urlencode, uuidv4, uuidv5, values, yamldecode, yamlencode, zipmap.
2020-02-06 11:49:21 +01:00
Patrick Ng
e5e5fd1198 Instance Running waiter not aware of global waiter settings 2020-02-05 15:09:09 -08:00
Megan Marsh
8f75fe6e6c
Merge pull request #8696 from alrs/replace-deprecated-seek-set
template: replace deprecated os.SEEK_SET with io.SeekStart
2020-02-05 10:04:19 -08:00
Lars Lehtonen
c6e6220fef
template: replace deprecated os.SEEK_SET with io.SeekStart 2020-02-05 08:56:59 -08:00
Megan Marsh
dde7302265
Merge pull request #8689 from hashicorp/fix_8530
Add iso file name when targetPath is a directory
2020-02-04 13:43:09 -08:00
Moss
f2c8e8491c Fix format 2020-02-04 18:22:43 +01:00
Moss
e020da49f3 Add iso file name when targetPath is absolute 2020-02-04 18:06:47 +01: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
bc11853ecf
Rename method writeSpecField to goFieldToCtyType (#8687) 2020-02-04 16:37:25 +01: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
Wilken Rivera
4f78876754
Merge pull request #8675 from hashicorp/fix_5957
Fix 5957
2020-01-31 15:24:46 -05:00
Megan Marsh
c6dddb75cf
clarify artifice postprocessor wording to make it clear that it will not clean up old artifacts (#8676)
fix #5451
2020-01-31 16:45:18 +01:00
Megan Marsh
3b5780f98c
add jq example for basic manifest parsing (#8677)
fix #5413
2020-01-31 16:43:52 +01:00
Megan Marsh
69fe131571
switch trilean to boolean in docs to prevent confusion (#8673) 2020-01-31 16:42:16 +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
Megan Marsh
de17afbefc switch trilean to boolean in docs to prevent confusion 2020-01-30 14:58:04 -08:00
Wilken Rivera
18f14fc368
Merge pull request #8670 from hashicorp/fix_8619
builder/azure-arm: Set WinRMPassword on the communicator config
2020-01-30 15:37:11 -05:00
Megan Marsh
431b27be1a
Merge pull request #8671 from hashicorp/pp_sharing_info_doc
Add custom-builders sharing info with post-processors doc
2020-01-30 10:42:35 -08:00
Moss
f44eee11b3 Add custom-builders sharing info with post-processors doc 2020-01-30 18:16:55 +01: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
Megan Marsh
f5c58c8e83
fix rcp --> rpc typo (#8665) 2020-01-29 10:49:50 +01:00
Megan Marsh
4b29131d9c
update docs with warning about timestamp drift (#8666) 2020-01-29 10:29:35 +01:00
Megan Marsh
51ec376eab
Merge pull request #8663 from hashicorp/td_gofmt_source
Format code with `gofmt -s -w`
2020-01-28 16:34:24 -08:00
nywilken
d2a9e6b32e Format code with gofmt -s -w 2020-01-28 16:52:50 -05:00
Megan Marsh
817957fe4f
Merge pull request #8616 from hashicorp/packer-plugin-path
add PACKER_PLUGIN_PATH for plugin discovery
2020-01-28 12:09:55 -08: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
Megan Marsh
2cf5c8f0ef
Merge pull request #8659 from hashicorp/update_amznchroot_docs
Add template engine variables doc for amazon-chroot
2020-01-28 08:25:43 -08:00
Moss
7194e92930 Add template engine variables doc for amazon-chroot 2020-01-28 14:58:05 +01:00
Paschalis Tsilias
beca6de71b Add packer.ExpandUser() function to support tilde in usage of config.ValidationKeyPath (#8657) 2020-01-28 14:33:42 +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
Megan Marsh
6eda9504c9 remove second dir 2020-01-27 16:20:59 -08:00
Megan Marsh
69e7d39fd3 add some tests for packer_plugin_path 2020-01-27 16:19:03 -08:00
Megan Marsh
25a61d977d update changelog 2020-01-27 12:00:36 -08:00
Sylvia Moss
328eb8ee96
Interpolate boot_command when defined by user variable (#8640) 2020-01-27 19:10:16 +01:00