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
```
* refactor aws get secrets function out to reuse it else where
* add aws_secretsmanager func and docs for HCL2
* fix GetSecret: allow to pick secret version
This changes updates the AWS Secrets manager session authentication
logic to support reading the AWS configuration file for default
credentials and region settings, if they are not provided via
environment variables.
* Modify error output a little to remove stutter "error ... : error ...`
Results before change
```
unset AWS_REGION
⇶ ~/pkg/packer build amazon-ebs_secretsmanager_shell-local.json
template: root:1:3: executing "root" at <aws_secretsmanager `packer/test/keys`
`shell`>: error calling aws_secretsmanager: Error getting secret: MissingRegion:
could not find region configuration
```
Results after change
```
unset AWS_REGION
⇶ ~/pkg/packer build amazon-ebs_secretsmanager_shell-local.json
null: output will be in this color.
==> null: Running local shell script: /tmp/packer-shell721444992
null: powershell
Build 'null' finished after 4 milliseconds 121 microseconds.
==> Wait completed after 4 milliseconds 192 microseconds
==> Builds finished. The artifacts of successful builds are:
```
* Fix typos in comments.
* Add documentation of how to use multiple keys with `aws_secretsmanager` function.
* Move `Client` struct to `secretsmanager.go` file.
* update consul and vault dependencies
* update triton sign call accorting to https://github.com/joyent/triton-go/pull/135
* Delete readme.md
* put back github.com/mitchellh/reflectwalk to v1.0.0 and explain why
* fix/fixer_pp_docker_tag_tags.go: simplify deduplication loop and keep seen/stable order
* Add golangci-lint as linting tool
* Disable failing staticchecks to start; GitHub issue to handle coming soon
* Run `goimports -w` to repair all source files that have improperly
formatted imports
* makefile: Add ci-lint target to run on travis
This change adds a new make target for running golangci-lint on newly
added Go files only. This target is expected to run during Packer ci builds.
* .github/contributing: Add code linting instructions
* travis: Update job configuration to run parallel builds
This commit adds strfttime function in templates to provide conventional format for ISO time based on C standard.
Signed-off-by: psinghal20 <psinghal20@gmail.com>