Suppose I have my infrastructure as a code folder where I also use Azure for my infrastructure, and terraform state is also stored on azure in a storage account on a resource group with subdirectories for each of my environments and tfvar file for each environment.
I am planning to deploy/create Azure services using Docker Container using following steps:
- Create a docker file where I would use terraform as base image and add terraform IaC folder to the image’s filesystem.
- When we would run the image on docker desktop it would create a docker container.
- Further when Docker container would be executed , azure services would be start creating.
Thus, When the individuals would use they would only execute and in result would get their services created in automation without getting to know the code executed.
A) Is the steps mentioned above the right way to execute the problem statement ?
B) How to create and what should , I store in the Docker Images ?
C) How to create and what should , I store in the Docker Containers ?
D) When Executing the Docker Container from Docker Desktop , How would the services get created and deployed ?
E) Suggest me on the ways I could implement the above problem statement and If not Why?