
Learn to use Terraform for provisioning cloud infrastructure, create resources, manage secrets, strings, and variables, and prepare for interviews with hands-on projects.
Explore infrastructure as code with Terraform to build, change, and provision infrastructure safely across cloud providers, including multi-tier apps, defined networking, S3 backends, and IAM policies with JSON.
Learn to set up a Terraform development workflow with Visual Studio Code, download and install the editor on Mac, Windows, or Linux, and create a folder for all Terraform files.
Create a project folder in Visual Studio Code, open it, and add a new file inside to organize the TheWrap.com files.
Create your first Terraform resource by configuring the provider, region, and a resource name, with an optional cidr_block, then save to prepare for initialization and apply and destroy steps.
Install Terraform across Linux, macOS, and Windows by adding the correct repository and GPG key, updating the package list, installing Terraform, and verifying with terraform --help.
Create your first IAM user with programmatic access, generate an access key and secret key, and download the credentials for automation, noting that administrator access is not recommended for production.
Learn to generate new AWS access keys for a user, download and store the secret access key securely, and toggle keys between active and inactive before deleting them.
Initialize a Terraform project by running terraform init to set up the backend, download and install provider plugins, and create the terraform directory with the registered providers and their versions.
Run Terraform plan to preview the execution plan and see what will be created, changed, or destroyed, with secure provider credentials via environment variables or parameter store.
Run Terraform apply after the execution plan to create resources like a virtual private cloud (vpc), update the state file, and verify the deployment in the selected region.
Use the terraform destroy command to safely remove infrastructure. This enables cloud agnostic, disposable environments for testing and staging.
the tfstate file serves as the core of infrastructure, keeping track of version, provider details, and resources, while you apply changes (auto approve) or destroy resources to manage state.
learn how to declare string variables in Terraform with a variables file, using syntax variable name { type = string; default = "value" }. see how default values vary by type.
Explore how to use boolean variables in Terraform by omitting type, setting a default true or false, and applying practical examples like an is_enabled flag.
Declare list variables in Terraform by choosing a type such as string, number, or boolean and listing values in brackets. Enforce quotes for string elements and prepare for object types.
Learn how to define and initialize a map variable in Terraform, with a default value and key-value pairs. Learn to declare string, number, boolean, list, and map variables.
Explore using a string variable in Terraform to tag a vpc resource, set cidr, and populate the tag key name with a default value like my first BBC.
Explore using a list variable in Terraform, including lists of strings and numbers, how quoted values become strings, and how to index elements (starting at zero) with square brackets.
Learn to use map variables in Terraform by defining a map with keys and retrieving corresponding values, demonstrating how key one yields value one.
Explore how to define and use input variables in Terraform, specifying string type, omitting defaults, adding descriptions, and prompting for values during apply to create resources.
Define and view terraform outputs by naming an output and assigning a value from resources, like the BBC, then inspect the output after terraform apply.
Learn how to use object var in Terraform by defining an object with key-value pairs, including string fields and a list of numbers, and setting a default value.
Learn to create an EC2 instance with Terraform by configuring the region, AMI, and instance type, using env-based AWS credentials, and applying and destroying resources in us-east-1.
Allocate an elastic IP address to an EC2 instance using Terraform; create an aws_eip resource, plan and apply, output the EIP, verify in the console, then destroy resources.
Define a Terraform security group for EC2, configure ingress and egress rules, and attach it to EC2 instances.
Learn to use terraform modules, including local and remote ones, and structure a module directory with providers and environment variables to deploy and destroy an instance.
Define an output inside a Terraform module and reference it from the main module using the module name, producing the main output value that reflects the inner instance.
Learn to use remote Terraform modules to simplify deploying common infrastructure, discover providers and resources, and install providers from source, avoiding repetitive coding with ready-to-use modules.
Create an IAM user and a custom policy in Terraform, then attach the policy to the user using an IAM policy attachment to grant access.
Create an aws_db_instance with Terraform by configuring provider, region us-east-1, engine version 5.7, storage gp2, parameter group, and instance class. Apply to provision and inspect the VPC and security group.
Set up a remote backend by storing the terraform state in an s3 bucket, enabling remote plan and apply. Create the bucket in Virginia, block public access, with no encryption.
Configure a remote S3 backend for Terraform to store state in an S3 bucket, using region, access key, secret, and key, and initialize to manage a VPC resource.
Learn how to use Terraform's count attribute to create multiple resources from one block, generating three, two, or ten instances with the same type.
Learn how to import existing infrastructure into a Terraform template using the import statement, add it to the state, and manage imported VPCs.
Enforce resource order in Terraform with the depends_on attribute. Create the database first, then the web server, and learn destruction order.
Learn how to use Terraform data sources to fetch external information, such as an AWS instance's availability zone, by filtering on tags and referencing data outputs in configurations.
Learn how to validate Terraform syntax using the terraform validate command, identify common errors like missing equals signs and misformatted lines, and ensure configurations are valid.
Apply the tier four format to terraform configurations to standardize spacing and improve readability across a team, achieving elegant, ordered, and consistent output.
Configure multiple providers across regions by adding a second provider with an alias and credentials via environment variables, then reference the alias to deploy resources in distinct regions.
Configure a Terraform remote-exec provisioner to connect to a new EC2 instance via a key pair, then run inline commands to install packages.
Explore the local provisioner in terraform by using a local-exec to run a command that captures a created instance's private IP and saves it to a text file.
Learn to generate a destroy plan with Terraform plan destroy, compare plan and apply outcomes, and understand what will be destroyed before applying changes to infrastructure.
Manage multiple Terraform workspaces to isolate staging and production environments. Create, switch, list, show, and delete workspaces to apply different environment variables and configurations.
Learn how to taint a single resource with terraform taint, triggering a targeted destroy and replacement during terraform apply, while preserving state consistency across resources.
Explore Terraform's built-in functions, including max, numeric, floor, string, collection, date, file, and hash cryptography functions, guided by the official documentation.
Learn to debug Terraform effectively by exporting TF_LOG to enable verbose trace output, configure TF_LOG_PATH to save logs, and toggle debugging across Windows, Mac, and Linux.
Learn how Terraform's sensitive flag hides values in outputs and plans using examples with a CIDR block, while understanding that sensitive data may still appear in the state.
Learn to build a complete infrastructure from scratch, including a BBC with an internet gateway, private and public subnets, a public-subnet gateway, and two instances with separate security groups.
Build a vpc with one private and one public subnet using a terraform module, attach an internet gateway, and configure aws credentials and region for a streamlined deployment.
Builds public and private security groups in Terraform using a module and the BBC ID output, then runs init and apply to provision and verify in the console.
Learn to build private and public EC2 instances with Terraform using modules, configure security groups, manage key pairs, and deploy with terraform init and apply.
master terraform interview prep by understanding infrastructure as code, core configuration language, and essential commands like init, plan, apply, destroy, and graph.
Explore Terraform interview preparation part 2, covering backing and state management, modular deployments, private registries, multi-provider deployments, on-prem options like OpenStack and VMware, and key cli commands.
Explore Terraform interview topics, including resource import and destruction, built-in provisions, policy enforcement with Sentinel, multi-cloud deployments, resource graph planning, and securing credentials.
Explore remote state management, state locking, and tainted resources recreated on the next apply. Learn module usage, outputs, and plugin upgrades from the registry to prep for Terraform interviews.
DevOps is a combination of software development and information technology operations that enables businesses to deliver applications at a faster pace. It brings together development and operations teams so there are fewer redundancies in the software development process.
DevSecOps is a culture shift in the software industry that aims to bake security into the rapid-release cycles that are typical of modern application development and deployment.
DevOps has revolutionized workplaces in many ways. The number of DevOps-related jobs are increasing, while its rank as an in-demand job.
DevOps is important because it's a software development and operations approach that enables faster development of new products and easier maintenance of existing deployments.
What is Infrastructure as Code (IAC) ?
Infrastructure as Code (IaC) is the managing and provisioning of infrastructure through code instead of through manual processes.
With IaC, configuration files are created that contain your infrastructure specifications, which makes it easier to edit and distribute configurations. It also ensures that you provision the same environment every time.
What is Terraform ?
Terraform is an open-source infrastructure as code software tool created by HashiCorp. Users define and provide data center infrastructure using a declarative configuration language known as HashiCorp Configuration Language, or optionally JSON.