packer-cn/template/interpolate
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
..
aws/secretsmanager Fix issue with AWS secrets manager override default stage 2020-10-30 13:17:38 -04:00
funcs.go Add HCL2 aws_secretsmanager function (#10124) 2020-10-20 16:21:40 +02:00
funcs_test.go execute_command in powershell wasn't interpolating build vars properly (#8771) 2020-03-02 04:20:32 -05:00
i.go Add golangci-lint to project (#8686) 2020-02-14 11:42:29 -05:00
i_test.go template/interpolate: basic + some funcs 2015-05-15 21:05:47 -07:00
parse.go template/interpolate: basic + some funcs 2015-05-15 21:05:47 -07:00
parse_test.go run gofmt 2016-11-01 14:08:04 -07:00
render.go Render variables one time on prepare method (#8727) 2020-02-13 17:35:23 +01:00
render_test.go update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00