Merge pull request #8571 from hashicorp/fix_8565

fix ssh interface docs for amazon builders
This commit is contained in:
Megan Marsh 2020-01-06 14:34:40 -08:00 committed by GitHub
commit b7ee807cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 8 deletions

View File

@ -377,8 +377,20 @@ type RunConfig struct {
WindowsPasswordTimeout time.Duration `mapstructure:"windows_password_timeout" required:"false"`
// Communicator settings
Comm communicator.Config `mapstructure:",squash"`
SSHInterface string `mapstructure:"ssh_interface"`
Comm communicator.Config `mapstructure:",squash"`
// One of `public_ip`, `private_ip`, `public_dns`, or `private_dns`. If
// set, either the public IP address, private IP address, public DNS name
// or private DNS name will be used as the host for SSH. The default behaviour
// if inside a VPC is to use the public IP address if available, otherwise
// the private IP address will be used. If not in a VPC the public DNS name
// will be used. Also works for WinRM.
//
// Where Packer is configured for an outbound proxy but WinRM traffic
// should be direct, `ssh_interface` must be set to `private_dns` and
// `<region>.compute.internal` included in the `NO_PROXY` environment
// variable.
SSHInterface string `mapstructure:"ssh_interface"`
}
func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {

View File

@ -82,7 +82,7 @@ Block devices can be nested in the
<%= partial "partials/builder/amazon/common/BlockDevice" %>
#### Optional only for [launch_block_device_mappings](#launch_block_device_mappings)
#### Optional only for [launch_block_device_mappings](#launch_block_device_mappings)
<%= partial "partials/builder/amazon/ebssurrogate/BlockDevice-not-required" %>
@ -97,7 +97,6 @@ Block devices can be nested in the
<%= partial "partials/helper/communicator/Config-not-required" %>
<%= partial "partials/helper/communicator/SSH-not-required" %>
<%= partial "partials/helper/communicator/SSHInterface-not-required" %>
## Basic Example

View File

@ -99,7 +99,6 @@ Block devices can be nested in the
<%= partial "partials/helper/communicator/Config-not-required" %>
<%= partial "partials/helper/communicator/SSH-not-required" %>
<%= partial "partials/helper/communicator/SSHInterface-not-required" %>
## Basic Example

View File

@ -95,7 +95,7 @@ necessary for this build to succeed and can be found further down the page.
### Block Devices Configuration
Block devices can be nested in the
[ami_block_device_mappings](#ami_block_device_mappings) or the
[ami_block_device_mappings](#ami_block_device_mappings) or the
[launch_block_device_mappings](#launch_block_device_mappings) array.
<%= partial "partials/builder/amazon/common/BlockDevice" %>
@ -110,7 +110,6 @@ Block devices can be nested in the
<%= partial "partials/helper/communicator/Config-not-required" %>
<%= partial "partials/helper/communicator/SSH-not-required" %>
<%= partial "partials/helper/communicator/SSHInterface-not-required" %>
## Basic Example

View File

@ -285,4 +285,15 @@
password for Windows instances. Defaults to 20 minutes. Example value:
10m
- `ssh_interface` (string) - SSH Interface
- `ssh_interface` (string) - One of `public_ip`, `private_ip`, `public_dns`, or `private_dns`. If
set, either the public IP address, private IP address, public DNS name
or private DNS name will be used as the host for SSH. The default behaviour
if inside a VPC is to use the public IP address if available, otherwise
the private IP address will be used. If not in a VPC the public DNS name
will be used. Also works for WinRM.
Where Packer is configured for an outbound proxy but WinRM traffic
should be direct, `ssh_interface` must be set to `private_dns` and
`<region>.compute.internal` included in the `NO_PROXY` environment
variable.