Issues on GitHub are intended to be related to bugs or feature requests, so we
recommend using our other community resources instead of asking here if you
have a question.
provisioner "shell" {
inline = ["echo Configuration is going to Start",
"sudo yum install bind-utils"
]
}
}
When I run packer build I am getting the below error. Packer version 1.7.4
PS C:\Users\Anandkumar\OneDrive - Personal\Hashicorp Examples\Packer> packer build .\build.pkr.hcl
oracle-oci.example: output will be in this color.
==> oracle-oci.example: Creating temporary ssh key for instance...
==> oracle-oci.example: Creating instance...
==> oracle-oci.example: Problem creating instance: Service error:NotAuthorizedOrNotFound. Authorization failed or requested resource not found.. http status code: 404. Opc request id: 50dfe82afe71836965e6b7d29cf89f9a/4B6825337CBA98FF424BED9DB7AAC466/D068EFB76A5CBE95E943B0DE186F9985
Build 'oracle-oci.example' errored after 2 seconds 126 milliseconds: Problem creating instance: Service error:NotAuthorizedOrNotFound. Authorization failed or requested resource not found.. http status code: 404. Opc request id: 50dfe82afe71836965e6b7d29cf89f9a/4B6825337CBA98FF424BED9DB7AAC466/D068EFB76A5CBE95E943B0DE186F9985
==> Wait completed after 2 seconds 126 milliseconds
==> Some builds didn't complete successfully and had errors:
--> oracle-oci.example: Problem creating instance: Service error:NotAuthorizedOrNotFound. Authorization failed or requested resource not found.. http status code: 404. Opc request id: 50dfe82afe71836965e6b7d29cf89f9a/4B6825337CBA98FF424BED9DB7AAC466/D068EFB76A5CBE95E943B0DE186F9985
==> Builds finished but no artifacts were created.
PS C:\Users\Anandkumar\OneDrive - Personal\Hashicorp Examples\Packer>
I am able to run OCI CLI commands from windows command prompt without any issues. I am not getting why its not getting authenticated using confi file when running packer build command.
Issues on GitHub are intended to be related to bugs or feature requests, so we recommend using our other community resources instead of asking here if you have a question.
I have written below packer configuration file
source "oracle-oci" "example" { availability_domain = "fGpl:US-ASHBURN-AD-1" base_image_ocid = "ocid1.image.oc1.iad.aaaaaaaas2dadadadadsadtjobv2pgprzvsvdttho3a" image_name = "OCI-Custom-Image" shape = "VM.Standard2.1" ssh_username = "opc" access_cfg_file = "C:\Users\Anandkumar\.oci\config" subnet_ocid = "ocid1.subnet.oc1.iad.aaaaaaaafonrdwsc6zvaswtwq4dsmilsx67d6q" }
build { sources = ["source.oracle-oci.example"]
provisioner "shell" { inline = ["echo Configuration is going to Start", "sudo yum install bind-utils" ] } }
When I run packer build I am getting the below error. Packer version 1.7.4
PS C:\Users\Anandkumar\OneDrive - Personal\Hashicorp Examples\Packer> packer build .\build.pkr.hcl oracle-oci.example: output will be in this color.
==> oracle-oci.example: Creating temporary ssh key for instance... ==> oracle-oci.example: Creating instance... ==> oracle-oci.example: Problem creating instance: Service error:NotAuthorizedOrNotFound. Authorization failed or requested resource not found.. http status code: 404. Opc request id: 50dfe82afe71836965e6b7d29cf89f9a/4B6825337CBA98FF424BED9DB7AAC466/D068EFB76A5CBE95E943B0DE186F9985 Build 'oracle-oci.example' errored after 2 seconds 126 milliseconds: Problem creating instance: Service error:NotAuthorizedOrNotFound. Authorization failed or requested resource not found.. http status code: 404. Opc request id: 50dfe82afe71836965e6b7d29cf89f9a/4B6825337CBA98FF424BED9DB7AAC466/D068EFB76A5CBE95E943B0DE186F9985
==> Wait completed after 2 seconds 126 milliseconds
==> Some builds didn't complete successfully and had errors: --> oracle-oci.example: Problem creating instance: Service error:NotAuthorizedOrNotFound. Authorization failed or requested resource not found.. http status code: 404. Opc request id: 50dfe82afe71836965e6b7d29cf89f9a/4B6825337CBA98FF424BED9DB7AAC466/D068EFB76A5CBE95E943B0DE186F9985
==> Builds finished but no artifacts were created. PS C:\Users\Anandkumar\OneDrive - Personal\Hashicorp Examples\Packer>
I am able to run OCI CLI commands from windows command prompt without any issues. I am not getting why its not getting authenticated using confi file when running packer build command.