docs: add Terraform certification notes and tasks
This commit is contained in:
30
terraform/010/main.tf
Normal file
30
terraform/010/main.tf
Normal 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 volume by its Name tag
|
||||
data "aws_ebs_volume" "devops_vol" {
|
||||
filter {
|
||||
name = "tag:Name"
|
||||
values = ["devops-vol"]
|
||||
}
|
||||
}
|
||||
|
||||
# Snapshot it
|
||||
resource "aws_ebs_snapshot" "devops_vol_ss" {
|
||||
volume_id = data.aws_ebs_volume.devops_vol.id
|
||||
description = "Devops Snapshot"
|
||||
|
||||
tags = {
|
||||
Name = "devops-vol-ss"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user