packer-cn/builder/amazon/ebssurrogate
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
..
block_device.go Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config 2019-09-20 11:15:44 +02:00
builder.go builder/amazon/step_pre_validate: Add check for non-default VPCs 2019-11-18 16:44:09 -05:00
builder_test.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
root_block_device.go make fmt autogenerated docs 2019-06-06 16:29:25 +02:00
step_register_ami.go ebssurrogate builds didn't keep up with recent optimizations to region encryption in the ebs builder, and that was causing bugs with the common ami region copy step 2019-10-09 16:02:37 -07:00
step_register_ami_test.go Fix formatting by running `make fmt` 2018-03-25 19:51:49 -04:00
step_snapshot_volumes.go add omit_from_artifact option for ebssurragote launch_block_devices 2019-05-10 11:12:11 -07:00