Open charlesomer opened 1 year ago
Terraform v1.5.6 on darwin_amd64 + provider registry.terraform.io/oracle/oci v5.11.0
oci_core_instance
module "instance" { source = "oracle-terraform-modules/compute-instance/oci" instance_count = 1 compartment_ocid = var.compartment_id shape = "VM.Standard.A1.Flex" source_ocid = lookup(data.oci_core_images.ampere_ubuntu_images.images[0], "id") subnet_ocids = [var.subnet_id] ssh_authorized_keys = "~/.ssh/id_rsa.pub" instance_flex_memory_in_gbs = 6 instance_flex_ocpus = 1 }
Be able to specify a region separately to the provider config.
Uses region of provider at the time the instance was created even if changed later on.
terraform apply
Or just try to specify a different region than the provider. Apologies if this is already possible somehow and I've missed it!
Did you update the subnet ocid, so it matches something that exists in the new region? Also, is the data source refreshed first to target the image's new OCID for the new region?
Community Note
Terraform Version and Provider Version
Affected Resource(s)
oci_core_instance
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Be able to specify a region separately to the provider config.
Actual Behavior
Uses region of provider at the time the instance was created even if changed later on.
Steps to Reproduce
terraform apply
to create an instance.terraform apply
Or just try to specify a different region than the provider. Apologies if this is already possible somehow and I've missed it!
Important Factoids
References