Skip to content

DILNATHRK/TerraformIAC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Here's your updated README.md with the Apache License 2.0 section added:


# πŸš€ Azure Virtual Machine Deployment with Terraform (Free Tier Friendly)

This project uses **Terraform** to provision an **Ubuntu Linux Virtual Machine** in **Microsoft Azure**, along with the necessary network infrastructure β€” all while staying within the **Azure Free Tier** limits.

---

## πŸ“¦ Project Structure

azure-vm-terraform/ β”œβ”€β”€ main.tf # Core Terraform config: VM, VNet, NIC, IP β”œβ”€β”€ variables.tf # Variable definitions β”œβ”€β”€ outputs.tf # Outputs like public IP β”œβ”€β”€ terraform.tfvars # Actual values for variables (e.g., admin credentials) └── README.md # Project documentation


---

## βœ… What This Project Does

- Creates a **Resource Group** (`myTFResourceGroup`)
- Provisions a **Virtual Network** and **Subnet**
- Allocates a **Dynamic Public IP**
- Deploys a **Standard_B1s Ubuntu VM** (Free Tier eligible)
- Outputs the **public IP** for SSH access

---

## πŸ”§ Prerequisites

- [Terraform](https://developer.hashicorp.com/terraform/downloads) (v1.1+)
- [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
- An Azure subscription with **Free Tier**
- Run `az login` before applying the plan

---

## βš™οΈ Usage

1. **Clone the repo**

```bash
git clone https://github.com/your-username/azure-vm-terraform.git
cd azure-vm-terraform
  1. Initialize Terraform
terraform init
  1. Review the plan
terraform plan
  1. Apply the changes
terraform apply
  1. SSH into the VM

Once you get the public IP from the output:

ssh azureuser@<public_ip>

Use the username and password defined in terraform.tfvars.


πŸ“„ Example terraform.tfvars

admin_username = "azureuser"
admin_password = "MySecurePassword123!"

πŸ’‘ Make sure your password meets Azure's complexity requirements.


🧼 Cleanup

To delete all resources and avoid charges:

terraform destroy

πŸ›‘οΈ Notes on Free Tier

  • VM size used: Standard_B1s (free up to 750 hours/month)
  • OS: Ubuntu 18.04 LTS (no license cost)
  • Public IP: Dynamic (free)
  • Disk: Standard HDD (no premium cost)


πŸ“œ License

This project is licensed under the Apache License 2.0.
See the LICENSE file for full license text.


---

About

This project is intended for provisioning Azure resources using Infrastructure as Code (IaC) with Terraform. It focuses on deploying a virtual machine within the Azure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages