Closed
Description
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:
- Add availability_domain as a input parameter
- Use this parameter to set the AD for the instance