.tf extension. Terraform automatically loads and evaluates all .tf files in a single directory as one configuration. File names are for organization only and do not control execution order. This lets you split large projects into logical files (for example, network.tf, storage.tf, main.tf) while Terraform evaluates them together.
Terraform treats all
.tf files in a directory as a single configuration. Use multiple files to organize resources logically (for example, network.tf, storage.tf, main.tf) without affecting evaluation order.Resource block: core structure
A Terraform resource block declares an infrastructure object that Terraform will create and manage. The general pattern is: resource + provider-specific resource type + local name + arguments Example: creating an Azure Resource Groupresource— block type that declares a managed infrastructure object.azurerm_resource_group— provider-specific resource type (here: AzureRM provider)."example"— local name (local identifier) used within Terraform to reference this resource.- The block body contains arguments that describe desired state:
name— the actual resource name in Azure.location— the Azure region for the resource.
Example: Azure Storage Account
The resource type and arguments will vary by provider and resource. For example, creating an Azure Storage Account:azurerm_storage_accountis provided by the AzureRM provider.account_tierandaccount_replication_typeare service-specific settings.resource_group_nameshows how one resource is placed inside another logical resource (the storage account is created inside the resource group namedmy-rg).
Avoid hardcoding sensitive values (credentials, secrets, or provider tokens) directly in
.tf files. Use variables, terraform.tfvars, or secret management solutions (for example, HashiCorp Vault or cloud-native secret stores) to keep secrets out of source control.Quick reference: resource block components
Provider responsibility
Terraform itself is provider-agnostic: it does not contain built-in knowledge about Azure, AWS, GCP, or other systems. Providers implement the platform-specific logic:- Authenticate with APIs for the target platform.
- Expose supported resource types and their arguments.
- Validate configuration fields.
- Translate HCL into platform API calls.

Next steps and references
Now that you understand how a Terraform resource block maps to provider resource types and arguments, the next topics to explore are:- How to configure and authenticate providers (provider blocks).
- Using
variablesandoutputs. - Managing references and implicit/explicit dependencies.
- Organizing large configurations into modules.
- Terraform Documentation: Configuration Language
- Azure Provider Docs (azurerm)
- AWS Provider Docs (aws)
- Google Cloud Provider Docs (google)