Megan Marsh
3c346867f4
fix nil pointer dereference
2020-12-07 15:45:16 -08:00
Megan Marsh
39354f64e5
move helper/communicator dir into packer-plugin-sdk
...
fix imports; fix website and generated partials
2020-12-02 08:41:32 -08:00
Megan Marsh
001886670d
move Ui definition into the packer plugin sdk.
2020-11-30 14:26:54 -08:00
Megan Marsh
f4041ee4d0
Merge pull request #10200 from aleksandrserbin/feature/describe-instance-on-fail
...
amazon-ebs: log state details on change
2020-11-20 15:31:40 -08:00
Megan Marsh
3f6deb8828
move multistep into the plugin sdk
2020-11-17 16:31:03 -08:00
Megan Marsh
7d658149ea
update tests and website and generated partials to reflect new package format
2020-11-17 10:36:01 -08:00
Megan Marsh
6402362018
create packer-plugin-sdk directory and begin moving the relevant folders into it.
2020-11-13 10:47:36 -08:00
Aleksandr Serbin
4669c0f852
amazon-ebs: log state details on change
2020-10-31 16:00:19 +01:00
Adrien Delorme
b058de072a
move packer/builder/amazon/common.IsAWSErr to builder/amazon/common/awserrors.Matches
...
to avoid cyclic dependency issues
2020-10-29 12:02:41 +01:00
Evan Pipho
6967e02103
Add support for source instance tenancy to amazon builders
2020-10-16 21:43:22 +00:00
sylviamoss
788dc32598
add aws_polling config option to override env variables
2020-08-17 17:15:32 +02:00
Megan Marsh
a56942d3c7
change isAwsErr to an exported func so I can use it in other aws modules.
2020-07-21 15:30:45 -07:00
Adrien Delorme
d532bb376c
wip
2020-03-16 17:47:44 +01:00
Patrick Ng
e5e5fd1198
Instance Running waiter not aware of global waiter settings
2020-02-05 15:09:09 -08:00
Megan Marsh
84063d2132
implement ID and Type values in the provisioner template info sharing
2019-12-13 11:57:01 -08:00
Moss
4516978555
Fix request retry mechanism to run aws instance
2019-11-29 18:11:10 +01:00
Megan Marsh
67c3373107
enable no_ephemeral for spot devices, clean up ranging behavior, update docs
2019-11-21 12:46:31 -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
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
nywilken
488e539f63
builder/amazon: Add helper function for checking against AWSError
...
Replace all straight forward occurrences of `if err, ok := err.(awserr.Error)` with the `isAWSErr` helper function
2019-11-12 15:27:47 -05:00
cove
2898d66812
retry runinstances aws api that wasn't retried and could fail
2019-11-06 14:06:35 -08:00
Bernard Baltrusaitis
8b83cca064
adding temporary instance profile document policy
2019-10-19 20:56:18 +11:00
Adrien Delorme
07e97e26de
step_run_source_instance.go: make sure we use the right ShouldRetry error
2019-09-27 12:57:55 +02:00
Megan Marsh
e47059aaca
put retry around describeinstances call in amazon
2019-09-26 14:49:28 -07:00
Adrien Delorme
dcc22df609
aws: move the OmitFromArtifact field in ebssurrogat where it's being used
...
also, simplified a bit the usage of block device
2019-06-18 16:04:12 +02:00
Adrien Delorme
c696878d2e
aws block devices mapping: BlockDevices.Build -> BuildEC2BlockDeviceMappings()
2019-06-18 12:44:24 +02:00
Adrien Delorme
ff2e0298ba
simplify block devices utilisation by removing intermediary types
2019-06-18 12:37:47 +02:00
Adrien Delorme
d72040f4fa
move retry code into the common/retry pkg and make retry context aware
2019-04-09 17:46:38 +02:00
Adrien Delorme
e02d0dacc4
Merge branch 'master' into aws-filters
2018-09-07 16:14:00 +02:00
Adrien Delorme
0938b640cc
use key pair name from config
2018-08-29 14:40:33 +02:00
Rickard von Essen
533967cb66
builder/amazon: Add suppport for security_group_filter
...
Allow selecting SG's using a filter. Also some cleanup of vpc_filter and
subnet_filter.
2018-08-24 12:42:38 +02:00
Rickard von Essen
9840862757
builder/amazon: Add suppport for vpc_filter and subnet_filter
...
First step of adding support for discovering VPC's and Subnets using
filters.
2018-08-23 12:52:03 +02:00
Megan Marsh
f49a2d8aed
move UI call to before the wait; add context to these steps
2018-07-11 10:36:21 -07:00
Megan Marsh
cf63dd10bf
replace AMIStateRefreshFunc, InstanceStateRefreshFunc, our spot instance waiter, our chroot volume waiter, and our snapshot waiters with waiters form AWS's SDK.
2018-07-11 10:34:20 -07:00
DanHam
6fc68754d7
Allow use of T2 unlimited by adding appropriate request for the instance
2018-05-15 12:25:06 +01:00
Matthew Hooker
cbdf9db832
Use contexts with amazon waiters.
2018-04-23 12:57:15 -07:00
ADO
507b3619e7
Expose more source ami data in the template
2018-03-30 10:47:11 +02:00
Matthew Hooker
21812fa17f
Add volume and run tags if in us-gov/china
...
We can't tag on instance creation when we're in "restricted" regions,
so let's add the tags after the resources have been created.
Adds methods to AccessConfig to detect if we're in China or US Gov
regions (i.e. "restricted").
Also turns tag:tag maps into a type, and moves methods around validating
and converting them to ec2Tags to methods of the type.
2018-02-05 16:39:20 -08:00
Matthew Hooker
eafda52411
use amazon steps from master
2018-01-24 17:09:18 -08:00
Matthew Hooker
a831d522be
change run signatures
...
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.
`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker
a0c625ea44
Revert "working with opt-in"
...
This reverts commit 4068ffdaf541354e75507add7ca0b193993fcd52.
2018-01-24 17:09:16 -08:00
Matthew Hooker
e98f201602
working with opt-in
2018-01-24 17:09:16 -08:00
Matthew Hooker
366dc3da0a
move multistep imports to helper.
...
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Matthew Hooker
807e88245b
trying to add context to state bag
2018-01-24 17:09:15 -08:00
Matthew Hooker
f5ea1e8312
Use WaitUntilInstanceReady waiter
2018-01-10 15:57:31 -08:00
Matthew Hooker
a90c45d9bb
Wait until source instance OK before continuing
2017-12-07 12:31:50 -08:00
Mark Meyer
2661fd7869
Move building of spot instances into its own step
2017-10-04 12:38:21 +02:00
Mark Meyer
939b44b4fd
Add logic to handle volumes of spot instances
2017-10-03 01:03:21 +02:00
Mark Meyer
cfd6b6fed5
Change EBS builder to do tag-on-creation
...
The EBS builder will now use the tag-on-creation pattern, so
that it's possible to restrict packer to only create volumes that are
properly tagged by using an AWS policy.
2017-10-03 00:13:02 +02:00
Matthew Hooker
754c80d217
create default tags as well
2017-08-11 12:31:05 -07:00