oracle-terraform-modules / terraform-oci-compute-instance

Terraform Module for creating Oracle Cloud Infrastructure compute instances
https://registry.terraform.io/modules/oracle-terraform-modules/compute-instance/oci/latest
Other
46 stars 62 forks source link

The list of compute shapes is always built on availability domain 1 and may not be valid on other ADs #87

Closed snafuz closed 2 years ago

snafuz commented 2 years ago

The data source ad1 for compute shapes is always created on AD1. If the variable ad_number points to a different availability domain, the list may not contain the actual set of shapes available in the selected availability domain.

To have consistent behavior, the data source should be built on the actual var.ad_number

Community Note

Terraform Version and Provider Version

Terraform v1.1.3 on linux_amd64

Affected Resource(s)

data.oci_core_shapes.ad1

Expected Behavior

Should provide the list of shapes actually available on the selected availability domain (var.ad_number)

Actual Behavior

Always return the list of available shapes for the availability domain 1

Steps to Reproduce

A common scenario to test this error is on Free Trials with a 3-ADs home region and Always Free eligible AD != 1.