terraform-provider-ibm icon indicating copy to clipboard operation
terraform-provider-ibm copied to clipboard

ibm_pi_ resources attributes need to be examined and determine which ones will taint the resource

Open powellquiring opened this issue 1 year ago • 0 comments

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 -v
Terraform v1.5.3
on darwin_arm64
+ provider registry.terraform.io/ibm-cloud/ibm v1.58.1

Your version of Terraform is out of date! The latest version
is 1.6.3. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

  • ibm_pi_instance

Terraform Configuration Files

In the Dal10 PER PowerVS data center.

Many of the ibm_pi resources contain attributes that can not be changed via modification. They require that the resource be deleted and then created with the new attribute value. For example the pi_sys_type , ... in the example below would require the resource to be deleted and then added. This is not happening. Instead it is a noop

resource "ibm_pi_instance" "worker" {
  pi_memory            = "4"
  pi_processors        = "2"
  pi_instance_name     = var.power.name
  pi_proc_type         = "shared"
  pi_image_id          = ibm_pi_image.testacc_image.image_id
  pi_key_pair_name     = data.ibm_pi_key.personal.id
  pi_sys_type          = "s922"
 //  pi_sys_type          = "e920"
  pi_cloud_instance_id = var.power.guid
  pi_pin_policy        = "none"
  pi_storage_type      = "tier3"
  pi_network {
    // network_id = ibm_pi_network.private.network_id
    network_id = var.power.network_private.network_id
  }
  pi_network {
    //network_id = ibm_pi_network.power_networks.network_id
    network_id = var.power.network_public.network_id
  }
}

Changing these resources results in a modification:

Terraform will perform the following actions:

  # module.spokes_power["1"].ibm_pi_instance.worker will be updated in-place
  ~ resource "ibm_pi_instance" "worker" {
        id                             = "dfa839ea-a42c-4b2a-83d5-7daca9713d04/23119551-d817-492c-8e65-f5ace7bf7326"
      + pi_user_data                   = <<-EOT
            #bash
            set -x
            ip route
            echo hi > /hi
        EOT
        # (32 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
module.spokes_power["1"].ibm_pi_instance.worker: Modifying... [id=dfa839ea-a42c-4b2a-83d5-7daca9713d04/23119551-d817-492c-8e65-f5ace7bf7326]
module.spokes_power["1"].ibm_pi_instance.worker: Modifications complete after 2s [id=dfa839ea-a42c-4b2a-83d5-7daca9713d04/23119551-d817-492c-8e65-f5ace7bf7326]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

I

  • #0000

powellquiring avatar Nov 03 '23 17:11 powellquiring