GalleyBytes / terraform-operator

A Kubernetes CRD to handle terraform operations
http://tf.galleybytes.com
Apache License 2.0
366 stars 47 forks source link

Failsafe copy module addons #77

Closed Cytrian closed 2 years ago

Cytrian commented 2 years ago

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.