Create an Amazon EC2 instance with Session Manager access using Terraform

Sometimes, connecting an EC2 instance after provisioning is necessary to verify whether the user-data script ran successfully, review if something is passing/failing, etc. As of August 2023, there are four ways of connecting to an Amazon EC2 instance running on Linux from the AWS console  -EC2 Instance Connect, Session Manager, SSH client, and EC2 serial … Continue reading Create an Amazon EC2 instance with Session Manager access using Terraform

Deploy Across AWS Accounts Like a Pro: Terragrunt, Terraform, and GitHub Actions

In the past, I've written a note explaining the process of deploying the Terraform IaC configuration into an AWS account using GitHub Actions. In this note, I extend that functionality and deploy the same Terraform IaC configuration across multiple AWS accounts using Terragrunt and GitHub Actions. Before we delve deeper, let me briefly explain the … Continue reading Deploy Across AWS Accounts Like a Pro: Terragrunt, Terraform, and GitHub Actions

CI-CD with Terraform and GitHub Actions to deploy to AWS

GitHub Actions is a CI/CD tool that can automate the provisioning of AWS resources using Terraform. Previously, I wrote a detailed post explaining the concepts associated with using Terraform to create an application load balancer that you can read here -add an application load balancer to Amazon EC2 using Terraform. In this note, I further … Continue reading CI-CD with Terraform and GitHub Actions to deploy to AWS

Add an application load balancer to Amazon EC2 using Terraform

A highly available application has a higher chance of attracting customers because they are assured of consistency in service. Load balancing is a cost-effective way to increase an application's availability. In this note, I describe the steps to add an application load balancer to three Amazon EC2 instances hosted in three public subnets in different … Continue reading Add an application load balancer to Amazon EC2 using Terraform

Strengthen security posture with Terraform and AWS IAM to manage AWS cloud resources

Is Terraform using an AWS IAM administrator user credential to manage AWS resources?

Terraform uses AWS IAM user credentials to manage resources in the AWS cloud. It does so by utilizing the secret key and access key of the IAM user. Hence, Terraform's ability to manage (create/update/delete) resources depend on the permission associated with the AWS IAM user. When I started working with Terraform to manage resources in … Continue reading Strengthen security posture with Terraform and AWS IAM to manage AWS cloud resources

Terraform remote state file as a data source to support a layered IAC approach

A few months back, I came across an interesting concept of deploying infrastructure in a layered fashion, and I wish I had the URL saved to refer to it again. Nevertheless, the gist of the idea was that you could build an application product environment by deploying layer after layer of infrastructure. A layer of … Continue reading Terraform remote state file as a data source to support a layered IAC approach

Azure Pipelines (YAML) and Terraform to provision Amazon S3

In my previous note, [Azure DevOps and Terraform to provision Amazon S3], I listed in detail the steps to be followed to provision an Amazon S3 bucket using Azure DevOps and Terraform. I referred to the classic editor in the build definition/azure pipelines. Build and release definitions declared via a classic editor in Azure DevOps, … Continue reading Azure Pipelines (YAML) and Terraform to provision Amazon S3