Automating Infrastructure using AWS and Terraform

What is AWS?

What is Terraform?

What is CI/CD pipeline?

CI/CD Pipeline

Continuous Integration :

Continuous Delivery :

Continuous deployment :

Continuous Delivery vs Continuous Deployment

What is .NET?

  1. .NET Framework is the original implementation of .NET. It supports running websites, services, desktop apps, and more on Windows.
  2. .NET Core is a cross-platform implementation for running websites, services, and console apps on Windows, Linux, and macOS. .NET Core is open source on GitHub.
  3. Xamarin/Mono is a .NET implementation for running apps on all the major mobile operating systems, including iOS and Android.

Terraform Script :

provider “aws” {
region = “us-east-1”
access_key = “***”
secret_key = “***”
}
resource “aws_vpc” “sgp” {
cidr_block = “10.0.0.0/16”
tags = {
Name = “SGP”
}
}
resource “aws_internet_gateway” “gw” {
vpc_id = aws_vpc.sgp.id
}
resource “aws_subnet” “publicsubnet” {
vpc_id = aws_vpc.sgp.id
cidr_block = “10.0.1.0/24”
availability_zone = “us-east-1a”
tags = {
Name = “Public-subnet”
}
}
resource “aws_subnet” “privatesubnet” {
vpc_id = aws_vpc.sgp.id
cidr_block = “10.0.2.0/24”
availability_zone = “us-east-1a”
tags = {
Name = “Private-subnet”
}
}
resource “aws_route_table” “public-route-table” {
vpc_id = aws_vpc.sgp.id
route {
cidr_block = “0.0.0.0/0”
gateway_id = aws_internet_gateway.gw.id
}
route {
ipv6_cidr_block = “::/0”
gateway_id = aws_internet_gateway.gw.id
}
tags = {
Name = “Public”
}
}
resource “aws_network_interface” “sgp-nic” {
subnet_id = aws_subnet.privatesubnet.id
private_ips = [“10.0.2.50”]
security_groups = [aws_security_group.allow_web.id]
}
resource “aws_route_table” “private-route-table” {
vpc_id = aws_vpc.sgp.id
route {
cidr_block = “10.0.2.0/24”
network_interface_id = aws_network_interface.sgp-nic.id

}
tags = {
Name = “Private”
}
}
tags = {
Name = “Private”
}
}
resource “aws_route_table_association” “private” {
subnet_id = aws_subnet.privatesubnet.id
route_table_id = aws_route_table.private-route-table.id
}
resource “aws_security_group” “allow_web” {
name = “allow_web_traffic”
description = “Allow Web inbound traffic”
vpc_id = aws_vpc.sgp.id
ingress {
description = “HTTPS”
from_port = 443
to_port = 443
protocol = “tcp”
cidr_blocks = [“0.0.0.0/0”]
}
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 = “allow_web”
}
}
resource “aws_instance” “web-server-instance” {
ami = “ami-087c17d1fe0178315”
instance_type = “t2.micro”
availability_zone = “us-east-1a”
key_name = “sgp”
tags = {
Name = “web-server”
}
}

Overview of Project :

Website using .NET framework

--

--

--

2x AWS Certified

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Introducing RabbitMQ: Your Reliable Message Broker!

Requirement Elicitation – Meaning, it’s Purpose and it’s techniques.

SAP Hana Demo 300 millions Records on 64GB RAM

Testing your Flutter App

Write Cleaner JavaScript with These Style Tips

Antares Auto Tune 8.1 Win Repack Virus

Manage and automate assets of Cloud Pak for Data 2.5 using collect and organize rest APIs: Part -1

Game Development Tutorials: Don’t Get Trapped

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Janvi Ajudiya

Janvi Ajudiya

2x AWS Certified

More from Medium

The first and most important TOOL in my DevOps career.

Cloud state management with Terraform(Project)

CI/CD defined through terraform using AWS CodePipeline, AWS CodeCommit, and AWS CodeBuild

Build AWS Infrastructure with Terraform and good practices