mirror of
https://github.com/trailofbits/algo.git
synced 2025-07-21 13:03:02 +02:00
Add new Azure regions and allow user to select VM size (#332)
* Update Azure Region List Included several additional regions in the Azure list. In a future version we may want to ask users to choose a continent, then present region options since this list is getting long. * Add VM size selection Added prompt for user to choose VM size. Useful because the default size is not available in all regions, and there are cheaper sizes. * Handle vm_size choice in "Create an Instance" step Use the variable passed in that the user chose for vm_size. * Differentiate Basic A0 and Standard A0 * Remove vm_size D1 since it's being deprecated * Fix syntax issue - missing semicolons * Remove note to self comment * Remove changes to let user select VM size Removing my previous additions that let the user select their Azure VM size. * Hard code VM size to cheapest size Remove my usage of a variable for VM size. Update to use the Basic_A0, which is the cheapest size of VM.
This commit is contained in:
parent
b8d2dc68bb
commit
d37c6b72c5
2 changed files with 29 additions and 2 deletions
27
algo
27
algo
|
@ -94,7 +94,7 @@ Name the vpn server:
|
|||
azure_server_name=${azure_server_name:-algo}
|
||||
|
||||
read -p "
|
||||
What region should the server be located in?
|
||||
What region should the server be located in? (https://azure.microsoft.com/en-us/regions/)
|
||||
1. South Central US
|
||||
2. Central US
|
||||
3. North Europe
|
||||
|
@ -109,6 +109,19 @@ Name the vpn server:
|
|||
12. West Central US
|
||||
13. UK South
|
||||
14. UK West
|
||||
15. West US
|
||||
16. Brazil South
|
||||
17. Canada Central
|
||||
18. Central India
|
||||
19. East Asia
|
||||
20. Germany Central
|
||||
21. Germany Northeast
|
||||
22. Korea Central
|
||||
23. Korea South
|
||||
24. North Central US
|
||||
25. South India
|
||||
26. West India
|
||||
|
||||
Enter the number of your desired region:
|
||||
[1]: " -r azure_region
|
||||
azure_region=${azure_region:-1}
|
||||
|
@ -128,6 +141,18 @@ Enter the number of your desired region:
|
|||
12) region="westcentralus" ;;
|
||||
13) region="uksouth" ;;
|
||||
14) region="ukwest" ;;
|
||||
15) region="westus" ;;
|
||||
16) region="brazilsouth" ;;
|
||||
17) region="canadacentral" ;;
|
||||
18) region="centralindia" ;;
|
||||
19) region="eastasia" ;;
|
||||
20) region="germanycentral" ;;
|
||||
21) region="germanynortheast" ;;
|
||||
22) region="koreacentral" ;;
|
||||
23) region="koreasouth" ;;
|
||||
24) region="northcentralus" ;;
|
||||
25) region="southindia" ;;
|
||||
26) region="westindia" ;;
|
||||
esac
|
||||
|
||||
ROLES="azure vpn cloud"
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
virtual_network: algo_net
|
||||
name: "{{ azure_server_name }}"
|
||||
ssh_password_enabled: false
|
||||
vm_size: Standard_D1
|
||||
vm_size: Basic_A0
|
||||
tags:
|
||||
Environment: Algo
|
||||
ssh_public_keys:
|
||||
|
@ -91,6 +91,8 @@
|
|||
sku: '16.04-LTS'
|
||||
version: latest
|
||||
register: azure_rm_virtualmachine
|
||||
|
||||
# To-do: Add error handling - if vm_size requested is not available, can we fall back to another, ideally with a prompt?
|
||||
|
||||
- set_fact:
|
||||
ip_address: "{{ azure_rm_virtualmachine.ansible_facts.azure_vm.properties.networkProfile.networkInterfaces[0].properties.ipConfigurations[0].properties.publicIPAddress.properties.ipAddress }}"
|
||||
|
|
Loading…
Add table
Reference in a new issue