Terraform – AWS SSM: Extract content

The SSM Parameter Store contains the following JSON:   It is necessary to extract the login and password, and use their values in the Terraform code. To do this, you can use the following construction:   And use variables:    

  Terraform/Terragrunt – Create a module. Part 1

In this example, we will create a Terraform module for the AWS provider, which will be launched for 3 different environments using Terragrunt.   Requirements: Installed AWS CLI Installed Terraform (version above 12.0) Installed Terragrunt  

 FIX ERROR – Terraform: Blocks of type “tags” are not expected here.

When trying to make a terraform plan or  terraform apply, terraform returns the following error: Error: Unsupported block type Blocks of type "tags" are not expected here. Did you mean to define argument "tags"? If so, use the equals sign to assign it a value.   Solution: In terraform versions below the 12, the following … Continue reading " FIX ERROR – Terraform: Blocks of type “tags” are not expected here."

FIX ERROR – Terraform: Instance Profile already exists

When executed, execute “terraform apply” during execution when creating the “IAM Profile“, it ends with the following error:   Solution: Use AWS Cli to find the IAM Profile and delete it. See the list of existing IAM Profiles: Remove unnecessary IAM Profile:

Terraform – Kubernetes cluster on AWS EC2

Terraform configuration example that creates Kubernetes cluster (Bare Metal) on AWS EC2. Creates Ingress with NodePort. IP addresses Ingress nodes. This template creates the following EC2 instances: 1 manager 2 workers 2 ingresses variables.tf

Terraform – Installation

Installing Terraform is quite simple, since it is written in Go, just download the archive with the binary file. Go to the download page: https://www.terraform.io/downloads.html Download the archive, extract the binary file and move it to “/usr/bin/” (or write it to PATH) Check: If you use the “bash” or “zsh” shell, you can add autocompletion … Continue reading "Terraform – Installation"