🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Terraform example program for aws_security_group, aws_instance and provisioner

provider "aws" {
region = "ap-south-1"
access_key = ""
secret_key = ""
}
resource "aws_security_group" "allow_tls" {
name = "devopsscool-sec-group"
description = "Allow TLS inbound traffic"
tags = {
Name = "devopsschool terraform example"
}
ingress {
# TLS (change to whatever ports you need)
from_port = 443
to_port = 443
protocol = "tcp"
# Please restrict your ingress to only necessary IPs and ports.
# Opening to 0.0.0.0/0 can lead to security vulnerabilities.
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
# TLS (change to whatever ports you need)
from_port = 80
to_port = 80
protocol = "tcp"
# Please restrict your ingress to only necessary IPs and ports.
# Opening to 0.0.0.0/0 can lead to security vulnerabilities.
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
# TLS (change to whatever ports you need)
from_port = 22
to_port = 22
protocol = "tcp"
# Please restrict your ingress to only necessary IPs and ports.
# Opening to 0.0.0.0/0 can lead to security vulnerabilities.
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
}
resource "aws_instance" "web" {
ami = "ami-5b673c34"
instance_type = "t2.micro"
key_name = "rajesh-mumbai"
vpc_security_group_ids = [aws_security_group.allow_tls.id]
tags = {
Name = "HelloWorld"
}
connection {
type = "ssh"
user = "ec2-user"
private_key = file("/home/centos/terraform/rajesh-terraform.pem")
#host = aws_instance.web.public_ip
host = self.public_ip
}
provisioner "local-exec" {
command = "touch devopsschool-local"
}
provisioner "remote-exec" {
inline = [
"touch /tmp/devopsschool-remote"
]
}
provisioner "file" {
source = "devopsschool-local"
destination = "/tmp/"
}
depends_on = [
aws_security_group.allow_tls,
]
}

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.