Posts

How to create a module for Resource group using Terraform - Part - 2

Using Terraform with Azure and create a module for Resource Group using Terraform Its part -1 link https://terraformwithkushagra.blogspot.com/2020/04/how-to-create-resource-in-azure-using.html How to create a module for Resource group using Terraform ======================================================= -- Create a module folder in the working directory and create a subfolder resourcegroup subfolder inside module folder Create 3 Files A.resource_group.tf =================== resource "azurerm_resource_group" "resource_group"{ name = var.resourcegroup location = var.location tags = var.tagging } B.variable.tf ============== variable "resourcegroup" { type =string } variable "location" { type =string } variable "tagging" { type = map } C.output.tf ========= output "azurerm_...

How to create a Resource group in Azure using Terraform Part -1

Using Terraform with Azure ------------------------------------------------------------ 1. Prerequisite for Working on Terraform 2. How to launch a Visual Studio code 3. How to make a connection to Azure with Terraform and provision azure resources A.Prerequisite :- 1. AZ CLI https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest -- Download MSI Installer -- Install 2. Terraform.exe https://www.terraform.io/downloads.html -- Download Windows 64 BIT and just copy the terraform.exe into %USERPROFILE%\AppData\Local\Microsoft\WindowsApps Benefit : you can call terraform.exe from any folder and any drive. refer blog -- https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them old release of terraform is present here https://releases.hashicorp.com/terraform/ 3. Visual Studio Code https://code.visualstudio.com/download -- Windows 10 -- Use...

How to spin 2 Node SQL Servers and 1 Node Domain Controller in AWS using Terraform

Using Terraform to Deploy 3 AMI(2 SQL Server & 1 Windows Server 2016)   on AWS Here I am creating 2 Node SQL Server and 1 Node Domain Controller in AWS using Terraform Below code will create  3 Windows Server, in these 3 Node,  2 Node will be SQL Server and 1 Node local Windows Server   All Windows VMs will have a public IP. it will also create below components:-  1 VPC  1 Subnet  1 Network ACL  1 Route table  1 Internet Gateway  1 Security Group  1 Route table association with Subnet  1 DHCP For Domain Controller Breaking up my Terraform Script to deploy my infrastructure I wrote 2 files: Main.tf — This would hold the codes of what I am building, my servers and configuration. Variables.tf — This holds all the variables used by my Main.tf to use, allowing me to change just a value in one file instead of sifting through my main.tf In order to execute this code launch Visual Studio...