Infrastructure provisioning deploys and prepares new servers, databases, networks, and other infrastructure resources. Terraform primarily performs this role, while Ansible primarily manages configurations of existing infrastructure. section 25.2.2
Terraform uses a declarative model: configuration files define the desired end state, Terraform Core compares it with the Terraform state file, and providers make the required changes. Its push-based, agentless operation supports cloud and on-premises infrastructure. section 25.2.2 section 25.3
A basic Terraform provisioning workflow is:
- Write HCL configuration files that define the desired infrastructure. section 25.2.2
- Plan the changes and verify what will be executed. section 25.2.2
- Apply the plan to provision and manage resources. section 25.2.2
Terraform across providers
Terraform Core processes HCL configuration, communicates with providers such as public cloud providers, provisions infrastructure, and maintains state information in a state file.
Figure 25.6 Provisioning resources with Terraform. Configuration files are processed byTerraform Core to interact with various providers (i.e., public cloud providers) and manage infrastructure resources while maintaining state information in the state file.
Trace how configuration files move through Terraform Core to providers while state information is maintained. section 25.2.2

