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"
}