Power

 View Only
Expand all | Collapse all

Terraform deployment is failing for POWER virtual server, using IBM schematics workspace

  • 1.  Terraform deployment is failing for POWER virtual server, using IBM schematics workspace

    Posted Tue April 16, 2024 02:27 PM
    Edited by Piper Wilson Wed April 17, 2024 10:35 AM

    Hi Guys, 

    Can someone please help here, my code deployment is failing. I am using IBM schematics workspace and pulling code from github. I am trying to create one AIX Server with simple configuration. I have created workspace, ssh-key and subnet to attach. I have tried using stock image directly and tried importing it to workspace using image create. I am able to create server through command directly from CLI using same resources like workspace and subnet etc.

    Code (main.tf) -

    resource "ibm_pi_image" "testacc_image"{
      pi_image_name       = "7200-05-07"

      pi_image_id                = "79c3bb4f-6e86-4dea-a2fd-bd94365a3a80"
      pi_cloud_instance_id = "307928bf################20eb2b879087"
    }
    resource "ibm_pi_instance" "testvm1" {
        pi_memory             = "2"
        pi_processors         = "0.25"
        pi_instance_name      = "testvm"
        pi_proc_type          = "shared"
        pi_key_pair_name      = "key1"
        pi_sys_type           = "s922"
        pi_cloud_instance_id  = "307928bf-b47d-4492-8d9a-20eb2b879087"
        pi_image_id           = resource.ibm_pi_image.testacc_image.pi_image_id
        pi_storage_type       = "tier3"
        pi_pin_policy         = "none"
        pi_network {
          network_id = "b614897d#####################6e70db69a2da"
        }
    }

    Error - 

     2024/04/16 18:25:18 Terraform apply | Error: failed to perform Create Image Operation for cloud instance 307928bf-b47d-4492-8d9a-20eb2b879087 with error  Post "https://eu-gb.power-iaas.cloud.ibm.com/pcloud/v1/cloud-instances/307928bf-b47d-4492-8d9a-20eb2b879087/images": dial tcp: lookup eu-gb.power-iaas.cloud.ibm.com on 172.21.0.10:53: no such host
     2024/04/16 18:25:18 Terraform apply | 
     2024/04/16 18:25:18 Terraform apply |   with ibm_pi_image.testacc_image,
     2024/04/16 18:25:18 Terraform apply |   on main.tf line 6, in resource "ibm_pi_image" "testacc_image":
     2024/04/16 18:25:18 Terraform apply |    6: resource "ibm_pi_image" "testacc_image"{
     2024/04/16 18:25:18 Terraform apply | 

    Thanks

    ------------------------------
    Ankur Sharma
    ------------------------------



  • 2.  RE: Terraform deployment is failing for POWER virtual server, using IBM schematics workspace

    Posted Fri April 19, 2024 05:26 PM

    Issue has been fixed by importing image data.



    ------------------------------
    Ankur Sharma
    ------------------------------