
Learn terraform to tame any cloud provider, provision infrastructure, and create EC2 instances through hands-on projects, with interview preparation.
Master infrastructure as code with Terraform across providers and multi-cloud. Learn to deploy EC2 instances, AWS databases, Json IAM policies, remote backends with S3, and security groups plus modules.
install visual studio code, understand its interface, and create a folder for your terraform environment, downloading the editor from code.visualstudio.com for ubuntu, mac, windows, or linux.
Create a dedicated Terraform folder in Visual Studio Code, organize files by creating a project directory, then add the first main.tf file to start your Terraform setup.
Create your first Terraform resource by setting up a main.tf with an aws provider and a vpc named my_vpc, including a cidr_block of 10.0.0.0/16, using Visual Studio Code.
Install Terraform on Ubuntu by adding the HashiCorp GPG key, adding the official Linux repository, then updating the package list and installing Terraform.
Create an IAM user with programmatic access for Terraform, generate and download access keys, and review policies before assigning permissions, noting that administrator access is not recommended.
Generate and manage new access keys, including the secret access key, when credentials are lost, using the security credentials tab to create, download, activate, or delete keys.
Run terraform init to initialize backend and provider plugins, download the AWS provider, and create the terraform directory with providers and main.tf for exam readiness.
Run terraform plan to preview a VPC with a CIDR block and DNS enabled. Fix credentials by using environment variables or AWS parameter store.
Run terraform apply to create the provider and a VPC in AWS. The session updates the Terraform state file and confirms the VPC appears in the chosen region.
Demonstrate how to destroy a VPC with Terraform using the destroy command, emphasizing infrastructure as code for disposable testing environments and cloud-agnostic deployment across providers.
Discover how the terraform tfstate file serves as the heart of your infrastructure, tracking resources and enabling apply and destroy workflows with practical examples.
Explore Terraform variables, focusing on string types, default values, and variable blocks in main.tf. Learn how to declare and use string, number, and boolean variables.
Define boolean variables in Terraform and see that, if you omit the type, the default is boolean with true or false values. Use cases like is enabled illustrate practical usage.
Explains Terraform list variables, naming a list and setting a type like string, number, or boolean. Shows default values in brackets, string quotes, and avoiding mixed types.
Explore map variables in Terraform, defining a map with default key-value pairs (key one=value one, key two=value two), and learn how string, number, boolean, list, and map types are declared for future use.
Learn to define and use a string variable in Terraform to configure an AWS VPC, set a CIDR block, and tag the VPC with a name key from the variable.
Learn to use a list variable in terraform by indexing elements with indices, such as var.my_list[0] for Apple and var.my_list[1] for 20; note that 20 is treated as a string.
Use a Terraform map variable by declaring var.my_map and populating it with key-value pairs in square brackets, such as "key one" and "key two".
Learn to create Terraform input variables that prompt for values like a VPC name, using a string type with description, and run init and apply with an AWS provider.
Learn how to define Terraform outputs, set the output name and value, and expose VPC attributes like the ID, cidr block, name, and tags after apply, with official docs guidance.
Learn to define terraform variables as table and object types, control field types and defaults, and model objects as key-value pairs with name and port lists.
Learn to create an AWS EC2 instance with Terraform by configuring the AWS provider, selecting an AMI and a t2.micro, and using terraform apply and destroy.
Allocate an elastic IP to an EC2 instance using Terraform, create aws_ip, assign the instance id, output the public IP, plan, apply, verify in the console, then destroy.
Create an AWS security group with Terraform, defining ingress for HTTPS on port 443 from anywhere and egress rules, then assign the group to EC2 instances and apply the configuration.
Learn how Terraform modules reuse code with local and remote libraries, organize resources into module directories, and apply credentials best practices using environment variables or AWS SSM.
Learn how to define and reference module outputs in Terraform, exposing an EC2 instance id from a module to a main.tf output and view it after terraform apply.
Explore how to use remote modules in Terraform to reuse AWS VPC components, install providers from the registry, and simplify deploying subnets and route tables.
Create an IAM user with a Terraform template, define a custom policy, and attach it using a policy attachment to grant access.
Define an aws rds db instance with terraform in us east 1, using db.t2.micro, engine 5.7, gp2 storage, and port 3306, and skip the final snapshot.
Learn how to configure a remote backend with an S3 bucket to store the Terraform state file, enabling versioning and secure remote planning and applying of infrastructure.
Learn how to configure a remote Terraform state using an S3 backend, create a simple VPC, and manage the tfstate remotely with init, apply, and destroy.
Use terraform count to create multiple ec2 instances with the same ami id and instance type, then run terraform apply to provision three resources.
Import existing resources into Terraform by using Terraform import for a manually created AWS VPC, then reflect it in the state and template, enabling proper destruction.
Discover how to manage dependencies in Terraform by using depends_on to enforce that the database is created before the web server, and that destruction follows this order.
Explore how Terraform data sources fetch external information, such as aws ami and availability zone, using data blocks to filter by tags and output attributes.
Master syntax validation in Terraform by using the Terraform validate command to catch missing newlines, missing equals, and other configuration errors.
Learn how to use the Terraform fmt command to format Terraform templates, producing elegant, ordered code and consistent styling across a team.
Configure multiple aws providers with an alias to deploy resources in different regions using environment credentials, then apply and destroy across us west two and us east one.
Master terraform local provisioners by using a local-exec to output the EC2 private IP into private_ip.txt during terraform apply, then verify the IP in the console.
Explore remote-exec provisioners in terraform by provisioning an aws ec2 instance, installing nginx via inline commands, configuring ssh connection with a key, and validating through terraform apply.
Learn how to use terraform plan destroy to preview destruction, create a VPC with apply, verify no changes after apply, and run destroy to remove the VPC.
Explore how to use Terraform workspaces to manage staging and production environments, including creating, listing, selecting, showing, and deleting workspaces with env-specific variables.
Explore how to use Terraform taint to mark a resource for recreation after manual changes, forcing replacement via Terraform apply and managing adds and deletes of AWS VPCs.
Explore Terraform built-in functions, including max, numeric, absolute, floor, log, string, collection, networking, date, file system, and hash cryptography functions; custom functions are not allowed.
Enable terraform debugging by exporting TF_LOG to set trace, debug, info, warn, or error levels. Persist logs with TF_LOG_PATH and run terraform plan to view detailed output.
Learn how to use the Terraform sensitive parameter to hide outputs like a VPC CIDR block during plan, and understand why the state file still contains sensitive data.
Explore what Terraform is for AWS and DevOps, its infrastructure-as-code capabilities, key features and commands, and how to apply and manage infrastructure with HashiCorp configuration language.
Learn Terraform Cloud as a collaborative platform, explore backends and state management, CLI commands, modules and private registries, and cover multi-provider deployments and interview topics like Oracle Cloud and competitors.
Prepare for a Terraform interview by reviewing resource error handling during apply, destroy commands, and resource import. Explore Terraform architecture, provisions, sentinel policies, and version control options.
Master Terraform interview prep by covering state locking, tainted resources, plan versus apply, module versioning, and using the Terraform module registry.
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.