Change the cp $TFO_MAIN_MODULE_ADDONS to be failsafe
In case of an empty directory $TFO_MAIN_MODULE_ADDONS the cp command fails silently.
In this case, the whole setup script ends without an error message.
We had that case with an Terraform resource without a customBackend.
I'm also not sure about the -i switch to cp, does not make any sense in a script.
Change the
cp $TFO_MAIN_MODULE_ADDONS
to be failsafeIn case of an empty directory
$TFO_MAIN_MODULE_ADDONS
the cp command fails silently. In this case, the whole setup script ends without an error message.We had that case with an Terraform resource without a customBackend.
I'm also not sure about the -i switch to cp, does not make any sense in a script.