Interview Prep/Terraform/Providers, Resources and Data Sources

What is a resource block and how is it addressed?

BeginnerConceptProviders, Resources and Data Sources
Answer

A resource block declares one infrastructure object. The first label is the type (provider prefix plus kind), the second a local name; together they form the address aws_instance.web.

resource "aws_instance" "web" {
  ami           = data.aws_ami.al2023.id
  instance_type = "t3.micro"
}
All Terraform questions Roadmap: Terraform

More on Providers, Resources and Data Sources