Skip to content

Commit

Permalink
skip: update CI 243
Browse files Browse the repository at this point in the history
  • Loading branch information
vit-corp committed Sep 3, 2024
1 parent 02c49e9 commit 6191b25
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 4 deletions.
4 changes: 2 additions & 2 deletions auto_policy_testing/green/vm/extension_linux.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "azurerm_virtual_machine_extension" "lin3" {

resource "azurerm_virtual_machine_extension" "lin4" {
name = "AzureDiskEncryption"
virtual_machine_id = azurerm_linux_virtual_machine.this.id
virtual_machine_id = azurerm_linux_virtual_machine.this1.id
publisher = "Microsoft.Azure.Security"
type = "AzureDiskEncryptionForLinux"
type_handler_version = "1.1"
Expand All @@ -63,7 +63,7 @@ resource "azurerm_virtual_machine_extension" "lin4" {
}
SETTINGS

depends_on = [azurerm_virtual_machine_extension.lin3]
depends_on = [azurerm_linux_virtual_machine.this1]
}

resource "azurerm_virtual_machine_scale_set_extension" "linvmss1" {
Expand Down
2 changes: 1 addition & 1 deletion auto_policy_testing/green/vm/locks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ resource "azurerm_management_lock" "lin-lock" {
lock_level = "CanNotDelete"
notes = "Locked because it's needed by policy"

depends_on = [azurerm_virtual_machine_extension.lin4]
depends_on = [azurerm_virtual_machine_extension.lin3]

}
2 changes: 1 addition & 1 deletion auto_policy_testing/green/vm/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ output "vm" {
value = {
ecc-azure-116-cis_vm_endpoint_protection = azurerm_windows_virtual_machine.this.id,
ecc-azure-132-vm_wo_del_lock = azurerm_linux_virtual_machine.this.id,
ecc-azure-197-asb_vm_disk_encryption_on = azurerm_windows_virtual_machine.this.id,
ecc-azure-197-asb_vm_disk_encryption_on = azurerm_linux_virtual_machine.this1.id,
ecc-azure-275-asb_vm_backup = azurerm_windows_virtual_machine.this.id,
ecc-azure-337-vm_antimalware_auto_updates = azurerm_windows_virtual_machine.this.id,
ecc-azure-353-vmss_auto_image_patching = azurerm_linux_virtual_machine_scale_set.this.id,
Expand Down
38 changes: 38 additions & 0 deletions auto_policy_testing/green/vm/vm_encrypted.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
resource "azurerm_linux_virtual_machine" "this1" {
name = "${module.naming.resource_prefix.vm}g1lin"
location = data.terraform_remote_state.common.outputs.location
resource_group_name = data.terraform_remote_state.common.outputs.resource_group
size = "Standard_D2s_v3"
disable_password_authentication = true
admin_username = random_string.this.result
allow_extension_operations = true

admin_ssh_key {
username = random_string.this.result
public_key = tls_private_key.this.public_key_openssh
}

network_interface_ids = [
azurerm_network_interface.nic4.id
]

os_disk {
caching = "ReadWrite"
storage_account_type = "Standard_LRS"
disk_size_gb = 64
}

source_image_reference {
publisher = "Canonical"
offer = "UbuntuServer"
sku = "16.04-LTS"
version = "latest"
}

identity {
type = "SystemAssigned"
}

tags = module.naming.default_tags

}
14 changes: 14 additions & 0 deletions auto_policy_testing/green/vm/vnet.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,19 @@ resource "azurerm_network_interface" "nic3" {
private_ip_address_allocation = "Dynamic"
}

tags = module.naming.default_tags
}

resource "azurerm_network_interface" "nic4" {
name = "${module.naming.resource_prefix.networkinterface}-vm4"
location = data.terraform_remote_state.common.outputs.location
resource_group_name = data.terraform_remote_state.common.outputs.resource_group

ip_configuration {
name = "conf4-vm-green"
subnet_id = data.terraform_remote_state.common.outputs.subnet_id
private_ip_address_allocation = "Dynamic"
}

tags = module.naming.default_tags
}

0 comments on commit 6191b25

Please sign in to comment.