hashicorp / hashicorp/packer-plugin-amazon

Packer using AWS Profile which has Customzied certificate report LoadCustomCABundleError error

Open
#140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
91
Forks
141
Avg merge
2d 18h
Merged PRs (30d)
3

Description

_This issue was originally opened by @victoronto in https://github.com/hashicorp/packer/issues/11310 and has been migrated to this repository. The original issue description is below._

---
#### Overview of the Issue

Packer using AWS Profile which has Customzied certificate report LoadCustomCABundleError error

#### Reproduction Steps

Refer to the environment and log output section below:

### Packer version

Packer v1.7.6

### Simplified Packer Buildfile

No matter what build file.

### Operating system and Environment details
```
$ uname -a
Linux f70a59901cf6 5.10.47-linuxkit #1 SMP Sat Jul 3 21:51:47 UTC 2021 x86_64 GNU/Linux

$ ls -l ~/.aws/ZscalerRoot.pem
-rwxrwxrwx 1 codespace dialout 1732 Jul 9 18:12 /home/codespace/.aws/ZscalerRoot.pem

$ grep -A2 dxt ~/.aws/config
[profile dxt]
region = eu-west-1
ca_bundle = ~/.aws/ZscalerRoot.pem
```

### Log Fragments and crash.log files
```
$ packer build -var aws_profile=dxt -var source_ami=ami-xxxxxx image.json
2021/10/06 20:55:34 [INFO] Packer version: 1.7.6 [go1.17.1 linux amd64]
2021/10/06 20:55:34 [TRACE] discovering plugins in /usr/bin
...
amazon-ebs: output will be in this color.
2021/10/06 20:55:35 packer-builder-amazon-ebs plugin: [INFO] AWS Auth provider used: "SharedCredentialsProvider"
2021/10/06 20:55:35 [INFO] (telemetry) ending amazon-ebs
caused by: open ~/.aws/ZscalerRoot.pem: no such file or directory
==> Wait completed after 3 milliseconds 836 microseconds
2021/10/06 20:55:35 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2021/10/06 20:55:35 machine readable: amazon-ebs,error []string{"LoadCustomCABundleError: failed to open custom CA bundle PEM file\ncaused by: open ~/.aws/ZscalerRoot.pem: no such file or directory"}
caused by: open ~/.aws/ZscalerRoot.pem: no such file or directory
==> Builds finished but no artifacts were created.
2021/10/06 20:55:35 [INFO] (telemetry) Finalizing.

Build 'amazon-ebs' errored after 3 milliseconds 655 microseconds: LoadCustomCABundleError: failed to open custom CA bundle PEM file
caused by: open ~/.aws/ZscalerRoot.pem: no such file or directory

==> Wait completed after 3 milliseconds 836 microseconds

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: LoadCustomCABundleError: failed to open custom CA bundle PEM file
caused by: open ~/.aws/ZscalerRoot.pem: no such file or directory

==> Builds finished but no artifacts were created.
2021/10/06 20:55:36 waiting for all plugin processes to complete...
2021/10/06 20:55:36 /usr/bin/packer: plugin process exited

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.