Giter VIP home page Giter VIP logo

azure-iac's Introduction

Terraform Azure Infrastructure Project

Terraform Azure License

Terraform Logo

Overview

This project uses Terraform to manage and provision infrastructure on Azure. It includes the configuration of resources such as resource groups, virtual networks, subnets, network interfaces, and virtual machines.

Índice

Project Structure

terraform/
├── main.tf
├── variables.tf
├── outputs.tf
├── providers.tf
├── modules/
│   ├── network/
│   │   ├── main.tf
│   │   ├── variables.tf
│   │   └── outputs.tf
│   ├── vm/
│   │   ├── main.tf
│   │   ├── variables.tf
│   │   └── outputs.tf
└── README.md

Prerequisites

  • Terraform v1.0+
  • Azure CLI v2.30.0+
  • An Azure account

Setup

1. Configure Azure CLI

az login

2. Initialize Terraform

terraform init

3. Configure Variables

Edit the terraform.tfvars file with appropriate values:

resource_group_name = "rg-olimpiadas"
location            = "eastus"
vnet_name           = "vnet-olimpiadas"
address_space       = ["10.0.0.0/16"]
subnet01_name       = "sub-olimpiadas01"
subnet01_prefix     = "10.0.1.0/24"
subnet02_name       = "sub-olimpiadas02"
subnet02_prefix     = "10.0.2.0/24"
nsg_name            = "nsg-olimpiadas"
tags = {
  Environment = "Test"
  Project     = "Olimpiadas"
}
vm_windows_name     = "vm-windows"
vm_windows_username = "your_user"
vm_windows_password = "your_password"
vm_linux_name       = "vm-linux"
vm_linux_username   = "your_user"
vm_linux_ssh_key    = "your_ssh_public_key"

4. Apply Terraform

terraform apply

Provisioned Resources

Azure Resources

  • Resource Group: rg-olimpiadas
  • Virtual Network: vnet-olimpiadas
  • Subnets:
    • sub-olimpiadas01
    • sub-olimpiadas02
  • Network Security Group: nsg-olimpiadas
  • Virtual Machines:
    • Windows VM: vm-windows
    • Linux VM: vm-linux

Outputs

Key outputs of this project include:

  • Resource Group ID
  • Virtual Network Name
  • Subnet IDs
  • Public IP Addresses of VMs

Cleanup

To destroy the provisioned infrastructure, run:

terraform destroy

Security Best Practices

  • Use Azure Key Vault: Store sensitive information such as passwords and SSH keys in Azure Key Vault to enhance security.
  • Environment Variables: Avoid hardcoding sensitive information in the codebase. Use environment variables instead.
  • Access Controls: Implement strict access controls and role-based access (RBAC) to limit access to sensitive resources.

Contribution

We welcome contributions! Please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

Please ensure your code adheres to the project's coding standards and includes appropriate tests.

License

This project is licensed under the MIT License. See the LICENSE file for more details.


This `README.md` should now be more comprehensive, consistent, and easier to navigate, while also encouraging better security practices and community contributions.

azure-iac's People

Contributors

tdsantos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.