Terraform workflow
The Terraform workflow typically consists of the following:
init
– Initializes the Terraform workspace and backend (more on them later) and downloads all required providers. You can run theinit
command multiple times during your build as it does not make changes to your workspace or state.plan
– Runs a speculative plan on the requested resources. This command typically connects with the cloud provider, then checks whether the objects managed by Terraform exist within the cloud provider and whether they have the same configuration as defined in the Terraform template. It then shows the delta in the planned output that an admin can review and change the configuration if they are not satisfied. If they are satisfied, they can apply the plan to commit the changes to the cloud platform. Theplan
command does not make any changes to the current infrastructure.apply
– This applies the delta configuration to the cloud platform. When...