You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The maas_machine resource does not remove unsuccessfully added machines (with a wrong 'power_address', previously existing 'pxe_mac_address', or duplicate 'hostname'), resulting in those machines showing as New in MAAS. The destroy action for such wrongly added machines does nothing.
Error: ServerError:503 Service Unavailable (No rack controllers can access the BMC of node node01)
│
│ with maas_machine.node["node01"],
│ on main.tf line 1, in resource "maas_machine""node":
│ 1:resource"maas_machine""node" {
However, when the correct details are passed and the resource is reapplied, errors are thrown because the wrongly added machines haven't yet been deleted.
Error: ServerError:400 Bad Request ({"mac_addresses": ["MAC address b8:ae:ed:73:38:40 already in use on node01."], "power_type": ["Can't set power type to amt without network interfaces"], "hostname": ["Node with this Hostname already exists."]})
│
│ with maas_machine.node["node01"],
│ on main.tf line 1, in resource "maas_machine""node":
│ 1:resource"maas_machine""node" {
The resource should clean up any failed nodes that weren't added to ensure resource idempotency. Currently, I have to manually remove them MAAS before reattempting a terraform apply.
Tested with the following maas_machine resource on the TF MAAS provider version 2.0:
So you have a variable defined from where you can remove the faulty one, apply, then add it again.
Feels to me like usual OpenTofu behavior mixed with a lack of state flow support in the provider.
But how would you model the latter? I feel the MAAS API is not ready for it either.
The
maas_machine
resource does not remove unsuccessfully added machines (with a wrong 'power_address', previously existing 'pxe_mac_address', or duplicate 'hostname'), resulting in those machines showing as New in MAAS. The destroy action for such wrongly added machines does nothing.However, when the correct details are passed and the resource is reapplied, errors are thrown because the wrongly added machines haven't yet been deleted.
The resource should clean up any failed nodes that weren't added to ensure resource idempotency. Currently, I have to manually remove them MAAS before reattempting a
terraform apply
.Tested with the following
maas_machine
resource on the TF MAAS provider version 2.0:The text was updated successfully, but these errors were encountered: