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

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

Open
powellquiring opened this issue Nov 3, 2023 · 0 comments
Assignees
Labels
service/Power Systems Issues related to Power Systems

Comments

@powellquiring
Copy link

powellquiring commented Nov 3, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Power Systems Issues related to Power Systems
Projects
None yet
Development

No branches or pull requests

2 participants