Unable to deploy the machine using terraform

Hi @troyanov

Yes terraform is working when the machine is in ready state and it moves to deployed… but for automation we supposed to do end to end. commissioning of machine from new to ready is manual step. please suggest us how can we make machine it ready without manual intervention.

thank you so much and apologies for the delayed response.

Thanks
Vinod

Hi @vinodsiraparapu and thanks for the feedback!

I am wondering if you’ve tried maas_machine (Resource) since according to the code, it will automatically wait for the machine to reach required state.

Hi @troyanov

When we add the machine, it will be available in MAAS in NEW state, when we commission manually then it goes to Ready. Then only we can run the terraform and it moves to deployed state…

From New to Ready we are doing it manually. how to automate this… please suggest

Thanks
Vinod

Please see my previous answer related to maas_machine resource that can be used to managed machines.

I am not 100% sure, but it seems that it should do the trick with resourceMachineCreate?

Another idea is that might be worth trying: you can also take a look into gomaasclient (used by the provider) use direct API calls and use it for your automation with local-exec

@vinodsiraparapu. We are running into the same problem. We have to delete the machine that’s in the NEW state and rerun our terraform in order to commission it. Are you able to find a work around to this problem?