hashicorp / hashicorp/packer-plugin-oracle
oracle-oci builder always fails due to missing key_file argument (#10663 copy)
- Dominant language
- Go
- Stars
- 14
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
_This issue was originally opened by @steve-allied-man as hashicorp/packer#10714. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._
Hey everyone, it's actually a copy of the existing closed issue. https://github.com/hashicorp/packer/issues/10663
I'm facing same issue on Amazon Linux 2.
I've downloaded the latest branch test artifact from your CI, there: https://app.circleci.com/pipelines/github/hashicorp/packer/9446/workflows/a71822b4-8319-425c-a82a-d045bfd043d6/jobs/112981/artifacts
So, executing that binary using direct path
`./packer_linux_amd64 build -debug image-file.json`
Checking the version shows:
```
[root@ip-10-121-131-119 tmp]# ./packer_linux_amd64 version
Packer v1.7.1-dev
```
Error same as was reported:
```
[root@ip-10-121-131-119 tmp]# ./packer_linux_amd64 build -debug image-file.json
Error: Failed to prepare build: "oracle-oci"
1 error(s) occurred:
* 'key_file' must be specified
Debug mode enabled. Builds will not be parallelized.
==> Wait completed after 3 microseconds
==> Builds finished but no artifacts were created.
```
I'm just thinking if I'm not doing something right. Could you advise please?
Was moving cert file here and there, using different permissions, etc..
My json file (reworked real values):
```
{
"builders": [
{
"availability_domain": "{{user `availability_domain`}}",
"base_image_ocid": "{{user `base_image_ocid`}}",
"communicator": "ssh",
"compartment_ocid": "{{user `compartment_ocid`}}",
"fingerprint": "{{user `fingerprint`}}",
"image_name": "oci_linux765_{{timestamp}}",
"key_file": "{{user `key_file`}}",
"region": "{{user `region`}}",
"shape": "{{user `shape`}}",
"ssh_username": "opc",
"subnet_ocid": "{{user `subnet_ocid`}}",
"tenancy_ocid": "{{user `tenancy_ocid`}}",
"type": "oracle-oci",
"user_ocid": "{{user `user_ocid`}}"
}
],
"variables": {
"availability_domain": "IrvI:EU-FRANKFURT-...",
"base_image_ocid": "ocid1.image.oc1...",
"compartment_ocid": "ocid1.compartment.oc1...",
"key_file": "~/.oci/cert.pem",
"fingerprint": "....",
"region": "eu-frankfurt-1",
"shape": "VM.Standard.E3.Flex",
"subnet_ocid": "ocid1.subnet.oc1...",
"tenancy_ocid": "ocid1.tenancy.oc1...",
"user_ocid": "ocid1.user.oc1...."
}
}
```
Thanks
Contributor guide
Assessment
This issue has not been assessed yet.