OpenTofu is a tool designed to help manage and automate Cloud infrastructure with code instead of clicking through dashboards.

Provider

OpenTofu relies on the concept of a Provider. This is what connects the configuration code to the actual cloud platform/service that the administrator is trying to manage.

This is basically a “plugin” with API configurations that talk with he specific cloud provider. Thus, unlike Ansible or Puppet which use Agent vs Agentless IaC, OpenTofu relies on the platform specific API to create or modify infrastructure during the “apply” step.

Resource

A resource is the specific piece of infrastructure that we are configuring. This can be a VM, a firewall, a VPS, etc. Unlike Ansible/Puppet, OT focus more on provisioning and configuring cloud services from the ground up.

State

State records the current known state of the Resource, and keeps track of all the changes that have been applied to a target. This is a critical part of the system, since tofu apply will check the current state of a system and only apply diffs when talking to a resource.