sumaform
sumaform copied to clipboard
terraform destroy fails when there were problems provisioning the environment
With errors such as:
- module.minsles12sp3.module.minion.output.configuration: variable "domain" is nil, but no error was reported
However terraform destroy works fine when the environment was fully created.
Not sure if this is a sumaform or libvirt provider issue.
Reproducing should be easy: run terraform apply then in the middle of the salt run for one of the instances, stop terraform.
Run terraform destroy
As an alternative, provoke a failure at one of the salt states by changing it at the local clone, run apply, wait until it fails, then run destroy.
:+1: (as @juliogonzalez requested). Poor @moio ;)
@keichwa or poor @MalloZup, as it could be a problem at the provider :-\
It seems @MalloZup has the explanation about this, so he will post it soon.
@juliogonzalez are there news?
Well, this is happening yet, yes. Yesterday, for example, @srbarrios had to remove an environment manually because of this (in fact he created now a bash script to do it, as otherwise it's a PITA).
But I see @MalloZup didn't add the explanation. @MalloZup?
looking only at the errror msg module.minsles12sp3.module.minion.output.configuration: variable "domain" is nil, but no error was reported it seems to me more a HCL error rather then a provider errror.
Perhaps I would need a more in deep report likw with TF_LOG=DEBUG and all the steps needed. To me seeing this error, seems that tfstate file doesn't have all IDs or variable set for some X reason.
However we might need a more precise report to see if the PB is on the way you write HCL in sumaform or if it is a provider issue.
A good thing would be to try to reproduce without sumaform and having a reproduction way for that. Or having are more precise issue here. Both are welcome. In any case feel free also when is the case to open an issue upstream