docs: add Terraform certification notes and tasks
This commit is contained in:
50
terraform/002/main.tf
Normal file
50
terraform/002/main.tf
Normal file
@@ -0,0 +1,50 @@
|
||||
# terraform {
|
||||
# required_providers {
|
||||
# aws = {
|
||||
# source = "hashicorp/aws"
|
||||
# version = "~> 6.0"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
# provider "aws" {
|
||||
# region = "us-east-1"
|
||||
# }
|
||||
|
||||
# Look up the default VPC
|
||||
data "aws_vpc" "default" {
|
||||
default = true
|
||||
}
|
||||
|
||||
resource "aws_security_group" "devops_sg" {
|
||||
name = "devops-sg"
|
||||
description = "Security group for Nautilus App Servers"
|
||||
vpc_id = data.aws_vpc.default.id
|
||||
|
||||
ingress {
|
||||
description = "HTTP"
|
||||
from_port = 80
|
||||
to_port = 80
|
||||
protocol = "tcp"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
ingress {
|
||||
description = "SSH"
|
||||
from_port = 22
|
||||
to_port = 22
|
||||
protocol = "tcp"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
egress {
|
||||
from_port = 0
|
||||
to_port = 0
|
||||
protocol = "-1"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
tags = {
|
||||
Name = "devops-sg"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user