Install AWS CLI on a Windows EC2 instance using Terraform and user data

In the last post, I discussed the steps involved in installing AWS.Tools module for PowerShell on AWS EC2 using user data and Terraform. This post lists the steps to install the AWS CLI on an AWS Windows EC2 instance. I used EC2 user data and Terraform to automate AWS CLI installation as part of the … Continue reading Install AWS CLI on a Windows EC2 instance using Terraform and user data

Install AWS.Tools module for PowerShell on AWS EC2 using user data and Terraform

I was under the impression that all AWS EC2 instances have the latest version of AWS CLI installed. So, I was in for a pretty shock when I discovered that is not always the case. However, I was required to use the AWS CLI, and since this was an EC2 with Windows OS, I proceeded … Continue reading Install AWS.Tools module for PowerShell on AWS EC2 using user data and Terraform

Manage sensitive variables in AWS EC2 user data with Terraform

If you have worked with EC2 user data, you'd have noticed a shortcoming in the approach  -the inability to pass command-line arguments to the user data script at run time. Let me explain why I believe that to be a problem. User data is a capability associated with an AWS EC2 instance as part of … Continue reading Manage sensitive variables in AWS EC2 user data with Terraform

Attach IAM role to AWS EC2 instance using Terraform

I have a fair level of understanding about the relationship between AWS IAM policy, role, user, and group. I have also implemented the concept of assumed-role and the trusted and trusting account association. You can read more about that at -Creating IAM assume-role relationship between two AWS accounts. So, when I heard of EC2s being … Continue reading Attach IAM role to AWS EC2 instance using Terraform

Working with AWS EC2 user data and Terraform

User data is a feature that allows customization of AWS EC2 (virtual machine) when it is created and (if desired) also with each restart after they are provisioned.As we all know, AWS EC2 (virtual machines) is the legacy approach to hosting applications in the world of containers. Last year I attended a webinar sponsored by … Continue reading Working with AWS EC2 user data and 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

Static analysis with Checkov, Terraform, and Azure Pipelines

As the name suggests, Static analysis is the ability to scan software code to search and highlight deviations from specified standards. The purpose of static code analysis is to speed up the feedback process of developing software or infrastructure. In general, once code is merged/committed to a repository, failures/defects/bugs are identified during the following stages: … Continue reading Static analysis with Checkov, Terraform, and Azure Pipelines