16482 Commits

Author SHA1 Message Date
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
Megan Marsh
61b9015415
Merge pull request #10206 from hashicorp/azr_variable_validation
HCL2: add variable validation
2020-11-04 10:46:17 -08: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
Adrien Delorme
addd2da101 add can examples 2020-11-04 15:44:21 +01: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
Adrien Delorme
73caad492c Update custom-validation.mdx
add complex example
2020-11-04 13:31:45 +01:00
Adrien Delorme
fd873b8811 Referenceable: explain a bit more of the whys 2020-11-04 13:21:41 +01:00
Adrien Delorme
10eb32d29e require less English 2020-11-04 13:13:45 +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
Megan Marsh
9ec55d3cd7 update changelog 2020-11-02 15:19:31 -08:00
Megan Marsh
b7c6712874
Merge pull request #10197 from hashicorp/dependabot/npm_and_yarn/website/bl-1.2.3
Bump bl from 1.2.2 to 1.2.3 in /website
2020-11-02 09:23:18 -08:00
Megan Marsh
4aa143a429
Merge pull request #10188 from Direnol/yandex/check-access-to-specific-bucket
verifying the access to a specific bucket
2020-11-02 09:21:27 -08:00
Megan Marsh
0bb110ddb3
Merge pull request #10161 from marinsalinas/x509cert
feat: OSC: add x509 certificate support
2020-11-02 09:20:15 -08:00
Adrien Delorme
2987d25335 simplify tests 2020-11-02 17:52:19 +01:00
Adrien Delorme
20b7fd9687 add hcl2template/addrs/doc.go 2020-11-02 17:48:29 +01:00
Adrien Delorme
971254928a various fixes 2020-11-02 17:43:21 +01:00
Adrien Delorme
d919fc28ab add doc 2020-11-02 17:20:46 +01:00
Marin Salinas
378dae4a8d chore: add x509 configuration description to website 2020-11-02 10:04:00 -06:00
Marin Salinas
f2b386a9d0 feat: add x509 certificate support 2020-11-02 10:04:00 -06:00
Adrien Delorme
88175873e5 fix tests to actually check cty values & types 2020-11-02 17:03:38 +01:00
Adrien Delorme
6dd06fad14 add command/ tests 2020-11-02 15:50:38 +01:00
Adrien Delorme
6911495fc4 add VariableAssignment struct that help describe an input var assignment 2020-11-02 15:22:29 +01:00
packer-ci
a64d3baf8e Putting source back into Dev Mode 2020-10-30 20:35:50 +00:00
dependabot[bot]
e11a305707
Bump bl from 1.2.2 to 1.2.3 in /website
Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-30 20:23:21 +00:00
packer-ci
945908fd74
Cut version 1.6.5 v1.6.5 2020-10-30 19:31:47 +00:00
packer-ci
40d60af00a cut version 1.6.5 2020-10-30 19:31:46 +00:00
packer-ci
c3b3675d65 update changelog 2020-10-30 19:31:46 +00:00
Megan Marsh
d39dffc573
Merge pull request #10196 from hashicorp/b-aws_secretsmanager-stage-override-issue
Fix issue with AWS secrets manager override default stage
2020-10-30 11:35:37 -07:00
Wilken Rivera
50211622b2 Update documenation for HCL enables aws_secretsmanager function 2020-10-30 14:18:17 -04:00
Wilken Rivera
bbb6754367 Fix issue with AWS secrets manager override default stage
Before change
```
⇶  packer build amazon-ebs_secretsmanager_shell-local.json
Error:
template: root:1:3: executing "root" at <aws_secretsmanager `packer/test/keys`

`shell`>: error calling aws_secretsmanager: ResourceNotFoundException: Secrets
Manager can't find the specified secret value for staging label: shell

2020/10/30 12:53:40 [INFO] (telemetry) Finalizing.
template: root:1:3: executing "root" at <aws_secretsmanager `packer/test/keys`
`shell`>: error calling aws_secretsmanager: ResourceNotFoundException: Secrets
Manager can't find the specified secret value for staging label: shell

⇶  packer build amazon-ebs_secretsmanager_shell-local.json.pkr.hcl
Error: Error in function call

  on amazon-ebs_secretsmanager_shell-local.json.pkr.hcl line 28:
  (source code not available)

Call to function "aws_secretsmanager" failed: ResourceNotFoundException: Secrets
Manager can't find the specified secret value for staging label: home.

```

After change
```
⇶  packer.test build amazon-ebs_secretsmanager_shell-local.json
null: output will be in this color.

==> null: Running local shell script: /tmp/packer-shell463393820
    null: boo
    null: keys:powershell
Build 'null' finished after 8 milliseconds 225 microseconds.

==> Wait completed after 8 milliseconds 319 microseconds

==> Builds finished. The artifacts of successful builds are:
--> null: Did not export anything. This is the null builder

⇶  packer.test build amazon-ebs_secretsmanager_shell-local.json.pkr.hcl
null.autogenerated_1: output will be in this color.

==> null.autogenerated_1: Running local shell script: /tmp/packer-shell834410761
    null.autogenerated_1: boo
    null.autogenerated_1: keys:powershell
Build 'null.autogenerated_1' finished after 18 milliseconds 834 microseconds.

==> Wait completed after 18 milliseconds 954 microseconds

==> Builds finished. The artifacts of successful builds are:
--> null.autogenerated_1: Did not export anything. This is the null builder

```
2020-10-30 13:17:38 -04:00
Adrien Delorme
8de2f40a07 add tests for length 2020-10-30 15:42:59 +01:00
Adrien Delorme
b892414e84 add failing test case 2020-10-30 15:40:31 +01:00
Adrien Delorme
9932fd1217 add Variable.validateValue func 2020-10-30 15:38:29 +01:00
Adrien Delorme
4d386dd806 add length function that can work with more types 2020-10-30 15:36:23 +01:00
Adrien Delorme
4e08ea6a92 add a test 2020-10-30 12:41:29 +01:00
Adrien Delorme
91d7332471 add basic code for variable validation parsing
* hcl2template/addrs.ParseRef will parse a reference and tell for example if we
  are referring to a variable and its name, for now it can only do that and in
  the future it improved when we need to most of it is from the TF code. This
  is used to tell wether a variable vas referenced in a variable validation
  condition; for now.
* Added Validations blocks to the hcl2 Variable struct and code to
  parse/validate that.
2020-10-30 12:26:22 +01:00
Roman Mingazeev
3fc185924d fix delete access key 2020-10-30 12:20:10 +03:00
Megan Marsh
7105b5bbcc update changelog 2020-10-29 16:05:23 -07: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
858f49e91e update changelog 2020-10-29 15:45:56 -07:00
Megan Marsh
887a791f35
Merge pull request #10192 from hashicorp/fix_azure_crash
fix crash
2020-10-29 14:58:01 -07:00
Megan Marsh
72fd763207 fix crash 2020-10-29 14:29:16 -07:00
Megan Marsh
54fbc26968
Merge pull request #10190 from hashicorp/use-docker-mirror
Use docker mirror
2020-10-29 13:01:45 -07:00
Michele
54786d8c2e Use docker mirror 2020-10-29 11:05:41 -07:00
Roman Mingazeev
7ab2866d5c verifying the access to a specific bucket 2020-10-29 20:53:04 +03: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