Skip to content

Commit c4692a9

Browse files
authored
Merge pull request #3 from kumarvna/master
adding support to terraform v0.13
2 parents 785f19b + 90d89c1 commit c4692a9

File tree

4 files changed

+32
-7
lines changed

4 files changed

+32
-7
lines changed

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ module "vmscaleset" {
116116
windows_distribution_name = "windows2019dc"
117117
instances_count = 2
118118
admin_username = "azureadmin"
119-
admin_password = "complex_password"
119+
admin_password = "P@$$w0rd1234!"
120120
121121
# Public and private load balancer support for VM scale sets
122122
# Specify health probe port to allow LB to detect the backend endpoint status

examples/windows_vm_scale_sets/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module "vmscaleset" {
3030
windows_distribution_name = "windows2019dc"
3131
instances_count = 2
3232
admin_username = "azureadmin"
33-
admin_password = "complex_password"
33+
admin_password = "P@$$w0rd1234!"
3434
3535
# Public and private load balancer support for VM scale sets
3636
# Specify health probe port to allow LB to detect the backend endpoint status

examples/windows_vm_scale_sets/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module "vmscaleset" {
2323
windows_distribution_name = "windows2019dc"
2424
instances_count = 2
2525
admin_username = "azureadmin"
26-
admin_password = "complex_password"
26+
admin_password = "P@$$w0rd1234!"
2727

2828
# Public and private load balancer support for VM scale sets
2929
# Specify health probe port to allow LB to detect the backend endpoint status

main.tf

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,10 @@ resource "azurerm_monitor_autoscale_setting" "auto" {
425425
}
426426
}
427427

428-
#--------------------------------------------------
429-
# Azure Log Analytics Workspace Agent Installation
430-
#--------------------------------------------------
431-
resource "azurerm_virtual_machine_scale_set_extension" "omsagent" {
428+
#--------------------------------------------------------------
429+
# Azure Log Analytics Workspace Agent Installation for windows
430+
#--------------------------------------------------------------
431+
resource "azurerm_virtual_machine_scale_set_extension" "omsagentwin" {
432432
count = var.log_analytics_workspace_name != null && var.os_flavor == "windows" ? 1 : 0
433433
name = "OmsAgentForWindows"
434434
publisher = "Microsoft.EnterpriseCloud.Monitoring"
@@ -450,6 +450,31 @@ resource "azurerm_virtual_machine_scale_set_extension" "omsagent" {
450450
PROTECTED_SETTINGS
451451
}
452452

453+
#--------------------------------------------------------------
454+
# Azure Log Analytics Workspace Agent Installation for Linux
455+
#--------------------------------------------------------------
456+
resource "azurerm_virtual_machine_scale_set_extension" "omsagentlinux" {
457+
count = var.log_analytics_workspace_name != null && var.os_flavor == "linux" ? 1 : 0
458+
name = "OmsAgentForLinux"
459+
publisher = "Microsoft.EnterpriseCloud.Monitoring"
460+
type = "OmsAgentForLinux"
461+
type_handler_version = "1.13"
462+
auto_upgrade_minor_version = true
463+
virtual_machine_scale_set_id = azurerm_linux_virtual_machine_scale_set.linux_vmss.0.id
464+
465+
settings = <<SETTINGS
466+
{
467+
"workspaceId": "${data.azurerm_log_analytics_workspace.logws.0.workspace_id}"
468+
}
469+
SETTINGS
470+
471+
protected_settings = <<PROTECTED_SETTINGS
472+
{
473+
"workspaceKey": "${data.azurerm_log_analytics_workspace.logws.0.primary_shared_key}"
474+
}
475+
PROTECTED_SETTINGS
476+
}
477+
453478
#--------------------------------------
454479
# azurerm monitoring diagnostics
455480
#--------------------------------------

0 commit comments

Comments
 (0)