diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 00000000..c8ee7c07 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,32 @@ +name: CI-CD Pipeline + +on: + push: + branches: + - main + +jobs: + docker-build-push: + runs-on: ubuntu-latest + + steps: + # Step 1: Checkout code + - name: Checkout repository + uses: actions/checkout@v4 + + # Step 2: Login to Docker Hub + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # Step 3: Build Docker image + - name: Build Docker image + run: | + docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/devops-assessment:latest . + + # Step 4: Push Docker image + - name: Push Docker image + run: | + docker push ${{ secrets.DOCKERHUB_USERNAME }}/devops-assessment:latest diff --git a/Devops.md b/Devops.md new file mode 100644 index 00000000..09e7676f --- /dev/null +++ b/Devops.md @@ -0,0 +1,89 @@ +# Docker-Based DevOps Deployment (with Terraform & CI/CD) + +## Overview +This document describes the **Docker-based deployment strategy** for a full-stack application, enhanced with **CI/CD automation using GitHub Actions** and **Infrastructure as Code (IaC) using Terraform**. + +The focus of this setup includes: +- Containerization using Docker +- Service orchestration using Docker Compose +- Automated image build and push using GitHub Actions +- Cloud infrastructure provisioning using Terraform + +--- + +## Application Stack + +- **Backend:** Django (REST API) +- **Frontend:** React (Vite + TypeScript) +- **Containerization:** Docker +- **Orchestration:** Docker Compose +- **CI/CD:** GitHub Actions +- **Infrastructure as Code:** Terraform +- **Cloud Platform:** AWS + +--- + +## Docker Containerization + +### Backend (Django) +- Dockerized using a **Python slim base image** +- Dependencies installed using `requirements.txt` +- REST API exposed on **port 8000** +- Runs as a standalone Docker container + +### Frontend (React – Vite + TypeScript) +- Dockerized using a **Node Alpine base image** +- Application built using **npm** +- Frontend exposed on **port 3000** +- Served through a Docker container + +--- + +## Docker Compose Orchestration + +- `docker-compose.yml` is used to manage multi-container deployment +- Backend and frontend run as **separate services** +- Services communicate via an **internal Docker network** +- Ports are mapped to the host system for browser access + +### Port Mapping + +| Service | Container Port | Host Port | +|--------|----------------|-----------| +| Backend | 8000 | 8000 | +| Frontend | 3000 | 3000 | + +--- + +## Run Application Using Docker + +### Prerequisites +- Docker +- Docker Compose + +### Command +```bash +docker compose up --build +``` +## Terraform (Infrastructure as Code) + +Terraform is used alongside Docker to provision and manage cloud infrastructure required for deployment. + +### Terraform Integration with Docker Workflow +- Terraform code is stored in `infra-terraform/` +- Infrastructure is defined using `.tf` files +- Enables automated provisioning of cloud resources (e.g., EC2, networking) +- Ensures Docker containers run on consistent and reproducible infrastructure + +### Terraform Commands +```bash +terraform init +terraform validate +terraform plan +terraform apply +``` + +## GitHub Actions CI/CD + +GitHub Actions automates Docker image build, push, and Terraform validation on every push to the `main` branch, ensuring consistent deployments and early infrastructure validation. + diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 00000000..437f8aaf --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,22 @@ +# Python cache +__pycache__/ +*.pyc +*.pyo +*.pyd + +# Virtual environments (VERY IMPORTANT) +venv/ +.venv/ +env/ + +# Git +.git/ +.gitignore + +# Frontend / build junk (safe even if not present) +node_modules/ +dist/ +build/ + +# Local DB +*.sqlite3 diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 00000000..6391e8b5 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,47 @@ +# -------- Builder stage -------- +FROM python:3.12-slim AS builder + +WORKDIR /app + +# System dependencies +RUN apt-get update && apt-get install -y \ + build-essential gcc libpq-dev \ + && rm -rf /var/lib/apt/lists/* + +# Create virtual environment +RUN python -m venv /opt/venv +ENV PATH="/opt/venv/bin:$PATH" + +# Install Python dependencies +RUN pip install --upgrade pip +RUN pip install django django-cors-headers psycopg2-binary + +# Copy project source (venv is ignored via .dockerignore) +COPY . . + +# -------- Runtime stage -------- +FROM python:3.12-slim + +WORKDIR /app + +# Create non-root user +RUN useradd -m appuser + +# Copy venv and app from builder +COPY --from=builder /opt/venv /opt/venv +COPY --from=builder /app /app + +# Permissions +RUN chown -R appuser:appuser /app /opt/venv + +USER appuser + +# Environment variables +ENV PATH="/opt/venv/bin:$PATH" +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 +ENV DJANGO_SETTINGS_MODULE=config.settings + +EXPOSE 8000 + +CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] diff --git a/backend/config/asgi.py b/backend/config/asgi.py index ffbb5f50..18377bb9 100644 --- a/backend/config/asgi.py +++ b/backend/config/asgi.py @@ -1,16 +1,16 @@ -""" -ASGI config for config project. - -It exposes the ASGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/6.0/howto/deployment/asgi/ -""" - -import os - -from django.core.asgi import get_asgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') - -application = get_asgi_application() +""" +ASGI config for config project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/6.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + +application = get_asgi_application() diff --git a/backend/config/settings.py b/backend/config/settings.py index b5764dac..6674ff19 100644 --- a/backend/config/settings.py +++ b/backend/config/settings.py @@ -1,122 +1,122 @@ -""" -Django settings for config project. - -Generated by 'django-admin startproject' using Django 6.0.1. - -For more information on this file, see -https://docs.djangoproject.com/en/6.0/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/6.0/ref/settings/ -""" - -from pathlib import Path - -# Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/6.0/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-_9x%j_pvwb=^d^%whvti=0)yk_-t(i62i^xj!yruyg%xotvkv&' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'corsheaders', - 'core', -] - -MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'corsheaders.middleware.CorsMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -] - -ROOT_URLCONF = 'config.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'config.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/6.0/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', - } -} - - -# Password validation -# https://docs.djangoproject.com/en/6.0/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - - -# Internationalization -# https://docs.djangoproject.com/en/6.0/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/6.0/howto/static-files/ - -STATIC_URL = 'static/' - -CORS_ALLOW_ALL_ORIGINS = True +""" +Django settings for config project. + +Generated by 'django-admin startproject' using Django 6.0.1. + +For more information on this file, see +https://docs.djangoproject.com/en/6.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/6.0/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/6.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-_9x%j_pvwb=^d^%whvti=0)yk_-t(i62i^xj!yruyg%xotvkv&' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'corsheaders', + 'core', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'corsheaders.middleware.CorsMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'config.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'config.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/6.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/6.0/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/6.0/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/6.0/howto/static-files/ + +STATIC_URL = 'static/' + +CORS_ALLOW_ALL_ORIGINS = True diff --git a/backend/config/urls.py b/backend/config/urls.py index 193911f5..befa9461 100644 --- a/backend/config/urls.py +++ b/backend/config/urls.py @@ -1,23 +1,23 @@ -""" -URL configuration for config project. - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/6.0/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: path('', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.urls import include, path - 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) -""" -from django.contrib import admin -from django.urls import path, include - -urlpatterns = [ - path('admin/', admin.site.urls), - path('api/', include('core.urls')), -] +""" +URL configuration for config project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/6.0/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path, include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('api/', include('core.urls')), +] diff --git a/backend/config/wsgi.py b/backend/config/wsgi.py index 4ced5749..5165ee97 100644 --- a/backend/config/wsgi.py +++ b/backend/config/wsgi.py @@ -1,16 +1,16 @@ -""" -WSGI config for config project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/6.0/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') - -application = get_wsgi_application() +""" +WSGI config for config project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/6.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + +application = get_wsgi_application() diff --git a/backend/core/admin.py b/backend/core/admin.py index 8c38f3f3..ea5d68b7 100644 --- a/backend/core/admin.py +++ b/backend/core/admin.py @@ -1,3 +1,3 @@ -from django.contrib import admin - -# Register your models here. +from django.contrib import admin + +# Register your models here. diff --git a/backend/core/apps.py b/backend/core/apps.py index 26f78a8e..ae16c3e7 100644 --- a/backend/core/apps.py +++ b/backend/core/apps.py @@ -1,5 +1,5 @@ -from django.apps import AppConfig - - -class CoreConfig(AppConfig): - name = 'core' +from django.apps import AppConfig + + +class CoreConfig(AppConfig): + name = 'core' diff --git a/backend/core/models.py b/backend/core/models.py index 71a83623..fd18c6ea 100644 --- a/backend/core/models.py +++ b/backend/core/models.py @@ -1,3 +1,3 @@ -from django.db import models - -# Create your models here. +from django.db import models + +# Create your models here. diff --git a/backend/core/tests.py b/backend/core/tests.py index 7ce503c2..de8bdc00 100644 --- a/backend/core/tests.py +++ b/backend/core/tests.py @@ -1,3 +1,3 @@ -from django.test import TestCase - -# Create your tests here. +from django.test import TestCase + +# Create your tests here. diff --git a/backend/core/urls.py b/backend/core/urls.py index eb42a8dc..32413910 100644 --- a/backend/core/urls.py +++ b/backend/core/urls.py @@ -1,6 +1,6 @@ -from django.urls import path -from .views import hello_world - -urlpatterns = [ - path('hello/', hello_world, name='hello_world'), -] +from django.urls import path +from .views import hello_world + +urlpatterns = [ + path('hello/', hello_world, name='hello_world'), +] diff --git a/backend/core/views.py b/backend/core/views.py index 14810e48..0892cba2 100644 --- a/backend/core/views.py +++ b/backend/core/views.py @@ -1,4 +1,4 @@ -from django.http import JsonResponse - -def hello_world(request): - return JsonResponse({"message": "Hello World from Django Backend!"}) +from django.http import JsonResponse + +def hello_world(request): + return JsonResponse({"message": "Hello World from Django Backend!"}) diff --git a/backend/manage.py b/backend/manage.py index 8e7ac79b..192aaab6 100755 --- a/backend/manage.py +++ b/backend/manage.py @@ -1,22 +1,22 @@ -#!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" -import os -import sys - - -def main(): - """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') - try: - from django.core.management import execute_from_command_line - except ImportError as exc: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) from exc - execute_from_command_line(sys.argv) - - -if __name__ == '__main__': - main() +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..add8f7f7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: "3.9" + +services: + backend: + build: + context: ./backend + ports: + - "8000:8000" + environment: + - DJANGO_SETTINGS_MODULE=config.settings + - DEBUG=0 + command: python manage.py runserver 0.0.0.0:8000 + + frontend: + build: + context: ./frontend + args: + VITE_API_URL: http://backend:8000 + ports: + - "3000:80" + depends_on: + - backend + diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 00000000..375e27eb --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,4 @@ +node_modules +dist +.git + diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 00000000..dff32d5d --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,37 @@ +# -------- Build stage -------- +FROM node:20-alpine AS builder +WORKDIR /app + +ARG VITE_API_URL +ENV VITE_API_URL=$VITE_API_URL + +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +# -------- Runtime stage -------- +FROM nginx:alpine + +# Create non-root user +RUN adduser -D appuser + +# Create and fix permissions for nginx directories +RUN mkdir -p \ + /var/cache/nginx/client_temp \ + /var/cache/nginx/proxy_temp \ + /var/cache/nginx/fastcgi_temp \ + /var/cache/nginx/uwsgi_temp \ + /var/cache/nginx/scgi_temp \ + /var/run \ + /run \ + /usr/share/nginx/html \ + && chown -R appuser:appuser /var/cache/nginx /var/run /run /usr/share/nginx/html + +# Copy built frontend +COPY --from=builder /app/dist /usr/share/nginx/html + +USER appuser + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/infra-terraform/EC2.tf b/infra-terraform/EC2.tf new file mode 100644 index 00000000..3296e2a2 --- /dev/null +++ b/infra-terraform/EC2.tf @@ -0,0 +1,67 @@ +resource "aws_key_pair" "my-key" { + key_name = "priya-key" + public_key = file("priya-key.pub") + + +} +resource "aws_default_vpc" "default" {//aws ka vpc configurable nhi hota to by default he rakte hai + +} + +resource "aws_security_group" "my_sg" { + name = "my security group" + description = "this is a security group don by terraform" + vpc_id = aws_default_vpc.default.id//interpolation : wo . jo hai usko interpolation bolte hai kisi bhi resource ke andar jo value hai wo aap utha sakte ho attributes ki values bhi utha sakte hai + + ingress { //inbound rules + description = "allow access to ssh port 22" + from_port = 22 + to_port = 22 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] // avaible to everyone + } + ingress { + description = "allow access to http port 80" + from_port = 80 + to_port = 80 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + ingress{ + + description = "this is allow accces to https port 443" + from_port = 443 + to_port = 443 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { //outbound rules + description= "allow all out going traffic" + to_port = 0 // to_port& from_port is always zero + from_port = 0 + protocol = "-1"//outgoing traffic for every type + cidr_blocks = ["0.0.0.0/0"] + + } + tags={ + name = "my security group" + } +} +resource "aws_instance" "my_instance" { + + ami= "ami-087a0156cb826e921" + instance_type = "t2.micro" + security_groups = [aws_security_group.my_sg.name] //interpolation + key_name = aws_key_pair.my-key.key_name // interpolation + + root_block_device { //ebs or volume + volume_size = "10" + volume_type = "gp3" + + + } + tags = { + Name = "devops-instance" // ec2 name + } +} \ No newline at end of file diff --git a/infra-terraform/terraform.tf b/infra-terraform/terraform.tf new file mode 100644 index 00000000..bbb27133 --- /dev/null +++ b/infra-terraform/terraform.tf @@ -0,0 +1,12 @@ +terraform{ + required_providers { + aws = { + source = "hashicorp/aws" + version = "5.78.0" + } + } +} +provider "aws" { + region = "eu-west-1" + +} \ No newline at end of file diff --git a/infra-terraform/variable.tf b/infra-terraform/variable.tf new file mode 100644 index 00000000..2c86a465 --- /dev/null +++ b/infra-terraform/variable.tf @@ -0,0 +1,33 @@ +variable "aws_region"{ + description = "this is the region for aws region" + default = "eu-west-1" +} + +# variable "aws_ec2_ami_id"{ +# description ="this is ami_id for ubuntu instance" +# default = "ami-087a0156cb826e921" + +# } + +variable "aws_instance_type" { + description ="this is a instance type for ec2 instance" + default = "t2.micro" + +} + +variable "aws_ec2_instance_name" { + description = "this is the name given to the ec2 instance" + default = "priya_instance" + +} + +variable "aws_root_volume_size" { + description ="this is root volume size for the aws " + default = "10" + +} + +variable "aws_instance_count"{ + description = "The count if Ec2 instance needed" + default = 1 +} \ No newline at end of file