add a windows VM as a jumpbox to Bastion RDP into the Hub network#210
add a windows VM as a jumpbox to Bastion RDP into the Hub network#210
Conversation
There was a problem hiding this comment.
I'm getting this error when deploying in this way:
src/scripts/deploy.sh -s <subscriptionid> -z <deployment name>
Error: A resource with the ID "/subscriptions/<sub id>/resourcegroups/rg-t0-jbh006/providers/microsoft.network/virtualnetworks/vn-t0-jbh006/providers/microsoft.insights/diagnosticSettings/vn-t0-jbh006-vn-diagnostics" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_monitor_diagnostic_setting" for more information.
on ../../modules/virtual-network/main.tf line 30, in resource "azurerm_monitor_diagnostic_setting" "vnet":
30: resource "azurerm_monitor_diagnostic_setting" "vnet" {
ERROR: failed to apply tier-0 (1/5). Trying some manual clean-up and Terraform destroy...
Initializing modules...
|
Thanks for the help on this - it's an issue that happens if I create the resource using terraform and then delete it using the Azure CLI or Azure portal, and then recreate the resource using the same name. If I delete the resource using terraform then the issue does not happen (or if I use a unique name). |
brooke-hamilton
left a comment
There was a problem hiding this comment.
I was able to deploy and log into the VM via Bastion. 🥇
Description
This change proposes adding a Windows VM to allow for Bastion RDP into the Hub network via a new module called
jumpbox. To demo this, deploy MLZ in your preferred way and initiate a Bastion RDP session to the VM in the hub resource group. To retrieve the login credentials, add a KeyVault get secret management access policy for your principal.These changes propose:
jumpboxwindows-virtual-machinemodule to create a VM and supply these credentialsjumpbox-subnetsubnet module tosaca-hubto set up traffic flow logs and NSG rules for SSH and RDPmlz_objectidas a variable to reference the MLZ Service Principal's AAD object ID for assigning KeyVault policiesIssue reference
The issue this PR will close: #187, close: #190
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
shellcheck.vscode/extensions.json.)