Deploying Your First Server with Terraform: A Beginner's Guide
Introduction Day 3 of my Terraform journey is where things truly came together. After setting up my environment, I focused on two foundational concepts from the labs: Provider block Resource block ...

Source: DEV Community
Introduction Day 3 of my Terraform journey is where things truly came together. After setting up my environment, I focused on two foundational concepts from the labs: Provider block Resource block These are the core building blocks of any Terraform configuration. By the end of the labs, I was able to define and create real AWS resources entirely through code. Understanding the Provider Block The provider block is how Terraform connects to a cloud platform like AWS. provider "aws" { region = "us-west-2" } This tells Terraform: Use AWS as the provider Deploy resources in the us-west-2 region For authentication, I used: aws configure This stores my IAM user credentials locally, and Terraform automatically uses them to authenticate with AWS. Understanding the Resource Block The resource block is where actual infrastructure is defined. In this lab, I created: An S3 bucket A security group These resources represent real cloud infrastructure managed directly by Terraform. Terraform Configurat