oracle-quickstart / oci-arch-wordpress-mds

Universal Permissive License v1.0
14 stars 9 forks source link

terraform plan fails #5

Closed kalju closed 3 years ago

kalju commented 3 years ago

Hi,

Terraform plan job fails with error:

Error: Invalid index on wordpress.tf line 34, in resource "oci_core_instance" "WordPress" 34: source_id = data.oci_core_images.InstanceImageOCID.images[0].id |---------------- | data.oci_core_images.InstanceImageOCID.images is empty list of object The given key does not identify an element in this collection value.

Fails with "Deploy to Oracle Cloud" button. It fails at two tenancies (Frankfurt) tested.

lfeldman commented 3 years ago

Hi @kalju,

Thanks for testing and feedback. :) Today I have tested the latest release 1.1 with terraform plan and it works fine in FRA region. Could you please deploy the latest release? It is based on OL8.3.

Best,

Luke

kalju commented 3 years ago

Hi @lfeldman

Was testing with oci-wordpress-micro @ FRA

First test with uploaded ssh pub key: Plan OK Apply results with error: Error: timeout - last error: SSH authentication failed (opc@:22): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Second test with auto generated public key Plan OK Apply OK

Best, Kalju

lfeldman commented 3 years ago

@jeevanjoseph could you please take a look at the micro-deployment part. Looks like there is an issue with uploading the customer SSH public key.

jeevanjoseph commented 3 years ago

@kalju - what format was the key you used in ? Or how was the key generated ? The error indicates that the the ssh connection failed - the likely reason for this is the key format or typos when you pasted your public key.

kalju commented 3 years ago

@jeevanjoseph ssh-rsa format created on my mac with usual ssh-keygen -t rsa command. Tried both copy-paste as well as attaching as .pub file. Received same error. I'm using same key at home setup as well as with OCI so I doubt it's the key format issue.

jeevanjoseph commented 3 years ago

Got it - I’ll update after I run some more tests .

jeevanjoseph commented 3 years ago

@kalju - Yes you are right - I found the issue and PR #6 should fix it. This introduces a change that will let you specify multiple SSH keys while provisioning, and terraform will add self generated one as well to the list. This allows for post install tasks to run and can potentially be removed after bootstrap

kalju commented 3 years ago

Hi @jeevanjoseph Just tested with oci-wordpress-micro @ FRA with uploaded ssh key

Still receiving same error Error: timeout - last error: SSH authentication failed (opc@152.70.172.5:22): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

jeevanjoseph commented 3 years ago

@kalju - Sorry I was updating you of the code fix - the release had not been updated. Its updated now and you should be able to test and verify :

Deploy to Oracle Cloud

kalju commented 3 years ago

@jeevanjoseph Verified - works as expected Thanks!