ionos-cloud / terraform-provider-ionoscloud

The IonosCloud Terraform provider gives the ability to deploy and configure resources using the IonosCloud APIs.
Mozilla Public License 2.0
35 stars 23 forks source link

Sync server missing primary nic returns 404 error #467

Closed Syndlex closed 1 year ago

Syndlex commented 1 year ago

Description

When synchroning the remote state of a server where the primary nic was deleted we get a 404 error.

Expected behavior

Sync the nics of the server before and remove primary nic uuid when nic does not exist.

#

Configuration Files

How to Reproduce

  1. Create a IONOS server in Terraform with a nic.
  2. Go into the dcd and remove the nic from the server. And provisions this new State.
  3. Build plan / Terraform refresh will now throw a 404 Ressource not found.

Error and Debug Output

Additional Notes

You can go around this problem with pulling the state. Removing the primary nic and pushing the state again.

I needed this because when changed the lan configuration and the lan could not be removed because of existing nics within the lan.

References