Skip to content

Unable to create PowerVS VSI using "-EMPTY" special values for image ID #6575

@smatzek

Description

@smatzek

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 other comments that do not add relevant new information or questions, 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 CLI and Terraform IBM Provider Version

Terraform v1.14.0
on darwin_arm64

  • provider registry.terraform.io/ibm-cloud/ibm v1.85.0

Affected Resource(s)

  • ibm_pi_instance

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

terraform {
  required_providers {
    ibm = {
      source  = "IBM-Cloud/ibm"
      version = "~>1.85.0"
    }
  }
  required_version = ">=1.5"
}
variable "ibmcloud_api_key" {
  description = "The IBM Cloud platform API key needed to deploy IAM enabled resources."
  type        = string
  sensitive   = true
}

variable "region" {
  description = "IBM Cloud Region where resources will be provisioned"
  type        = string
  default     = "us-east"
}

variable "zone" {
  description = "IBM Cloud zone where resources will be provisioned"
  type        = string
  default     = "wdc07"
}
provider "ibm" {
  ibmcloud_api_key = var.ibmcloud_api_key
  region           = var.region
  zone             = var.zone
  ibmcloud_timeout = 60
}

data "ibm_resource_instance" "client_workspace" {
  provider = ibm
  name     = "smatzek-nsg"
  service  = "power-iaas"
}

resource "ibm_pi_instance" "test-instance" {
    pi_cloud_instance_id = data.ibm_resource_instance.client_workspace.guid
    pi_memory = "4"
    pi_processors = "0.25"
    pi_proc_type = "shared"
    pi_instance_name = "sam"
    pi_image_id = "IBMI-EMPTY"
    pi_deployment_type = "VMNoStorage"
    pi_sys_type           = "s922"
    pi_network {
      network_id = "eb847ec0-62e3-40ae-88af-c716902f3ea8"
    }
}

Debug Output

https://gist.github.com/smatzek/3ea6f8bb10bbc576365cd74afb2d85ac

Panic Output

Expected Behavior

The instance should have been created as an empty IBM i.
Per the provider doc, specifying:

    pi_image_id = "IBMI-EMPTY"
    pi_deployment_type = "VMNoStorage"

should work.

It seems that the provider is looking up the image ID and not finding it. I'm not sure if the provider needs to add special handling code for this to not lookup the image ID in this case and just pass the value to the create API, or if the image list API needs to return it. I'm not sure how the CLI or the GUI is handling this special image ID value.

Actual Behavior

Failed unable to find the image.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions