ZupIT/ritchie-formulas

Add Docker implementation on RIT AWS APPLY TERRAFORM formula

eduardorcury opened this issue ยท 3 comments

What would you like to be added:

  • I would like to be able to run the RIT AWS APPLY TERRAFORM formula using Docker.

Why is this needed:

  • The AWS APPLY TERRAFORM formula was implemented without the Dockerfile, so this funcionality has to be implemented for this formula to match the other ones and allow the user to run it using Docker.

I've assigned you the ISSUE @eduardorcury , as we discussed here: #272 ๐Ÿ‘
Thank you again for contributing ๐Ÿ‘

I've managed to create the Dockerfile and make the necessary changes on Makefile. It seems like the Docker image was built successfully, but i'm getting an error when the formula tries to run the terraform commands.

image

When I removed the execution of terraform version in the formula, the command successfully clonned the repository given in the input, but failed latter when running terraform init, which makes me think the problem is with the terraform commands.

Running terraform -version and rit aws apply terraform locally works fine.

As you can see, I get no error messages, which makes it harder to debug. Any ideas on how to solve this would be much appreciated! ๐Ÿ˜„

@eduardorcury , to make the terraform command works on Docker, I believe it will be necessary to install terraform on the container. The same way it's done for Ritchie for example here: https://github.com/ZupIT/ritchie-formulas/blob/master/templates/create_formula/languages/go/Dockerfile