Skill 4.1.1
Resource blocks
Key Concepts
A resource block has two labels: the resource type, such as aws_s3_bucket, and a local name, such as logs. Together they form the address aws_s3_bucket.logs, which must be unique in the module. The body sets arguments defined by the provider's schema; some are required, some optional, and others are read-only attributes that the provider computes, such as arn.
Resource blocks also accept meta-arguments that Terraform itself defines: count, for_each, depends_on, provider and lifecycle, plus provisioner and connection blocks for the rare cases that need them. Changing some arguments updates the object in place; changing others forces replacement, as the provider's schema defines.