Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shape is not valid for image when it is available via the UI #101

Open
codex70 opened this issue Oct 7, 2022 · 1 comment
Open

Shape is not valid for image when it is available via the UI #101

codex70 opened this issue Oct 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@codex70
Copy link

codex70 commented Oct 7, 2022

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

Affected Resource(s)

Deploying an instance with Windows operating system and Server 2019 Standard os version.

Terraform Configuration Files

module "instance" {
  source = "oracle-terraform-modules/compute-instance/oci"
  instance_count             = 1 # how many instances do you want?
  ad_number                  = 1 # AD number to provision instances. If null, instances are provisionned in a rolling manner starting with AD1
  compartment_ocid           = var.compartment_id
  instance_display_name      = var.instance_display_name
  source_ocid                = var.image_id
  subnet_ocids               = [var.subnet_id]
  source_type                 = var.source_type
  instance_flex_memory_in_gbs = lookup(var.shape, "memory", 2)                    # only used if shape is Flex type
  instance_flex_ocpus         = lookup(var.shape, "ocpus", 1)                               # only used if shape is Flex type
  baseline_ocpu_utilization   = var.baseline_ocpu_utilization
  cloud_agent_plugins = {
    autonomous_linux       = "ENABLED"
    bastion                = "ENABLED"
    vulnerability_scanning = "ENABLED"
    osms                   = "ENABLED"
    management             = "DISABLED"
    custom_logs            = "ENABLED"
    run_command            = "ENABLED"
    monitoring             = "ENABLED"
    block_volume_mgmt      = "DISABLED"
  }
  public_ip                  = var.public_ip # NONE, RESERVED or EPHEMERAL
  ssh_public_keys            = var.ssh_public_key
  block_storage_sizes_in_gbs = [lookup(var.shape, "boot_volume_size", 50)]
  shape                      = lookup(var.shape, "shape", "")
  instance_state             = var.instance_state # RUNNING or STOPPED
  boot_volume_backup_policy  = var.boot_volume_backup_policy # disabled, gold, silver or bronze
}

and config:

  shape = {
    shape            = "VM.Standard.E4.Flex"
    ocpus            = 2,
    memory           = 4,
    boot_volume_size = 50
  }

Debug Output

Panic Output

Error: 400-InvalidParameter, Shape VM.Standard.E4.Flex is not valid for image ocid1.image.oc1.eu-frankfurt-1.aaaaaaaae6rnjsal6ldvpperzizrkfybacfvz7somb3fr7463kilcgfwaraa.

Expected Behavior

I am able to deploy the selected shape

Actual Behavior

I am unable to select anything other than the default shape, I have tried several options and the all return "Shape is not valid for image"

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@codex70 codex70 added the bug Something isn't working label Oct 7, 2022
@111100001
Copy link

i am facing the same issue

Shape VM.Standard.A1.Flex is not valid for image ocid1.image.oc1.us-chicago-1.aaaaaaaahqffxyvnhqisij6bmdj2ug7hk3qjdaxav5vprk3fzpl2v643lcfa

oci cli doesn't show ubuntu images for VM.Standard.A1.Flex, but it shows up when i create an instance from the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants