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

No support for regional subnet #23

Closed cosmindev closed 3 years ago

cosmindev commented 5 years ago

Issue: This module does not work for regional subnets - as it tries to read the AD for the instance from the provided subnet.

Error: When trying to use regional subnets you'll get the following error: " module.instance.oci_core_instance.this: Resource 'data.oci_core_subnet.this' does not have attribute 'availability_domain' for variable 'data.oci_core_subnet.this..availability_domain'"

Location: The issue is generated at line 16:

availability_domain = "${data.oci_core_subnet.this.*.availability_domain[count.index % length(data.oci_core_subnet.this.*.availability_domain)]}"

in the file: /terraform-oci-compute-instance/main.tf

Suggested fix:

lucianf commented 4 years ago

+1, the module is unusable with regional subnets (which are the recommended practice) in its current state.

kral2 commented 3 years ago

fixed in v2.0.4 a3147d7b2de44842f8b5181e410071953956d811