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

Unable to delete IBM Public gateway in VPC gen2 using Ansible destroy playbook #97

Open
indirakalagara opened this issue Mar 7, 2022 · 1 comment

Comments

@indirakalagara
Copy link

Team,
We have created an ansbile playbook to create ROKS cluster on Gen2 VPC as well as delete using ibm ansible collection
Playbook: https://github.com/cloud-native-toolkit/ansible-ibm-roks

However, Public gateway is not getting deleted , even though the delete task is completed successfully. Can you please help to resolve the issue. ?

You can recreate the issue using the playbooks https://github.com/cloud-native-toolkit/ansible-ibm-roks

@jimccann-rh
Copy link

jimccann-rh commented Sep 14, 2022

I think what could be your issue is you have a subnet attachment.

Issue is that code does not work. Not sure how their code pasted testing on 'delete'.

I did my own test and NO go.

Notice 0 (zero) destroyed.

ok: [localhost] => {
"changed": false,
"invocation": {
"module_args": {
"generation": 2,
"ibmcloud_api_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"id": null,
"public_gateway": "r014-62f9476e-152d-4a7a-8fba-7262cc59884c",
"region": "us-east",
"state": "absent",
"subnet": "0777-cb3b4ebb-129e-4f1a-89d3-a2ae2360aa2d"
}
},
"rc": 0,
"resource": {},
"stderr": "",
"stderr_lines": [],
"stdout": "\nWarning: Argument is deprecated\n\nThe generation field is deprecated and will be removed after couple of\nreleases\n\n\nDestroy complete! Resources: 0 destroyed.\n",
"stdout_lines": [
"",
"Warning: Argument is deprecated",
"",
"The generation field is deprecated and will be removed after couple of",
"releases",
"",
"",
"Destroy complete! Resources: 0 destroyed."
]
}

This was my code it did NOT remove the attachment.

- name: REMOVE VPC Gateway Attachment
  ibm_is_subnet_public_gateway_attachment:
    public_gateway: "{{ vpc_public_gateway.id }}"
    subnet: "{{ vars['vpc_subnet_' + vpc_subnet_public_gateway_attachment_name ].id }}"
    state: absent
  register: vpc_subnet_public_gateway_attachment_output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants