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

add validation memory quantity for Flex shapes #62

Open kral2 opened 3 years ago

kral2 commented 3 years ago

Community Note

Description

Flex shapes requires a minimum ratio of 1:1 for cpu:ram, e.g you cannot have memory quantify smaller than ocpu count.

Instead of having the module user enter wrong values and get an API error that needs to be interpreted, we can detect this misconfiguration before hitting the API and return a meaningful message to the customer.

This can saved lot of provisioning time if instance module is part of a more larger configuration and is not provisioned first.

New or Affected Resource(s)

oci_core_instance and the associated Input Variable: var.instance_flex_memory_in_gbs

Potential Terraform Configuration

No initial implementation mock-up yet.

# Copy-paste any Terraform configurations for how the requested feature may be used. 

References

https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm#flexible