docs: add Terraform certification notes and tasks

This commit is contained in:
2026-08-04 23:18:47 +02:00
parent 91a1849009
commit 758182a700
53 changed files with 4588 additions and 0 deletions

39
terraform/001/main.tf Normal file
View File

@@ -0,0 +1,39 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.0"
}
tls = {
source = "hashicorp/tls"
version = "~> 4.0"
}
local = {
source = "hashicorp/local"
version = "~> 2.5"
}
}
}
provider "aws" {
region = "us-east-1"
}
# Generate an RSA private key locally
resource "tls_private_key" "devops_kp" {
algorithm = "RSA"
rsa_bits = 4096
}
# Import the public half into AWS as an RSA key pair
resource "aws_key_pair" "devops_kp" {
key_name = "devops-kp"
public_key = tls_private_key.devops_kp.public_key_openssh
}
# Persist the private key to disk
resource "local_sensitive_file" "devops_kp_pem" {
content = tls_private_key.devops_kp.private_key_pem
filename = "/home/bob/devops-kp.pem"
file_permission = "0400"
}

15
terraform/001/task-1.md Normal file
View File

@@ -0,0 +1,15 @@
## Task 1
The Nautilus DevOps team is strategizing the migration of a portion of their infrastructure to the AWS cloud. Recognizing the scale of this undertaking, they have opted to approach the migration in incremental steps rather than as a single massive transition. To achieve this, they have segmented large tasks into smaller, more manageable units. This granular approach enables the team to execute the migration in gradual phases, ensuring smoother implementation and minimizing disruption to ongoing operations. By breaking down the migration into smaller tasks, the Nautilus DevOps team can systematically progress through each stage, allowing for better control, risk mitigation, and optimization of resources throughout the migration process.
For this task, create a key pair using Terraform with the following requirements:
Name of the key pair should be devops-kp.
Key pair type must be rsa.
The private key file should be saved under /home/bob/devops-kp.pem.
The Terraform working directory is /home/bob/terraform. Create the main.tf file (do not create a different .tf file) to accomplish this task.
Note: Right-click under the EXPLORER section in VS Code and select Open in Integrated Terminal to launch the terminal.