oracle/terraform-examples

URGENT PROBLEM: OCI CLIENT: Terraform failing RHEL7.4 Image issue - OCI customer urgent

harrygulati2006 opened this issue · 3 comments

Hi

We are an OCI customer and we are facing issues with the Rhel terraform template.

This is the initial warning that is coming using terraform plan and terraform apply.

Warning: oci_core_instance.ipxe_node: "image": [DEPRECATED] The 'image' field has been deprecated. Please use 'source_details' instead. If both fields are specified, then 'source_details' will be used.

This took more then 2 min:-
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

null_resource.delete_ipxe_destroy: Refreshing state... (ID: 8327305802577394881)
data.external.ipxe_gen: Refreshing state...
data.oci_identity_compartments.compartment: Refreshing state...
data.oci_identity_availability_domains.ad: Refreshing state...
data.oci_core_virtual_networks.vcn: Refreshing state...


This is the error that we are stuck at and not able to create Image:-

data.oci_core_virtual_networks.vcn: Refreshing state...

Error: Error applying plan:
1 error(s) occurred:

  • data.oci_core_subnets.subnet: Resource 'data.oci_core_virtual_networks.vcn' not found for variable 'data.oci_core_virtual_networks.vcn.virtual_networks.0.id'

We have already have an SR created for this and looking to fix this as soon as possible.

@harrygulati2006 The error that you list would occur if the GET (LIST) call failed on virtual networks that did not pull this information, hence the resource is missing from the state and cannot be referenced.

Can you share the following information:

  1. What version of the OCI provider and Terraform you are using?
  2. Add following env variables to get additional logging to see why the GET failed on the virtual_networks resource?
export TF_LOG=DEBUG
export OCI_GO_SDK_DEBUG=1
export TF_LOG_PATH=./terraform-output.log
  1. What modifications you have done on the stock example? And when did it start regressing. This could be a permissions or a policy issue as well. What happened on retry?

FYI @scross01 - Please chime in if you have any other info regarding this example and pre-requisites that need to exist.

Closing, since there has been no response for some time. Please reopen if this is still an issue.