Skip to content

Commit

Permalink
Add SKU parameters for admin jumpbox and resource processor VMSS (#2405)
Browse files Browse the repository at this point in the history
* As a Azure Administrator I need to specify size for the core VMs/VMSS as they size may not be available in my region
Fixes #2403

* update core version

* Update version.txt

Co-authored-by: Guy Bertental <gubert@microsoft.com>
  • Loading branch information
marrobi and guybartal authored Aug 4, 2022
1 parent 64a8239 commit 5c9ff90
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/tre-admins/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@
| `ENABLE_AIRLOCK_MALWARE_SCANNING` | If False, Airlock requests will skip the malware scanning stage. If set to True, Setting up a scanner manually is required! |
| `ENABLE_LOCAL_DEBUGGING` | Set to `false` by default. Setting this to `true` will ensure that Azure resources are accessible from your local development machine. (e.g. ServiceBus and Cosmos) |
| `PUBLIC_DEPLOYMENT_IP_ADDRESS` | The public IP address of the machine that is deploying TRE. (Your desktop or the build agents). In certain locations a dynamic script to retrieve this from [https://ipecho.net/plain](https://ipecho.net/plain) does not work. If this is the case, then you can 'hardcode' your IP. |
| `ADMIN_JUMPBOX_VM_SKU` | The SKU of the VM to use for the admin jumpbox. |
| `RESOURCE_PROCESSOR_VMSS_SKU` | The SKU of the VMMS to use for the resource processing VM. |
2 changes: 2 additions & 0 deletions templates/core/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ DEPLOY_NEXUS=true
RESOURCE_PROCESSOR_TYPE="vmss_porter"
API_APP_SERVICE_PLAN_SKU_SIZE="P1v2"
APP_SERVICE_PLAN_SKU="P1v2"
ADMIN_JUMPBOX_VM_SKU="Standard_B2s"
RESOURCE_PROCESSOR_VMSS_SKU="Standard_B2s"
ENABLE_AIRLOCK_MALWARE_SCANNING=false
2 changes: 1 addition & 1 deletion templates/core/terraform/admin-jumpbox.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "azurerm_windows_virtual_machine" "jumpbox" {
resource_group_name = azurerm_resource_group.core.name
location = azurerm_resource_group.core.location
network_interface_ids = [azurerm_network_interface.jumpbox_nic.id]
size = "Standard_B2s"
size = var.admin_jumpbox_vm_sku
allow_extension_operations = true
admin_username = "adminuser"
admin_password = random_password.password.result
Expand Down
1 change: 1 addition & 0 deletions templates/core/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ module "resource_processor_vmss_porter" {
key_vault_id = azurerm_key_vault.kv.id
subscription_id = var.arm_subscription_id
resource_processor_number_processes_per_instance = var.resource_processor_number_processes_per_instance
resource_processor_vmss_sku = var.resource_processor_vmss_sku

depends_on = [
module.azure_monitor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "vm_linux" {
name = "vmss-rp-porter-${var.tre_id}"
location = var.location
resource_group_name = var.resource_group_name
sku = "Standard_B2s"
sku = var.resource_processor_vmss_sku
instances = 1
admin_username = "adminuser"
disable_password_authentication = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ variable "app_insights_connection_string" {}
variable "key_vault_name" {}
variable "key_vault_id" {}
variable "resource_processor_number_processes_per_instance" {}
variable "resource_processor_vmss_sku" {}
variable "subscription_id" {
description = "The subscription id to create the resource processor permission/role. If not supplied will use the TF context."
type = string
Expand Down
12 changes: 12 additions & 0 deletions templates/core/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ variable "resource_processor_type" {
type = string
}

variable "resource_processor_vmss_sku" {
type = string
default = "Standard_B2s"
description = "The SKU of the resource processor VMSS."
}

variable "admin_jumpbox_vm_sku" {
type = string
default = "Standard_B2s"
description = "The SKU of the admin jumpbox VM."
}

variable "stateful_resources_locked" {
type = bool
default = true
Expand Down
2 changes: 1 addition & 1 deletion templates/core/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.4"
__version__ = "0.4.7"

0 comments on commit 5c9ff90

Please sign in to comment.