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

provisioning error when bustable instance parameter `baseline_ocpu_utilization` is used with incompatible shapes

kral2 opened this issue ยท 0 comments

kral2 commented

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version and Provider Version

Terraform v1.1.4
+ provider registry.terraform.io/hashicorp/oci v4.61.0

Affected Resource(s)

oci_core_instance

When setting baseline_ocpu_utilization value to something different than "BASELINE_1_1", if the shape designated by var.shape is not comaptible with subcore feature, it produce an error.

Currently, only E3 shapes are compatible with this feature.

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file.
# Please remove any sensitive information from configuration files before sharing them.

Debug Output

 Error: 404-NotAuthorizedOrNotFound
โ”‚ Provider version: 4.61.0, released on 2022-01-26.
โ”‚ Service: Core Instance
โ”‚ Error Message: shape VM.Standard.E4.Flex not found
โ”‚ OPC request ID: 24459ddc9f9a6078...
โ”‚ Suggestion: Either the resource has been deleted or service Core Instance need policy to access this resource. Policy reference: https://docs.oracle.com/en-us/iaas/Content/Identity/Reference/policyreference.htm
โ”‚
โ”‚
โ”‚   with module.instance_compute.oci_core_instance.instance[1],
โ”‚   on .terraform/modules/instance_compute/main.tf line 67, in resource "oci_core_instance" "instance":
โ”‚   67: resource "oci_core_instance" "instance" {

Panic Output

N/A

Expected Behavior

update compute instance baseline_ocpu_utilization

Actual Behavior

error preventing to update the shape to the desired state.

Steps to Reproduce

  1. set baseline_ocpu_utilization to "BASELINE_1_2" or "BASELINE_1_8" with var.shape="VM.Standard.E4.Flex"
  2. terraform apply

Important Factoids

As this feature is only supported for specific shapes, and the error message produced by the provider is not clear enough, we should test the shape compatibility and prevent its misuse.

References