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
- Initialize Terraform
terraform init- Review the plan
terraform plan- Apply the changes
terraform apply- 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.
admin_username = "azureuser"
admin_password = "MySecurePassword123!"π‘ Make sure your password meets Azure's complexity requirements.
To delete all resources and avoid charges:
terraform destroy- 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)
This project is licensed under the Apache License 2.0.
See the LICENSE file for full license text.
---