diff --git a/README.md b/README.md index 18c0841..8181f06 100644 --- a/README.md +++ b/README.md @@ -12,20 +12,25 @@ These types of resources supported: * [Network Security Group](https://www.terraform.io/docs/providers/azurerm/r/network_security_group.html) * [Availability Set](https://www.terraform.io/docs/providers/azurerm/r/availability_set.html) * [SSH2 Key generation for Dev Environments](https://www.terraform.io/docs/providers/tls/r/private_key.html) +* [Azure Monitoring Diagnostics](https://www.terraform.io/docs/providers/azurerm/r/monitor_diagnostic_setting.html) ## Module Usage ```hcl module "virtual-machine" { source = "kumarvna/virtual-machine/azurerm" - version = "1.0.0" + version = "2.0.0" # Resource Group, location, VNet and Subnet details resource_group_name = "rg-hub-demo-internal-shared-westeurope-001" location = "westeurope" virtual_network_name = "vnet-default-hub-westeurope" subnet_name = "snet-management-default-hub-westeurope" - virtual_machine_name = "testvm" + virtual_machine_name = "vm-linux" + + # (Optional) To enable Azure Monitoring and install log analytics agents + log_analytics_workspace_name = var.log_analytics_workspace_id + hub_storage_account_name = var.hub_storage_account_id # This module support multiple Pre-Defined Linux and Windows Distributions. # Linux images: ubuntu1804, ubuntu1604, centos75, centos77, centos81, coreos @@ -102,7 +107,8 @@ If the pre-defined Windows or Linux variants are not sufficient then, you can sp ```hcl module "virtual-machine" { - source = "github.com/kumarvit/terraform-azurerm-virtual-machine" + source = "kumarvna/virtual-machine/azurerm" + version = "2.0.0" # .... omitted @@ -194,7 +200,7 @@ In the Source and Destination columns, `VirtualNetwork`, `AzureLoadBalancer`, an ```hcl module "virtual-machine" { source = "kumarvna/virtual-machine/azurerm" - version = "1.0.0" + version = "2.0.0" # .... omitted @@ -254,7 +260,7 @@ End Date of the Project|Date when this application, workload, or service is plan ```hcl module "virtual-machine" { source = "kumarvna/virtual-machine/azurerm" - version = "1.0.0" + version = "2.0.0" # Resource Group, location, VNet and Subnet details resource_group_name = "rg-hub-demo-internal-shared-westeurope-001" diff --git a/examples/linux_virtual_machine/variables.tf b/examples/linux_virtual_machine/variables.tf index e69de29..d300910 100644 --- a/examples/linux_virtual_machine/variables.tf +++ b/examples/linux_virtual_machine/variables.tf @@ -0,0 +1,9 @@ +variable "log_analytics_workspace_name" { + description = "The name of log analytics workspace name" + default = null +} + +variable "hub_storage_account_name" { + description = "The name of the hub storage account to store logs" + default = null +} diff --git a/examples/mssql_windows_virtual_machine/variables.tf b/examples/mssql_windows_virtual_machine/variables.tf index e69de29..d300910 100644 --- a/examples/mssql_windows_virtual_machine/variables.tf +++ b/examples/mssql_windows_virtual_machine/variables.tf @@ -0,0 +1,9 @@ +variable "log_analytics_workspace_name" { + description = "The name of log analytics workspace name" + default = null +} + +variable "hub_storage_account_name" { + description = "The name of the hub storage account to store logs" + default = null +} diff --git a/examples/windows_virtual_machine/variables.tf b/examples/windows_virtual_machine/variables.tf index e69de29..d300910 100644 --- a/examples/windows_virtual_machine/variables.tf +++ b/examples/windows_virtual_machine/variables.tf @@ -0,0 +1,9 @@ +variable "log_analytics_workspace_name" { + description = "The name of log analytics workspace name" + default = null +} + +variable "hub_storage_account_name" { + description = "The name of the hub storage account to store logs" + default = null +}