6004 Commits

Author SHA1 Message Date
Megan Marsh
e04eaa89e6 move steps and step configs from packer/common to packer/common/commonsteps 2020-11-13 11:15:04 -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
Megan Marsh
df9febef1b move communicators into sdk-internals directory 2020-11-13 10:44:07 -08:00
Megan Marsh
6871a3a85d
Merge pull request #10250 from Direnol/yandex/change-disk-creation-method
fix(yandex): change disk creation method to manual
2020-11-13 09:28:10 -08:00
Roman Mingazeev
6be26e50e0
Update builder/yandex/config.go
Co-authored-by: GennadySpb <lipenkov@gmail.com>
2020-11-13 17:27:50 +03:00
Roman Mingazeev
5bf03df694 fix fmt 2020-11-13 16:44:15 +03:00
Roman Mingazeev
6a327b1330 add labels for temp disk 2020-11-13 16:35:48 +03:00
Roman Mingazeev
fe9dca4c75 change disk creation method to manual 2020-11-13 16:16:35 +03:00
Megan Marsh
3db40194af version files 2020-11-10 14:48:06 -08:00
Megan Marsh
8ecd16db81 regenerate code 2020-11-10 08:16:59 -08:00
Megan Marsh
1ecd715221 refactor code so that packer/version is not a dependency of sdk code or plugin code 2020-11-09 17:20:42 -08:00
Megan Marsh
2bf912bddf
Merge pull request #10203 from aleksandrserbin/feature/launch-template-tags
amazon-ebs: add tags to launch template
2020-11-09 09:14:02 -08:00
Megan Marsh
88e03280b6
Extract plugin-specific examples to plugin directories (#10228)
* move alicloud examples from common example directory to alicloud builder

* move amazon examples to amazon builder dir

* move examples into ansible provisioner directory

* move azure examples to builder dir

* move hyperone examples into builder directory

* move jdcloud builder examples into builder directory

* move tencent cloud examples into the builder directory

* move ucloud examples into ucloud builder directory
2020-11-09 12:17:41 +01:00
Paul Meyer
5ea90fea5b
Merge pull request #10210 from sumit-kalra/master
[builder/azure-arm] Create keyvaults with SoftDelete enabled
2020-11-06 14:07:41 -08:00
Megan Marsh
efc117fb55
Merge pull request #10218 from hashicorp/clean_plugin_sdk
Clean plugin sdk
2020-11-06 12:35:23 -08:00
Simon Gottschlag
65b7d3b604
Add Azure CLI authentication (#10157)
Adds the ability to use an active `az login` session for authenticating the Azure builder
2020-11-06 14:24:16 -05:00
Megan Marsh
2d90ffe7a4 move GeneratedData struct and PlaceholderMsg to same package under common 2020-11-06 10:45:38 -08:00
Megan Marsh
f13f3d4d5f fix single tag interpolation to allow golang template engine usage 2020-11-05 16:27:53 -08:00
Megan Marsh
7a1680df97
modify a ton of error messages to make them specifically placable. (#10191)
* modify a ton of error messages to make them specifically placable.
* remove specific loglines but keep the specialized error messages

Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
2020-11-05 11:27:07 +01:00
Megan Marsh
45b5f0c2ee move custom http client creation with env proxy args into same package as other network related helpers 2020-11-04 14:51:14 -08:00
Megan Marsh
7b57e28600 move localexec to common/shell-local dir since it is related to shelling out locally 2020-11-04 11:56:46 -08:00
Aleksandr Serbin
a763c8ab02 amazon: validate IOPS only for io volumes 2020-11-04 20:49:04 +01:00
Aleksandr Serbin
09c2620c48 amazon: validate IOPS max and min values 2020-11-04 20:29:09 +01:00
Megan Marsh
23552bfbd7
Merge pull request #10213 from chrisroberts/vagrant-driv-stderr
Return error if ssh-config command fails
2020-11-04 10:39:23 -08:00
Megan Marsh
d8fec2e9e5
move the hyperv-only powershell dependency into the hyperv subdirectory (#10198) 2020-11-04 15:15:43 +01:00
Marin Salinas
8b5e2903b9
feat: add hk endpoint support for osc builder (#10207) 2020-11-04 15:13:37 +01:00
Aleksandr Serbin
0cf9b55c5c amazon-ebs: validate IOPS ratio 2020-11-04 14:37:41 +01:00
Chris Roberts
8248f52ff7 Return error if ssh-config command fails
Update error detection to return an error if the process fails instead
of testing for content in stderr.
2020-11-03 16:20:34 -08:00
Aleksandr Serbin
7cb8af1441 amazon: remove region from state for chroot builder 2020-11-03 22:28:19 +01:00
Aleksandr Serbin
8dab31b548 amazon: use spot tags for launch template tags
- use `spot_tags` instead of `run_tags` for launch template
- move region to `StepRunSpotInstance` from state
2020-11-03 22:16:00 +01:00
js-g
749a1372d2 test (builder/oracle-oci): add config test for LaunchMode 2020-11-03 11:36:11 -05:00
js-g
ba6173b84c fix (builder/oracle-oci): remove subnet from LaunchInstanceDetails
Deprecated use. Use subnet in CreateVnicDetails instead.
2020-11-03 11:35:34 -05:00
js-g
c3ffb3dc22 feat (builder/oracle-oci): add launch mode property to image 2020-11-03 10:33:23 -05:00
Sumit Kalra
2b69a5f496 azure-arm builder: Create keyvaults with SoftDelete enabled 2020-11-02 20:42:55 -08:00
Marin Salinas
f2b386a9d0 feat: add x509 certificate support 2020-11-02 10:04:00 -06:00
Aleksandr Serbin
d561b404d6 amazon-ebs: add tags to launch template 2020-11-01 16:25:43 +01:00
Aleksandr Serbin
4669c0f852 amazon-ebs: log state details on change 2020-10-31 16:00:19 +01:00
Megan Marsh
845a10867e
Merge pull request #10003 from hashicorp/ssm_session_retry
Add retry mechanism to retry SSM session creation
2020-10-29 16:02:54 -07:00
Megan Marsh
72fd763207 fix crash 2020-10-29 14:29:16 -07:00
Rémy Léone
0cfaf4a620 Fix 2020-10-29 17:45:03 +01:00
Wilken Rivera
01d5e5ca76 test/amazon/ebs: Add acceptance test for Session Manager Interface connectivity
Test Results
```
...

2020/10/29 09:35:39 ui:     test: Starting session with SessionId: wilken-00bcfae4d314f54e7
2020/10/29 09:35:40 [DEBUG] TCP connection to SSH ip/port failed: dial tcp [::1]:8047: connect: connection refused
2020/10/29 09:35:40 ui:     test: Port 8047 opened for sessionId wilken-00bcfae4d314f54e7.
2020/10/29 09:35:45 [INFO] Attempting SSH connection to localhost:8047...
2020/10/29 09:35:45 [DEBUG] reconnecting to TCP connection for SSH
2020/10/29 09:35:45 ui:     test: Connection accepted for session wilken-00bcfae4d314f54e7.
2020/10/29 09:35:45 [DEBUG] handshaking with SSH
2020/10/29 09:35:45 [DEBUG] SSH handshake err: ssh: handshake failed: ssh: invalid packet length, packet too large
2020/10/29 09:35:52 [INFO] Attempting SSH connection to localhost:8047...
2020/10/29 09:35:52 [DEBUG] reconnecting to TCP connection for SSH
2020/10/29 09:35:52 [DEBUG] handshaking with SSH
2020/10/29 09:35:52 [DEBUG] handshake complete!
2020/10/29 09:35:52 [DEBUG] Opening new ssh session
2020/10/29 09:35:53 [INFO] agent forwarding enabled
2020/10/29 09:35:53 ui: ==> test: Connected to SSH!
2020/10/29 09:35:53 Running the provision hook
2020/10/29 09:35:53 ui: ==> test: Stopping the source instance...
2020/10/29 09:35:53 ui:     test: Stopping instance
2020/10/29 09:35:54 ui: ==> test: Waiting for the instance to stop...
2020/10/29 09:36:25 ui: ==> test: Creating AMI packer-ssm-test-1603978447 from instance i-0853cb6186a3406d5
2020/10/29 09:36:25 ui:     test: AMI: ami-0868a41bbb2df77b3
2020/10/29 09:36:25 ui: ==> test: Waiting for AMI to become ready...
2020/10/29 09:37:59 ui: ==> test: Terminating the source AWS instance...
2020/10/29 09:37:59 ui error: ==> test: Bad exit status: -1
2020/10/29 09:38:15 ui: ==> test: Cleaning up any extra volumes...
2020/10/29 09:38:15 ui: ==> test: No volumes to clean up, skipping
2020/10/29 09:38:15 ui: ==> test: Deleting temporary security group...
2020/10/29 09:38:16 ui: ==> test: Deleting temporary keypair...
2020/10/29 09:38:16 Deregistering image ID (ami-0868a41bbb2df77b3) from region (us-east-1)
2020/10/29 09:38:17 Deregistered AMI id: ami-0868a41bbb2df77b3
2020/10/29 09:38:17 Deleted snapshot: snap-09602f15994bc9f51
--- PASS: TestBuilderAcc_SessionManagerInterface (249.87s)
PASS

```
2020-10-29 09:39:19 -04:00
Adrien Delorme
aae1992649 remove default PauseBeforeSSM, this will have to be set manually 2020-10-29 13:38:03 +01:00
Adrien Delorme
6c45f04467 Delete ssm_mock_funcs.go 2020-10-29 13:37:44 +01:00
Adrien Delorme
5d06a6e6df rename file correctly 2020-10-29 13:26:09 +01:00
Adrien Delorme
c6e2dd5538 remove unit test file for now, I think that an acceptance test will be easier here 2020-10-29 13:22:17 +01:00
Adrien Delorme
a4bd744955 simplify things a bit more 2020-10-29 13:11:07 +01:00
Adrien Delorme
aef3d24213 Update step_create_ssm_tunnel.go 2020-10-29 12:31:01 +01:00
Adrien Delorme
f329cb5b93 simplify code 2020-10-29 12:18:41 +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
Adrien Delorme
8e355d0fe7 Move ssm code to its own ssm package and make it singlethreaded 2020-10-29 11:57:29 +01:00