-
Notifications
You must be signed in to change notification settings - Fork 79
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
Resources are not truly destroyed upon destroy #57
Comments
Hi, not deleting the network view was part of PM requirment, hence it does give false impression, and i nios when you delete a network it goes to recycle bin, the APi does exactly that. Also in the features , we don't mention the deletion of network view |
Given that Terraform is declarative, it doesn't make sense that one can create resources with it, and have the destroy not actually destroy. I understand that the API sends things to the recycle bin as well, so it sounds like the provider should pick up the slack and delete from recycle bin as well. I also understand that the features does not describe the ability to delete a network view, but given that you can create/destroy the resource it is implied. Not addressing and closing the issue on these things sounds very anti-pattern. An "Issue" can be tagged as an improvement if it's in the project's interests to get there eventually. Closed implies that it will not be implemented ever. If you disagree I will leave it at that as it is your repository, but please consider this as we are paying Infoblox customers who also intersect a lot with Terraform. Would a PR be accepted that helps resolve these things in a reasonable way? |
I am sorry if i offended you :) , these were the requirments that came by our PM, i will talk to him and let you know. Will Reopen for now |
No offense taken! Just being adamant on what I think is best for the project as a soon-to-be heavy consumer and potentially bringing contributors with! |
Hello @gravcat, |
I was doing some testing for the datasource_infoblox_network. I was running into this issue because the network_view is not getting removed. It is missing out the the infoblox-go-client. I logged an issue so it can be tracked upstream. |
This fix requires a newer version of infoblox-go-client is released with infobloxopen/infoblox-go-client#92 The fix is not a good one. This resource stores name for the id unlike all the other resources which use Ref off the Struct in the go client. Changing it now would disrupt statefiles. Either we live with the computed network_view_ref attribute, see if it is possible to transition the state, or we need to deprecate this attribute in a future API release.
There is a lot of vendor baggage happening. Seems like go mod vendor has not been run in previous releases. Also updated the GNUmakefile to include the variables for build automatically updated README.md to reflect change.
This fix requires a newer version of infoblox-go-client is released with infobloxopen/infoblox-go-client#92 The fix is not a good one. This resource stores name for the id unlike all the other resources which use Ref off the Struct in the go client. Changing it now would disrupt statefiles. Either we live with the computed network_view_ref attribute, see if it is possible to transition the state, or we need to deprecate this attribute in a future API release.
There is a lot of vendor baggage happening. Seems like go mod vendor has not been run in previous releases. Also updated the GNUmakefile to include the variables for build automatically updated README.md to reflect change.
As of now we have the feature to create and delete network view. Will look around the possibility of cleaning the resources from recycle bin while deleting through the terraform. |
@gravcat We are able to create the network resource even when the same network is at NIOS recycle bin.
Can you give a try and let us know if you are facing the issue as of now? |
We will be closing this issue as of now with the above discussion. |
I've only tested this with the network view, network, and ip_allocation resources, so there may be more resources with similar problems.
The actions
~/.terraform/plugins
terraform apply
terraform destroy
terraform apply
Expected outcome
The resources are created, destroyed, and created once again.
Actual outcome
network views are not destroyed
The network view not being destroyed means that your state conflicts with what's actually out there. Any subsequent run whether plan or apply will fail.
ip allocation belongs to the network, which does not get destroyed until the network is.
networks are only moved to the recycle bin
The network only being moved to the recycle bin means that any attempt to create that network will fail as reportedly the network name is already in use.
Knowing this issue we can carefully work around it, but it'd be great to see this resolved by
The text was updated successfully, but these errors were encountered: