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 the CIDR Block after VPC is deleted #677

Closed
AmnaIrfan opened this issue May 25, 2021 · 2 comments · Fixed by #681
Closed

Unable to delete the CIDR Block after VPC is deleted #677

AmnaIrfan opened this issue May 25, 2021 · 2 comments · Fixed by #681
Labels
bug Something isn't working

Comments

@AmnaIrfan
Copy link
Contributor

What happened?

CIDR blocks are attached to VPCs so deleting a VPC in Crossplane automatically deletes the CIDR block in AWS. However the CIDR resource does not get deleted in Crossplane. The deletion gets stuck in a loop since AWS first tries to get the VPC and when the VPC doesn't exist it sends a VPC not found error while the code is waiting for a CIDR not found error.
We just need to account for the VPC not found error while deleting a CIDR block.

How can we reproduce it?

  1. Create a VPC in Crossplane
  2. Create a CIDR block for that VPC
  3. Delete the VPC in Crossplane (it wont ask you to delete the CIDR block)
  4. Delete the CIDR block in Crossplane (it will give an error that the VPC is not found)

What environment did it happen in?

Crossplane version:
def0bab

@AmnaIrfan AmnaIrfan added the bug Something isn't working label May 25, 2021
@muvaf
Copy link
Member

muvaf commented May 25, 2021

Hi @AmnaIrfan! Looks like we need to return with ResourceExists: false here if the meta.WasDeleted(cr) is true and VPC cannot be found.

@AmnaIrfan Would you be interested in contributing this fix?

@AmnaIrfan
Copy link
Contributor Author

@muvaf Yes I will be fix this today. Thank you!

AmnaIrfan added a commit to AmnaIrfan/provider-aws that referenced this issue May 28, 2021
Signed-off-by: Amna Irfan <amirfan@ea.com>
AmnaIrfan added a commit to AmnaIrfan/provider-aws that referenced this issue Jun 2, 2021
Signed-off-by: Amna Irfan <amirfan@ea.com>
@muvaf muvaf closed this as completed in #681 Jun 2, 2021
tektondeploy pushed a commit to gtn3010/provider-aws that referenced this issue Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants