Commit Graph

14315 Commits

Author SHA1 Message Date
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
Wilken Rivera 8b482933cf docs/azure-arm: Refactor docs to clear up required options
This changes separates the required configurations options needed when using Azure Marketplace images vs Custom user built Images.
2020-02-10 21:10:07 -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 1f4c9170c6 Update CHANGELOG.md 2020-02-10 17:08:23 -05:00
Wilken Rivera c86c193721
Merge pull request #8718 from treehouseops/nf.bump-middleman-version
Website: bump middleman version
2020-02-10 15:50:17 -05:00
nicolelyn 1a78821ca0 website: bump middleman version 2020-02-10 14:45:58 -05: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
Wilken Rivera 9fe6552f8d
Merge pull request #8711 from hashicorp/td-mapstructure-to-hcl2-formatting
mapstructure-to-hcl2: Update code formatter to use golang/x/tools/imports
2020-02-10 11:02:37 -05: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
Wilken Rivera 8825bf2cd7 go.mod: Add golang.org/x/tools/imports
```
go get golang.org/x/tools/imports
go mod tidy
go mod vendor
```
2020-02-07 14:23:36 -05:00
Wilken Rivera a684fae28f mapstructure-to-hcl2: Update code formatter to use golang/x/tools/imports 2020-02-07 14:15:43 -05: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
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 bfa8b17039 regenerate docs 2020-02-06 17:02:01 -08: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
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