- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
Terraform Lifecycle:
- Terraform init initializes the
working directory which consists of all the configuration files
- Terraform plan is used to create
an execution plan to reach a desired state of the infrastructure. Changes
in the configuration files are done in order to achieve the desired state.
- Terraform apply then makes the
changes in the infrastructure as defined in the plan, and the
infrastructure comes to the desired state.
- Terraform destroy is used to delete all the old infrastructure resources, which are marked tainted after the apply phase. DevOps Online Training
How Terraform Works?
Terraform
has two main components that make up its architecture:
- Terraform Core
- Providers
Terraform Core:
Terraform core uses two input sources
to do its job. DevOps Training
The first input source is a Terraform
configuration that you, as a user, configure. Here, you define what needs to be
created or provisioned. And the second input source is a state where terraform keeps the
up-to-date state of how the current set up of the infrastructure looks like.
So, what terraform core does is it
takes the input, and it figures out the plan of what needs to be done. It
compares the state, what is the current state, and what is the configuration
that you desire in the end result. It figures out what needs to be done to get
to that desired state in the configuration file. It figures what needs to be
created, what needs to be updated, what needs to be deleted to create and
provision the infrastructure.
Providers:
The second component of the
architecture are providers for specific technologies. This could be cloud
providers like AWS, Azure, GCP, or other infrastructure as a service platform.
It is also a provider for more high-level components like Kubernetes or
other platform-as-a-service tools, even some software as a self-service tool.
For More
Information about DevOps Online Training ClickHere
Contact: +91-9989971070
Comments
Post a Comment