From 3ac193db0dfd65b3a01df82779ba1ee256d361a9 Mon Sep 17 00:00:00 2001 From: QBYSEKIZ <117737189+QBYSEKIZ@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:01:56 +0100 Subject: [PATCH 1/3] changed law bc we have ama agent --- README.md | 2 +- examples/advanced/main.tf | 9 +-------- extension_azuremonitor.tf | 22 ---------------------- extension_dependencyagent.tf | 8 -------- variables.tf | 16 +--------------- 5 files changed, 3 insertions(+), 54 deletions(-) delete mode 100644 extension_azuremonitor.tf delete mode 100644 extension_dependencyagent.tf diff --git a/README.md b/README.md index 0562e1a..1344e1e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Module +# Windows VM [![GitHub tag](https://img.shields.io/github/tag/qbeyond/terraform-azurerm-windows-vm.svg)](https://registry.terraform.io/modules/qbeyond/windows-vm/azurerm/latest) [![License](https://img.shields.io/github/license/qbeyond/terraform-azurerm-windows-vm.svg)](https://github.com/qbeyond/terraform-azurerm-windows-vm/blob/main/LICENSE) diff --git a/examples/advanced/main.tf b/examples/advanced/main.tf index 23211a3..1dd4e25 100644 --- a/examples/advanced/main.tf +++ b/examples/advanced/main.tf @@ -46,7 +46,6 @@ module "virtual_machine" { } } - log_analytics_agent = azurerm_log_analytics_workspace.this name_overrides = { nic = local.nic @@ -103,10 +102,4 @@ resource "azurerm_network_security_group" "this" { } } -resource "azurerm_log_analytics_workspace" "this" { - name = local.law_name - location = local.location - resource_group_name = azurerm_resource_group.this.name - sku = "PerGB2018" - retention_in_days = 30 -} + diff --git a/extension_azuremonitor.tf b/extension_azuremonitor.tf deleted file mode 100644 index dc6c553..0000000 --- a/extension_azuremonitor.tf +++ /dev/null @@ -1,22 +0,0 @@ -resource "azurerm_virtual_machine_extension" "microsoftmonitoringagent" { - count = var.log_analytics_agent != null ? 1 : 0 - name = "MicrosoftMonitoringAgent" - virtual_machine_id = azurerm_windows_virtual_machine.this.id - publisher = "Microsoft.EnterpriseCloud.Monitoring" - type = "MicrosoftMonitoringAgent" - type_handler_version = "1.0" - auto_upgrade_minor_version = true - - settings = < Date: Mon, 18 Mar 2024 11:07:24 +0000 Subject: [PATCH 2/3] terraform-docs: automated action --- README.md | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/README.md b/README.md index 1344e1e..462b5ce 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,6 @@ module "virtual_machine" { } } - log_analytics_agent = azurerm_log_analytics_workspace.this name_overrides = { nic = local.nic @@ -160,13 +159,7 @@ resource "azurerm_network_security_group" "this" { } } -resource "azurerm_log_analytics_workspace" "this" { - name = local.law_name - location = local.location - resource_group_name = azurerm_resource_group.this.name - sku = "PerGB2018" - retention_in_days = 30 -} + ``` ## Requirements @@ -185,7 +178,6 @@ resource "azurerm_log_analytics_workspace" "this" { | [subnet](#input\_subnet) | The variable takes the subnet as input and takes the id and the address prefix for further configuration. |
object({
id = string
address_prefixes = list(string)
})
| n/a | yes | | [virtual\_machine\_config](#input\_virtual\_machine\_config) |
size: The size of the vm. Possible values can be seen here: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes
os_sku: The os that will be running on the vm.
location: The location of the virtual machine.
availability_set_id: Optionally specify an availibilty set for the vm.
zone: Optionally specify an availibility zone for the vm.
os_version: Optionally specify an os version for the chosen sku. Defaults to latest.
admin_username: Optionally choose the admin_username of the vm. Defaults to loc_sysadmin.
The local admin name could be changed by the gpo in the target ad.
os_disk_caching: Optionally change the caching option of the os disk. Defaults to ReadWrite.
os_disk_storage_type: Optionally change the os_disk_storage_type. Defaults to StandardSSD_LRS.
os_disk_size_gb: Optionally change the size of the os disk. Defaults to be specified by image.
tags: Optionally specify tags in as a map.
timezone: Optionally change the timezone of the VM. Defaults to UTC.
(More timezone names: https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
write_accelerator_enabled: Optionally activate write accelaration for the os disk. Can only
be activated on Premium_LRS disks and caching deactivated. Defaults to false.
patch_assessment_mode: Specifies the mode of VM Guest Patching for the Virtual Machine.
patch_mode: Specifies the mode of in-guest patching to this Windows Virtual Machine.
bypass_platform_safety_checks_on_user_schedule_enabled: This setting ensures that machines are patched by using your configured schedules and not autopatched.
Can only be set to true when patch_mode is set to AutomaticByPlatform.
|
object({
hostname = string
size = string
os_sku = string
location = string
availability_set_id = optional(string)
zone = optional(string)
os_version = optional(string, "latest")
admin_username = optional(string, "loc_sysadmin")
os_disk_caching = optional(string, "ReadWrite")
os_disk_storage_type = optional(string, "StandardSSD_LRS")
os_disk_size_gb = optional(number)
tags = optional(map(string))
timezone = optional(string, "UTC")
write_accelerator_enabled = optional(bool, false)
patch_assessment_mode = optional(string, "AutomaticByPlatform")
patch_mode = optional(string, "AutomaticByPlatform")
bypass_platform_safety_checks_on_user_schedule_enabled = optional(bool, true)
})
| n/a | yes | | [data\_disks](#input\_data\_disks) |
 = {
lun: Number of the lun.
disk_size_gb: The size of the data disk.
storage_account_type: Optionally change the storage_account_type. Defaults to StandardSSD_LRS.
caching: Optionally activate disk caching. Defaults to None.
create_option: Optionally change the create option. Defaults to Empty disk.
write_accelerator_enabled: Optionally activate write accelaration for the data disk. Can only
be activated on Premium_LRS disks and caching deactivated. Defaults to false.
}
|
map(object({
lun = number
disk_size_gb = number
storage_account_type = optional(string, "StandardSSD_LRS")
caching = optional(string, "None")
create_option = optional(string, "Empty")
write_accelerator_enabled = optional(bool, false)
}))
| `{}` | no | -| [log\_analytics\_agent](#input\_log\_analytics\_agent) |
Installs the log analytics agent(MicrosoftMonitoringAgent).
workspace_id: Specify id of the log analytics workspace to which monitoring data will be sent.
shared_key: The Primary shared key for the Log Analytics Workspace..
|
object({
workspace_id = string
primary_shared_key = string
})
| `null` | no | | [name\_overrides](#input\_name\_overrides) | Possibility to override names that will be generated according to q.beyond naming convention. |
object({
nic = optional(string)
nic_ip_config = optional(string)
public_ip = optional(string)
virtual_machine = optional(string)
os_disk = optional(string)
data_disks = optional(map(string), {})
})
| `{}` | no | | [nic\_config](#input\_nic\_config) |
private_ip: Optioanlly specify a private ip to use. Otherwise it will  be allocated dynamically.
dns_servers: Optionally specify a list of dns servers for the nic.
nsg_id: Although it is discouraged you can optionally assign an NSG to the NIC.
|
object({
private_ip = optional(string)
dns_servers = optional(list(string))
nsg = optional(object({
id = string
}))
})
| `{}` | no | | [public\_ip\_config](#input\_public\_ip\_config) |
enabled: Optionally select true if a public ip should be created. Defaults to false.
allocation_method: The allocation method of the public ip that will be created. Defaults to static.
|
object({
enabled = bool
allocation_method = optional(string, "Static")
})
|
{
"enabled": false
}
| no | @@ -206,7 +198,6 @@ resource "azurerm_log_analytics_workspace" "this" { | [azurerm_network_interface_security_group_association](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface_security_group_association) | 1 | | [azurerm_public_ip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | 1 | | [azurerm_virtual_machine_data_disk_attachment](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_machine_data_disk_attachment) | 1 | -| [azurerm_virtual_machine_extension](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_machine_extension) | 2 | | [azurerm_windows_virtual_machine](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_virtual_machine) | 1 | **`Used` only includes resource blocks.** `for_each` and `count` meta arguments, as well as resource blocks of modules are not considered. @@ -224,18 +215,6 @@ No modules. | [azurerm_managed_disk.data_disk](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/managed_disk) | resource | | [azurerm_virtual_machine_data_disk_attachment.data_disk](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_machine_data_disk_attachment) | resource | -### extension_azuremonitor.tf - -| Name | Type | -|------|------| -| [azurerm_virtual_machine_extension.microsoftmonitoringagent](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_machine_extension) | resource | - -### extension_dependencyagent.tf - -| Name | Type | -|------|------| -| [azurerm_virtual_machine_extension.dependencyagentwindows](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_machine_extension) | resource | - ### main.tf | Name | Type | From 83ee6b984fe8b25dfbf2c78d3c420ae2cbfbc66f Mon Sep 17 00:00:00 2001 From: QBYSEKIZ <117737189+QBYSEKIZ@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:09:22 +0100 Subject: [PATCH 3/3] updated changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bcc7a1..a167ab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0. ## [Unreleased] +## [4.0.0] - 2024-03-18 + +### Added + +### Changed +- fixed README title + +### Removed +- removed old mma + + ## [3.0.0] - 2024-02-08 ### Upgrade