From 3a65c194f05ba524df2bcb2267cd7a4d6d9765e8 Mon Sep 17 00:00:00 2001 From: lolorol Date: Fri, 11 Dec 2020 10:47:42 +0000 Subject: [PATCH 1/3] Patch CI standalone not failing when terraform fails Fix Windows VM regression --- .../105-single-windows-vm-kv-admin-secrets/standalone/ci.sh | 2 ++ .../211-vm-bastion-winrm-agents/standalone/ci.sh | 2 ++ .../private_links/endpoints/centralized/standalone/ci.sh | 2 ++ modules/compute/virtual_machine/vm_windows.tf | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/compute/virtual_machine/105-single-windows-vm-kv-admin-secrets/standalone/ci.sh b/examples/compute/virtual_machine/105-single-windows-vm-kv-admin-secrets/standalone/ci.sh index facbf05476..ef7e2267eb 100755 --- a/examples/compute/virtual_machine/105-single-windows-vm-kv-admin-secrets/standalone/ci.sh +++ b/examples/compute/virtual_machine/105-single-windows-vm-kv-admin-secrets/standalone/ci.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + current_folder=$(pwd) cd standalone diff --git a/examples/compute/virtual_machine/211-vm-bastion-winrm-agents/standalone/ci.sh b/examples/compute/virtual_machine/211-vm-bastion-winrm-agents/standalone/ci.sh index 665889ed7f..8423e6c9c6 100755 --- a/examples/compute/virtual_machine/211-vm-bastion-winrm-agents/standalone/ci.sh +++ b/examples/compute/virtual_machine/211-vm-bastion-winrm-agents/standalone/ci.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + current_folder=$(pwd) cd standalone diff --git a/examples/networking/private_links/endpoints/centralized/standalone/ci.sh b/examples/networking/private_links/endpoints/centralized/standalone/ci.sh index f9fc873c40..afb3c0d66c 100755 --- a/examples/networking/private_links/endpoints/centralized/standalone/ci.sh +++ b/examples/networking/private_links/endpoints/centralized/standalone/ci.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + current_folder=$(pwd) cd standalone diff --git a/modules/compute/virtual_machine/vm_windows.tf b/modules/compute/virtual_machine/vm_windows.tf index 798c600512..f2e249979a 100644 --- a/modules/compute/virtual_machine/vm_windows.tf +++ b/modules/compute/virtual_machine/vm_windows.tf @@ -44,8 +44,8 @@ resource "azurerm_windows_virtual_machine" "vm" { location = var.location resource_group_name = var.resource_group_name size = each.value.size - admin_username = each.value.admin_username - admin_password = random_password.admin[local.os_type].result + admin_username = try(each.value.admin_user_key, null) == null ? each.value.admin_username : local.admin_user + admin_password = try(each.value.admin_password_key, null) == null ? random_password.admin[local.os_type].result : local.admin_password network_interface_ids = local.nic_ids allow_extension_operations = try(each.value.allow_extension_operations, null) computer_name = azurecaf_name.windows_computer_name[each.key].result From b68079b9259d0da9f9d133ac98d726f81139e80e Mon Sep 17 00:00:00 2001 From: lolorol Date: Fri, 11 Dec 2020 10:55:25 +0000 Subject: [PATCH 2/3] Update rover to rover:2012.0420 --- .devcontainer/devcontainer.json | 1 + .devcontainer/docker-compose.yml | 2 +- .github/workflows/master-100.yaml | 6 +++--- .github/workflows/master-sql-mi.yaml | 6 +++--- .github/workflows/master-standalone.yaml | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4db12bd932..0d90722151 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,6 +10,7 @@ // Container user to use in VSCode Online and GitHub Codespaces "containerUser" : "vscode", + "remoteUser": "vscode", // The optional 'workspaceFolder' property is the path VS Code should open by default when // connected. This is typically a volume mount in .devcontainer/docker-compose.yml diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 0bb90edc47..5042e6b05c 100755 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -6,7 +6,7 @@ version: '3.7' services: rover: - image: aztfmod/rover:2011.3012 + image: aztfmod/rover:2012.0420 user: vscode labels: diff --git a/.github/workflows/master-100.yaml b/.github/workflows/master-100.yaml index a1ed81ab02..8c4149342d 100755 --- a/.github/workflows/master-100.yaml +++ b/.github/workflows/master-100.yaml @@ -37,7 +37,7 @@ jobs: random_length: ['5'] container: - image: aztfmod/rover:2011.3012 + image: aztfmod/rover:2012.0420 options: --user 0 steps: @@ -124,7 +124,7 @@ jobs: ] container: - image: aztfmod/rover:2011.3012 + image: aztfmod/rover:2012.0420 options: --user 0 steps: @@ -168,7 +168,7 @@ jobs: region: ["southeastasia"] container: - image: aztfmod/rover:2011.3012 + image: aztfmod/rover:2012.0420 options: --user 0 steps: diff --git a/.github/workflows/master-sql-mi.yaml b/.github/workflows/master-sql-mi.yaml index 42732c4784..8301efffb6 100644 --- a/.github/workflows/master-sql-mi.yaml +++ b/.github/workflows/master-sql-mi.yaml @@ -36,7 +36,7 @@ jobs: random_length: ['5'] container: - image: aztfmod/rover:2011.3012 + image: aztfmod/rover:2012.0420 options: --user 0 steps: @@ -83,7 +83,7 @@ jobs: ] container: - image: aztfmod/rover:2011.3012 + image: aztfmod/rover:2012.0420 options: --user 0 steps: @@ -125,7 +125,7 @@ jobs: region: ["southeastasia"] container: - image: aztfmod/rover:2011.3012 + image: aztfmod/rover:2012.0420 options: --user 0 steps: diff --git a/.github/workflows/master-standalone.yaml b/.github/workflows/master-standalone.yaml index b7c693bd46..15301d4eab 100755 --- a/.github/workflows/master-standalone.yaml +++ b/.github/workflows/master-standalone.yaml @@ -40,7 +40,7 @@ jobs: ] container: - image: aztfmod/rover:2011.3012 + image: aztfmod/rover:2012.0420 options: --user 0 steps: From 1c055a542dfd37c731f774a9156d072abe0b61eb Mon Sep 17 00:00:00 2001 From: lolorol Date: Fri, 11 Dec 2020 10:59:29 +0000 Subject: [PATCH 3/3] Update rover:2012.1109 --- .devcontainer/docker-compose.yml | 2 +- .github/workflows/master-100.yaml | 6 +++--- .github/workflows/master-sql-mi.yaml | 6 +++--- .github/workflows/master-standalone.yaml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 5042e6b05c..a8a5f8c8bd 100755 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -6,7 +6,7 @@ version: '3.7' services: rover: - image: aztfmod/rover:2012.0420 + image: aztfmod/rover:2012.1109 user: vscode labels: diff --git a/.github/workflows/master-100.yaml b/.github/workflows/master-100.yaml index 8c4149342d..43d40d14a2 100755 --- a/.github/workflows/master-100.yaml +++ b/.github/workflows/master-100.yaml @@ -37,7 +37,7 @@ jobs: random_length: ['5'] container: - image: aztfmod/rover:2012.0420 + image: aztfmod/rover:2012.1109 options: --user 0 steps: @@ -124,7 +124,7 @@ jobs: ] container: - image: aztfmod/rover:2012.0420 + image: aztfmod/rover:2012.1109 options: --user 0 steps: @@ -168,7 +168,7 @@ jobs: region: ["southeastasia"] container: - image: aztfmod/rover:2012.0420 + image: aztfmod/rover:2012.1109 options: --user 0 steps: diff --git a/.github/workflows/master-sql-mi.yaml b/.github/workflows/master-sql-mi.yaml index 8301efffb6..65e3700f78 100644 --- a/.github/workflows/master-sql-mi.yaml +++ b/.github/workflows/master-sql-mi.yaml @@ -36,7 +36,7 @@ jobs: random_length: ['5'] container: - image: aztfmod/rover:2012.0420 + image: aztfmod/rover:2012.1109 options: --user 0 steps: @@ -83,7 +83,7 @@ jobs: ] container: - image: aztfmod/rover:2012.0420 + image: aztfmod/rover:2012.1109 options: --user 0 steps: @@ -125,7 +125,7 @@ jobs: region: ["southeastasia"] container: - image: aztfmod/rover:2012.0420 + image: aztfmod/rover:2012.1109 options: --user 0 steps: diff --git a/.github/workflows/master-standalone.yaml b/.github/workflows/master-standalone.yaml index 15301d4eab..539954f104 100755 --- a/.github/workflows/master-standalone.yaml +++ b/.github/workflows/master-standalone.yaml @@ -40,7 +40,7 @@ jobs: ] container: - image: aztfmod/rover:2012.0420 + image: aztfmod/rover:2012.1109 options: --user 0 steps: