IBM-Cloud / ansible-collection-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
70 stars 73 forks source link

Failing VSI creation on powerVS while stage Check for existing network in create.yml #113

Closed ashwinik30 closed 1 year ago

ashwinik30 commented 1 year ago

Description : Trying to create VSI instance in IBM cloud in power using create.yaml file from https://github.com/IBM-Cloud/ansible-collection-ibm/blob/master/examples/simple-vm-power-vs/create.yml#L57

running playbook ansible-playbook create.yml

failure :

TASK [Check for existing network] ***************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed_when_result": true, "msg": "", "rc": 1, "resource": {"_name": "ansible_20230712-093457", "_type": "ibm_pi_network", "target": "ibm_pi_network.ansible_20230712-093457"}, "stderr": "\nError: failed to perform Get Network Operation for Network id ashwini-kadam-ansible-demo-power-vm-network with error [GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][404] pcloudNetworksGetNotFound  &{Code:0 Description:The network ID ashwini-kadam-ansible-demo-power-vm-network could not be found on cloud instance 77e2511fec294eefa99c42febd2bea64. Ensure the ID is correct and try again. If the error persists, contact support. Error:item not found Message:}\n\n  on ibm_pi_network_ansible_20230712-093457.tf line 1, in data \"ibm_pi_network\" \"ansible_20230712-093457\":\n   1: data ibm_pi_network \"ansible_20230712-093457\" {\n\n\n", "stderr_lines": ["", "Error: failed to perform Get Network Operation for Network id ashwini-kadam-ansible-demo-power-vm-network with error [GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][404] pcloudNetworksGetNotFound  &{Code:0 Description:The network ID ashwini-kadam-ansible-demo-power-vm-network could not be found on cloud instance 77e2511fec294eefa99c42febd2bea64. Ensure the ID is correct and try again. If the error persists, contact support. Error:item not found Message:}", "", "  on ibm_pi_network_ansible_20230712-093457.tf line 1, in data \"ibm_pi_network\" \"ansible_20230712-093457\":", "   1: data ibm_pi_network \"ansible_20230712-093457\" {", "", ""], "stdout": "data.ibm_pi_network.ansible_20230712-093457: Refreshing state...\n", "stdout_lines": ["data.ibm_pi_network.ansible_20230712-093457: Refreshing state..."]}

expected : It should go for next stage to create new network if not able to find network but it is returning from the check existing network if it is not able to find network .