-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a windows VM as a jumpbox to Bastion RDP into the Hub network #210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
jumpbox
windows-virtual-machine
module to create a VM and supply these credentialsjumpbox-subnet
subnet module tosaca-hub
to set up traffic flow logs and NSG rules for SSH and RDPmlz_objectid
as 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
.)