Skip to content

Fix ip address deletion during "terraform destory" command#30

Merged
harikrishna-patnala merged 1 commit intomainfrom
FixTerraformDestroyForIpAddress
Jan 18, 2022
Merged

Fix ip address deletion during "terraform destory" command#30
harikrishna-patnala merged 1 commit intomainfrom
FixTerraformDestroyForIpAddress

Conversation

@harikrishna-patnala
Copy link
Member

When we try to destroy network/ip resource or complete setup destroy through terraform, the operation fails with following error

cloudstack_instance.web: Destruction complete after 11s

│ Error: Error disassociating IP address b4b3aca3-57b6-4469-9a8a-19b896898845: Undefined error: {"errorcode":530,"errortext":"ip address is used for source nat purposes and can not be disassociated."}

Problem statement:
As part of the IP resource destroy, provider tries to dissociate, which is not required when the source nat is enabled.

Solution:
To skip disassociation if source nat is enabled on the IP. As part of this sourcenat property has to be added to the terraform state

…ed IP addresses will be destroyed but the IP having source nat, does not have to be deassociated.
Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLGTM

@harikrishna-patnala harikrishna-patnala merged commit 9496d6a into main Jan 18, 2022
@harikrishna-patnala harikrishna-patnala added this to the v0.4.0 milestone Aug 7, 2023
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

Successfully merging this pull request may close these issues.

2 participants