It is necessary to extract the login and password from RDS, which are stored in AWS Secret Manager and use their values in the Terraform code. To do this, you can use the following construction: And use variables:
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:
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
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."
To create Terraform files based on the existing infrastructure, we will use Terraformer In this example, the macOS system will be used, so we install terraformer using homebrew: Installation for other OSs can be found on the project page. Create a directory for storing plugins (for working with providers) Terraform … Continue reading " Terraform – Generate files based on existing infrastructure"
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 configuration example, which creates 2 VPCs in different regions (EU and US) and creates connectivity between them. variables.tf
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
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"