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

30
terraform/008/main.tf Normal file
View File

@@ -0,0 +1,30 @@
# terraform {
# required_providers {
# aws = {
# source = "hashicorp/aws"
# version = "~> 6.0"
# }
# }
# }
# provider "aws" {
# region = "us-east-1"
# }
# Look up the existing instance by its Name tag
data "aws_instance" "datacenter_ec2" {
filter {
name = "tag:Name"
values = ["datacenter-ec2"]
}
}
# Create an AMI from that instance
resource "aws_ami_from_instance" "datacenter_ec2_ami" {
name = "datacenter-ec2-ami"
source_instance_id = data.aws_instance.datacenter_ec2.id
tags = {
Name = "datacenter-ec2-ami"
}
}

9
terraform/008/task-8.md Normal file
View File

@@ -0,0 +1,9 @@
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 an AMI from an existing EC2 instance named datacenter-ec2 using Terraform.
Name of the AMI should be datacenter-ec2-ami, make sure AMI is in available state.
The Terraform working directory is /home/bob/terraform. Update the main.tf file (do not create a separate .tf file) to create the AMI.
Note: Right-click under the EXPLORER section in VS Code and select Open in Integrated Terminal to launch the terminal.