Skip to content

Commit

Permalink
Merge pull request #16 from qbeyond/feature/ama-update
Browse files Browse the repository at this point in the history
changed law bc we have ama agent
  • Loading branch information
QBYSEKIZ authored Mar 18, 2024
2 parents 38183ab + 83ee6b9 commit c046a22
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 76 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -103,7 +103,6 @@ module "virtual_machine" {
}
}
log_analytics_agent = azurerm_log_analytics_workspace.this
name_overrides = {
nic = local.nic
Expand Down Expand Up @@ -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
Expand All @@ -185,7 +178,6 @@ resource "azurerm_log_analytics_workspace" "this" {
| <a name="input_subnet"></a> [subnet](#input\_subnet) | The variable takes the subnet as input and takes the id and the address prefix for further configuration. | <pre>object({<br> id = string<br> address_prefixes = list(string)<br> })</pre> | n/a | yes |
| <a name="input_virtual_machine_config"></a> [virtual\_machine\_config](#input\_virtual\_machine\_config) | <pre>size: The size of the vm. Possible values can be seen here: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes<br> os_sku: The os that will be running on the vm.<br> location: The location of the virtual machine.<br> availability_set_id: Optionally specify an availibilty set for the vm.<br> zone: Optionally specify an availibility zone for the vm. <br> os_version: Optionally specify an os version for the chosen sku. Defaults to latest.<br> admin_username: Optionally choose the admin_username of the vm. Defaults to loc_sysadmin. <br> The local admin name could be changed by the gpo in the target ad.<br> os_disk_caching: Optionally change the caching option of the os disk. Defaults to ReadWrite.<br> os_disk_storage_type: Optionally change the os_disk_storage_type. Defaults to StandardSSD_LRS.<br> os_disk_size_gb: Optionally change the size of the os disk. Defaults to be specified by image.<br> tags: Optionally specify tags in as a map.<br> timezone: Optionally change the timezone of the VM. Defaults to UTC.<br> (More timezone names: https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).<br> write_accelerator_enabled: Optionally activate write accelaration for the os disk. Can only<br> be activated on Premium_LRS disks and caching deactivated. Defaults to false.<br> patch_assessment_mode: Specifies the mode of VM Guest Patching for the Virtual Machine.<br> patch_mode: Specifies the mode of in-guest patching to this Windows Virtual Machine.<br> bypass_platform_safety_checks_on_user_schedule_enabled: This setting ensures that machines are patched by using your configured schedules and not autopatched.<br> Can only be set to true when patch_mode is set to AutomaticByPlatform.</pre> | <pre>object({<br> hostname = string<br> size = string<br> os_sku = string<br> location = string<br> availability_set_id = optional(string)<br> zone = optional(string)<br> os_version = optional(string, "latest")<br> admin_username = optional(string, "loc_sysadmin")<br> os_disk_caching = optional(string, "ReadWrite")<br> os_disk_storage_type = optional(string, "StandardSSD_LRS")<br> os_disk_size_gb = optional(number)<br> tags = optional(map(string))<br> timezone = optional(string, "UTC")<br> write_accelerator_enabled = optional(bool, false)<br> patch_assessment_mode = optional(string, "AutomaticByPlatform")<br> patch_mode = optional(string, "AutomaticByPlatform")<br> bypass_platform_safety_checks_on_user_schedule_enabled = optional(bool, true)<br> })</pre> | n/a | yes |
| <a name="input_data_disks"></a> [data\_disks](#input\_data\_disks) | <pre><logical name of the data disk> = {<br> lun: Number of the lun.<br> disk_size_gb: The size of the data disk.<br> storage_account_type: Optionally change the storage_account_type. Defaults to StandardSSD_LRS.<br> caching: Optionally activate disk caching. Defaults to None.<br> create_option: Optionally change the create option. Defaults to Empty disk.<br> write_accelerator_enabled: Optionally activate write accelaration for the data disk. Can only<br> be activated on Premium_LRS disks and caching deactivated. Defaults to false.<br> }</pre> | <pre>map(object({<br> lun = number<br> disk_size_gb = number<br> storage_account_type = optional(string, "StandardSSD_LRS")<br> caching = optional(string, "None")<br> create_option = optional(string, "Empty")<br> write_accelerator_enabled = optional(bool, false)<br> }))</pre> | `{}` | no |
| <a name="input_log_analytics_agent"></a> [log\_analytics\_agent](#input\_log\_analytics\_agent) | <pre>Installs the log analytics agent(MicrosoftMonitoringAgent).<br> workspace_id: Specify id of the log analytics workspace to which monitoring data will be sent.<br> shared_key: The Primary shared key for the Log Analytics Workspace..</pre> | <pre>object({<br> workspace_id = string<br> primary_shared_key = string<br> })</pre> | `null` | no |
| <a name="input_name_overrides"></a> [name\_overrides](#input\_name\_overrides) | Possibility to override names that will be generated according to q.beyond naming convention. | <pre>object({<br> nic = optional(string)<br> nic_ip_config = optional(string)<br> public_ip = optional(string)<br> virtual_machine = optional(string)<br> os_disk = optional(string)<br> data_disks = optional(map(string), {})<br> })</pre> | `{}` | no |
| <a name="input_nic_config"></a> [nic\_config](#input\_nic\_config) | <pre>private_ip: Optioanlly specify a private ip to use. Otherwise it will be allocated dynamically.<br> dns_servers: Optionally specify a list of dns servers for the nic.<br> nsg_id: Although it is discouraged you can optionally assign an NSG to the NIC.</pre> | <pre>object({<br> private_ip = optional(string)<br> dns_servers = optional(list(string))<br> nsg = optional(object({<br> id = string<br> }))<br> })</pre> | `{}` | no |
| <a name="input_public_ip_config"></a> [public\_ip\_config](#input\_public\_ip\_config) | <pre>enabled: Optionally select true if a public ip should be created. Defaults to false.<br> allocation_method: The allocation method of the public ip that will be created. Defaults to static.</pre> | <pre>object({<br> enabled = bool<br> allocation_method = optional(string, "Static")<br> })</pre> | <pre>{<br> "enabled": false<br>}</pre> | no |
Expand All @@ -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.
Expand All @@ -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 |
Expand Down
9 changes: 1 addition & 8 deletions examples/advanced/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ module "virtual_machine" {
}
}

log_analytics_agent = azurerm_log_analytics_workspace.this

name_overrides = {
nic = local.nic
Expand Down Expand Up @@ -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
}

22 changes: 0 additions & 22 deletions extension_azuremonitor.tf

This file was deleted.

8 changes: 0 additions & 8 deletions extension_dependencyagent.tf

This file was deleted.

16 changes: 1 addition & 15 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,4 @@ variable "name_overrides" {
default = {}
}

variable "log_analytics_agent" {
type = object({
workspace_id = string
primary_shared_key = string
})
sensitive = true
default = null
description = <<-DOC
```
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..
```
DOC
}

0 comments on commit c046a22

Please sign in to comment.