
Meet Kosta, a cloud architect and AWS certified expert, sharing practical insights on OpenTofu and Terraform migration, with focus on cloud security, delivery processes, and data analytics.
Explore OpenTofu, an open source infrastructure as code tool forked from Terraform under free license, backed by Linux Foundation projects, offering provider support, secure API-driven provisioning, and state tracking.
Install OpenTofu on macOS via Homebrew or GitHub releases, then extract binary, move to /usr/local/bin, chmod +x, and verify with tofu --version.
Install OpenTofu on linux arm64 by using snap or downloading a release from the official OpenTofu GitHub releases; extract, copy the binary to /usr/bin, chmod +x, and verify with -V.
Learn OpenTofu syntax (hcl) for infrastructure as code by building blocks, variables, and expressions that connect resources like AWS SSM parameters, with comment styles and template mixing.
Explore the OpenTofu workflow, including providers and core commands (init, plan, apply, destroy, fmt, console), and how OpenTofu interacts with vendor APIs to manage resources.
Explore OpenTofu data types and values, from strings and booleans to lists, maps, and objects, plus any and null, and learn how variables, data blocks, and resources connect with providers.
OpenTofu's null resource enables local or remote script execution when a shell isn't enough, with provisioners and depends_on to orchestrate actions and create a local file from an SSM parameter.
Leverage OpenTofu built-in functions and dynamic resource creation to conditionally deploy resources with count and dynamic blocks. Master inputs, depends_on, and outputs to build scalable, well-formatted infrastructure.
Use OpenTofu to create an AWS EC2 instance with a data source and aws_instance resource, configure security groups, bootstrap nginx, and store the public IP in SSM parameter for access.
Explore open tofu backend configuration to store the state file remotely, avoiding local state risks, with backends such as AWS S3, Azure Blob, GCP storage, and DynamoDB for concurrency control.
Create an S3 bucket and a DynamoDB table in AWS to store and lock the Terraform state for OpenTofu. Configure the backend and run init to migrate the state securely.
Explore OpenTofu's modular structure to organize infrastructure code into reusable models and provision security groups, EC2, parameter store, and RDS quickly.
Reuse modular OpenTofu models to quickly duplicate and customize infrastructure for a second application named live, updating security groups, the SSM parameter, and outputs.
Install terragrunt on macOS by downloading the Darwin Arm64 binary from the release page or via Homebrew. Copy the binary to /usr/local/bin, rename it terragrunt, and grant execute with chmod.
Install Terragrunt on Linux using Homebrew for a quick setup. Alternatively, download the Linux binary from the GitHub releases page, copy it to /usr/bin, chmod +x, and run Terragrunt.
Implement Terragrunt with OpenTofu across regions, configure the backend with S3 and DynamoDB, use environment and backend YAML files, and apply hooks for plan and apply during migration from Terraform.
See how Terragrunt reuses OpenTofu scripts to duplicate infrastructure across AWS regions, centralize state in S3, and control deployment order with dependencies and mock outputs.
Learn how to migrate Terraform configurations to OpenTofu, verify compatibility, back up state, and perform apply and destroy with tofu and Terragrunt, ensuring seamless AWS resource provisioning.
Introduction to OpenTofu release 1.7.0
The new Terraform Plugin SDK added support for provider-defined functions that you can use directly in OpenTofu.
Review of declarative import blocks, that supports now the usage of the for_each instruction on the block.
State encryption is one of the flagship features of this release. Here you will know how to use the encryption and even how to encrypt your state file on the AWS cloud using AWS KMS keys.
New feature of the removed block, that lets you remove a resource from the state file but keep it on the infrastructure.
Supporting of tfvars files from the test folder.
Review of improvements on CLI and built-in functions of OpenTofu
Welcome to the "OpenTofu & Terragrunt: From zero to migration from Terraform" course!
Step into the world of Infrastructure as Code (IaC) via OpenTofu and Terragrunt.
Explore the functionality of these tools, followed by a guide to prepare from scratch the multi-region architecture on AWS cloud and even migrate your existing Terraform configuration to OpenTofu.
Course Overview:
Foundations of OpenTofu:
Gain a comprehensive understanding of OpenTofu, exploring its features, syntax, and setup for efficient infrastructure management.
AWS architecture with OpenTofu:
Dive into practical deployments on AWS using OpenTofu, learning to create, manage, and optimize resources such as EC2 instances, SSM, and RDS.
Terragrunt Integration & Multi-Region Deployment:
Explore the integration of Terragrunt into your workflow, unraveling its role in managing Terraform configurations. Design and deploy a HA multi-region architecture, mastering scalability and regional infrastructure management.
Migration of existing Terraform code to OpenTofu:
Conduct a detailed comparison between OpenTofu and Terraform, identifying strengths and weaknesses. Learn the step-by-step process of migrating from Terraform to OpenTofu, addressing compatibility and optimization challenges.
Release 1.7.0 review
Implementation of provider-defined custom functions
Importing multiple objects to OpenTofu with a for loop
Encryption of state file with local encryption and AWS KMS key
Cleaning resources from state file with removed block
Implementing tests with an imported variables file
Overview of CLI and built-in functions changes
Upon finishing the course, you'll have well-prepared Infrastructure as Code scripts covering AWS architecture across two regions and capable of dynamic scaling using OpenTofu and Terragrunt tools following best practices. You'll also receive tips for making the right decisions between Terraform and OpenTofu, along with guidance on preparing your migration correctly. Join us in enhancing your IaC expertise on this journey!