{"id":24964528,"url":"https://github.com/mathewsbuzetti/azure-infrastructure-template","last_synced_at":"2026-04-29T00:02:44.939Z","repository":{"id":275511247,"uuid":"925737429","full_name":"mathewsbuzetti/azure-infrastructure-template","owner":"mathewsbuzetti","description":"Infrastructure as Code (IaC) template for deploying a complete Azure environment with Virtual Machines, Networking, VPN Gateway, Backup, and Automation features. Includes a web interface for easy deployment.","archived":false,"fork":false,"pushed_at":"2025-02-25T19:48:17.000Z","size":486,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T20:35:27.551Z","etag":null,"topics":["azure","azure-automation","azure-deployment","azure-templates","azure-virtual-machines","cloud-automation","devops","infrastructure-as-code","powershell-script"],"latest_commit_sha":null,"homepage":"https://github.com/mathewsbuzetti/azure-infrastructure-template","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathewsbuzetti.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-01T16:18:51.000Z","updated_at":"2025-02-25T19:48:20.000Z","dependencies_parsed_at":"2025-02-03T02:25:09.445Z","dependency_job_id":"2891e899-c011-425a-bab8-35eae24b6516","html_url":"https://github.com/mathewsbuzetti/azure-infrastructure-template","commit_stats":null,"previous_names":["mathewsbuzetti/azure-infrastructure-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewsbuzetti%2Fazure-infrastructure-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewsbuzetti%2Fazure-infrastructure-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewsbuzetti%2Fazure-infrastructure-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewsbuzetti%2Fazure-infrastructure-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathewsbuzetti","download_url":"https://codeload.github.com/mathewsbuzetti/azure-infrastructure-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246117760,"owners_count":20726069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-automation","azure-deployment","azure-templates","azure-virtual-machines","cloud-automation","devops","infrastructure-as-code","powershell-script"],"created_at":"2025-02-03T10:16:26.560Z","updated_at":"2026-04-29T00:02:44.899Z","avatar_url":"https://github.com/mathewsbuzetti.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Implantação de Infraestrutura do Azure no BrazilSouth\n\n![Azure](https://img.shields.io/badge/Azure-blue?style=flat-square\u0026logo=microsoftazure)\n![PowerShell](https://img.shields.io/badge/PowerShell-5391FE?style=flat-square\u0026logo=powershell\u0026logoColor=white)\n![Status](https://img.shields.io/badge/Status-Production-green?style=flat-square)\n\n**Aplica-se a:** ✔️ VMs do Windows\n\n## 📋 Metadados\n\n| Metadado | Descrição |\n|----------|-----------|\n| Título | Template de Infraestrutura Azure para Ambiente Corporativo com Alta Disponibilidade |\n| Assunto | Azure Virtual Machines |\n| Tipo | Início Rápido |\n| Data | 02/02/2025 |\n| Autor | Mathews Buzetti |\n| Tags | azure-automation, windows-server, high-availability, infrastructure-as-code |\n\n## 💻 Especificações Técnicas\n\n### 💻 Máquina Virtual\n* Windows Server 2022 Datacenter\n* Tamanho: Standard_B2ms\n* Disco OS: 127GB StandardSSD_LRS\n* Opção de criar uma segunda VM com as mesmas configurações\n\n### 🌐 Networking\n* VNET (10.1.0.0/16)\n  * SNET-Internal (10.1.1.0/24)\n  * GatewaySubnet (10.1.253.0/27)\n* NSG com regras para:\n  * RDP (porta 3389)\n\n⚠️ **ATENÇÃO**: Por questões de segurança, após configurar a VPN, é altamente recomendado fechar a porta 3389 (RDP) para acesso externo. O acesso à VM deve ser feito através da VPN.\n\n### 🌍 IPs Públicos\n* VM: PIP-VM-[NOME-DA-VM]\n* VPN Gateway (opcional):\n  * PIP-S2S-PRIMARY (Site-to-Site Primário)\n  * PIP-S2S-SECONDARY (Site-to-Site Secundário)\n  * PIP-P2S-PRIMARY (Point-to-Site)\n* Todos configurados como:\n  * Tipo: Static\n  * SKU: Standard\n\n### 🔒 VPN Gateway (Opcional)\n* Gateway VPN Ativo-Ativo\n* Suporte para conexões S2S e P2S\n* SKU: VpnGw1\n\n### 💾 Armazenamento e Backup\n* Storage Account (Standard_LRS)\n* Recovery Services Vault\n* Availability Set\n\n### 🤖 Automation e Monitoramento\n* Automation Account\n  * Runbook: START_STOP_VMs (requer configuração adicional)\n* Log Analytics Workspace\n* Diagnósticos de Boot (desabilitado por padrão)\n\n## 📋 Pré-requisitos\n\n1. Você precisará de uma assinatura ativa do Azure.\n2. Você pode executar este script diretamente no Azure CloudShell. Não é necessário ter o PowerShell instalado localmente.\n3. O usuário que executar o script deve ter as seguintes permissões na assinatura do Azure:\n   - Contribuidor (Contributor) ou Proprietário (Owner) na assinatura\n\n## 🚀 Como Usar\n\n1. Baixe o script Deploy-AzureInfrastructure-BrazilSouth.ps1\n   \n   [![Download Script](https://img.shields.io/badge/Download%20Script-blue?style=flat-square)](https://github.com/mathewsbuzetti/deployazure/blob/main/Deploy-AzureInfrastructure-BrazilSouth.ps1)\n\n2. Acesse o portal do Azure e abra o Azure CloudShell:\n   \n   [![Azure CloudShell](https://img.shields.io/badge/Abrir%20Azure%20CloudShell-blue?style=flat-square\u0026logo=microsoftazure)](https://shell.azure.com)\n\n3. Faça o upload do script Deploy-AzureInfrastructure-BrazilSouth.ps1 no CloudShell.\n\n4. Navegue até o diretório onde você fez o upload do script.\n\n5. Acesse nosso site para gerar o código de execução do script:\n   \n   [![Gerador de Código](https://img.shields.io/badge/Gerador%20de%20C%C3%B3digo-blue?style=flat-square\u0026logo=microsoftazure)](https://mathewsbuzetti.github.io/azure-infrastructure-template/)\n\n   No site web será pedido os parâmetros necessários:\n   * ID da Assinatura Azure\n   * Nome do Cliente (maiúsculo)\n   * Nome do Cliente (minúsculo)\n   * Ambiente (ex: production, development)\n   * Nome da Máquina Virtual\n   * Nome da Segunda VM (opcional)\n   * Usuário e senha para login nas máquinas virtuais\n   * Selecione se deseja criar segunda VM\n   * Selecione se deseja instalar VPN **GW1**\n\n7. Copie o comando gerado.\n\n8. Cole o comando gerado no Azure CloudShell e pressione Enter.\n\nO script iniciará a implantação dos recursos do Azure.\n\n### ⏱️ Tempo de Execução\n- Deploy completo sem VPN: 30 minutos\n- Deploy com VPN: 60 minutos\n\n## ⚠️ Avisos Importantes e Pós-Instalação\n\n### Diagnóstico da VM\n- Após a criação da VM, é necessário ativar o Diagnóstico utilizando a conta de armazenamento que foi criada durante o processo.\n\n![image](https://github.com/user-attachments/assets/22375a24-4e82-400f-8c4f-3e05a0ad312f)\n\n### Configuração de Backup\n1. Alterar a redundância para Locally-redundant (LRS)\n   \n   \u003e 💰 **Recomendação**: A alteração para LRS é recomendada para redução de custos, pois oferece redundância suficiente para a maioria dos cenários com um custo menor.\n   \n![image](https://github.com/user-attachments/assets/bfabecec-1d52-4f64-959e-a904fb637e07)\n\n3. Definir a política de retenção conforme necessidade\n   \n   \u003e ⚙️ **Recomendação**: A política abaixo é uma recomendação amplamente utilizada por empresas. Caso deseje seguir este modelo:\n   \n![image](https://github.com/user-attachments/assets/0adee237-3151-4de4-a38f-3ea6b362be36)\n\n### Configuração do Start/Stop de VMs\n1. Baixe o script Start/Stop:\n   \n   [![Download Script Start/Stop](https://img.shields.io/badge/Download%20Script%20Start%2FStop-blue?style=flat-square\u0026logo=powershell)](https://github.com/mathewsbuzetti/deployazure/blob/main/Script%20Start%20e%20Stop%20de%20VMs.ps1)\n\n2. No Automation Account, acesse o Runbook \"START_STOP_VMs\"\n3. Importe o conteúdo do script baixado\n   \n![image](https://github.com/user-attachments/assets/6b321a34-4421-4816-b4aa-f783cedea4ec)\n\n5. Configure as políticas de execução:\n   \n   * Crie um agendamento para Start (ex: dias úteis às 9h)\n     \n![image](https://github.com/user-attachments/assets/a49a51f6-c229-4d40-b235-19f4bdae45e6)\n\n   * Crie um agendamento para Stop (ex: dias úteis às 19h)\n     \n![image](https://github.com/user-attachments/assets/6bb4c703-8a6c-4a1a-8714-b6f5274792e9)\n\n   * Configure os parâmetros:\n     - TagName: nome da tag para identificar VMs\n     - TagValue: valor da tag\n     - Shutdown: true (para parar) ou false (para iniciar)\n\n### Configuração de Tags na VM\n1. Acesse a VM que deseja configurar o Start/Stop automático\n2. Na seção \"Tags\", adicione uma nova tag:\n   \n   \u003e ⚙️ **Configuração**: A tag deve corresponder aos parâmetros configurados no Runbook\n   \n   * Nome da tag: [TagName configurado no Runbook]\n   * Valor da tag: [TagValue configurado no Runbook]\n     \n![image](https://github.com/user-attachments/assets/22375a24-4e82-400f-8c4f-3e05a0ad312f)\n\n### 🔐 Credenciais\n- **Username**: Definido durante a execução do script\n- **Password**: Definido durante a execução do script\n\n⚠️ **IMPORTANTE**: Use uma senha forte que atenda aos requisitos de segurança do Azure!\n\n## 🏗️ Resource Groups e Organização\n\n### Grupos de Recursos\n- RG-[CLIENT]-VM (BrazilSouth)\n- RG-[CLIENT]-Storage (BrazilSouth)\n- RG-[CLIENT]-Networks (BrazilSouth)\n- RG-[CLIENT]-Backup (BrazilSouth)\n- RG-[CLIENT]-Automation (East US) \n- RG-[CLIENT]-LogAnalytics (East US)\n\n## 🏷️ Tagging e Governança\n\nTodos os recursos são automaticamente tagueados com:\n- client: [nome-cliente]\n- environment: [ambiente]\n- technology: [tipo-recurso]\n\n## 🔄 Logs e Feedback\n\nO script fornece feedback em tempo real com cores:\n- 🟦 Cyan: Informação\n- 🟩 Verde: Sucesso\n- 🟨 Amarelo: Aviso\n- 🟥 Vermelho: Erro\n\n## 🔧 Parâmetros do Script\n\n| Parâmetro | Descrição | Exemplo | Obrigatório |\n|-----------|-----------|---------|-------------|\n| SubscriptionId | ID da Assinatura Azure | \"e875c481-...\" | Sim |\n| LocationBrazil | Região do Azure Brasil | \"brazilsouth\" | Sim |\n| LocationUS | Região do Azure EUA | \"eastus\" | Sim |\n| ClientNameUpper | Nome do Cliente (Maiúsculo) | \"MATHEWSB\" | Sim |\n| ClientNameLower | Nome do Cliente (Minúsculo) | \"mathewsb\" | Sim |\n| Environment | Ambiente do Deploy | \"production\" | Não |\n| VMName | Nome da Máquina Virtual Principal | \"MATHEWS-DC01\" | Sim |\n| SecondVMName | Nome da Segunda Máquina Virtual | \"MATHEWS-DC02\" | Não |\n| CriarSegundaVM | Criar Segunda VM | $true/$false | Não |\n| InstalarVPN | Instalar Gateway VPN | $true/$false | Não |\n| VMUsername | Nome do Usuário Admin | \"admaz\" | Sim |\n| VMPassword | Senha do Usuário Admin | \"Sua@Senha123\" | Sim |\n\n## 🔄 Versionamento\n\nScript desenvolvido por Mathews Buzetti.\n\n- Versão: 1.0.0\n- Última atualização: 02/02/2025\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathewsbuzetti%2Fazure-infrastructure-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathewsbuzetti%2Fazure-infrastructure-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathewsbuzetti%2Fazure-infrastructure-template/lists"}