Skip to content

Commit aff9eb2

Browse files
authored
Standardize VM size variable names across AWS and GCP Terraform providers (#456)
Update instance type and machine type variable names in AWS and GCP to follow the `*_vm_size` naming convention. This ensures consistency with the Azure provider and across the entire project's Terraform codebase. The following variables have been renamed: - hana_instancetype / machine_type -> hana_vm_size - drbd_instancetype / drbd_machine_type -> drbd_vm_size - netweaver_instancetype / netweaver_machine_type -> netweaver_vm_size - monitor_instancetype / machine_type_monitor_server -> monitoring_vm_size - iscsi_instancetype / machine_type_iscsi_server -> iscsi_vm_size All internal module references, outputs, and documentation examples have been updated accordingly.
1 parent da75dd1 commit aff9eb2

7 files changed

Lines changed: 29 additions & 29 deletions

File tree

terraform/aws/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ module "drbd_node" {
101101
name = var.drbd_name
102102
network_domain = var.drbd_network_domain == "" ? var.network_domain : var.drbd_network_domain
103103
drbd_count = var.drbd_enabled == true ? 2 : 0
104-
vm_size = var.drbd_instancetype
104+
vm_size = var.drbd_vm_size
105105
availability_zones = data.aws_availability_zones.available.names
106106
os_image = local.drbd_os_image
107107
os_owner = local.drbd_os_owner
@@ -125,7 +125,7 @@ module "netweaver_node" {
125125
network_domain = var.netweaver_network_domain == "" ? var.network_domain : var.netweaver_network_domain
126126
xscs_server_count = local.netweaver_xscs_server_count
127127
app_server_count = var.netweaver_enabled ? var.netweaver_app_server_count : 0
128-
vm_size = var.netweaver_instancetype
128+
vm_size = var.netweaver_vm_size
129129
availability_zones = data.aws_availability_zones.available.names
130130
os_image = local.netweaver_os_image
131131
os_owner = local.netweaver_os_owner
@@ -147,7 +147,7 @@ module "hana_node" {
147147
name = var.hana_name
148148
network_domain = var.hana_network_domain == "" ? var.network_domain : var.hana_network_domain
149149
hana_count = var.hana_count
150-
vm_size = var.hana_instancetype
150+
vm_size = var.hana_vm_size
151151
availability_zones = data.aws_availability_zones.available.names
152152
os_image = local.hana_os_image
153153
os_owner = local.hana_os_owner
@@ -169,7 +169,7 @@ module "monitoring" {
169169
name = var.monitoring_name
170170
network_domain = var.monitoring_network_domain == "" ? var.network_domain : var.monitoring_network_domain
171171
monitoring_enabled = var.monitoring_enabled
172-
vm_size = var.monitor_instancetype
172+
vm_size = var.monitoring_vm_size
173173
key_name = aws_key_pair.key-pair.key_name
174174
security_group_id = local.security_group_id
175175
monitoring_srv_ip = local.monitoring_ip
@@ -190,7 +190,7 @@ module "iscsi_server" {
190190
subnet_ids = aws_subnet.infra-subnet.*.id
191191
os_image = local.iscsi_os_image
192192
os_owner = local.iscsi_os_owner
193-
vm_size = var.iscsi_instancetype
193+
vm_size = var.iscsi_vm_size
194194
key_name = aws_key_pair.key-pair.key_name
195195
security_group_id = local.security_group_id
196196
host_ips = local.iscsi_ips

terraform/aws/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ resource "local_file" "ansible_inventory" {
106106
hana_name = var.hana_name,
107107
hana_pip = module.hana_node.hana_public_ip,
108108
hana_remote_python = var.hana_remote_python,
109-
hana_machinetype = var.hana_instancetype,
109+
hana_machinetype = var.hana_vm_size,
110110
iscsi_name = var.iscsi_name,
111111
iscsi_pip = module.iscsi_server.iscsisrv_public_ip,
112112
iscsi_enabled = local.iscsi_enabled,
113113
iscsi_remote_python = var.iscsi_remote_python,
114-
iscsi_machinetype = var.iscsi_instancetype,
114+
iscsi_machinetype = var.iscsi_vm_size,
115115
use_sbd = local.use_sbd,
116116
routetable_id = aws_route_table.route-table.id,
117117
cluster_ip = local.hana_cluster_vip,

terraform/aws/terraform.tfvars.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ hana_name = "vmhana"
7575
# Instance type to use for the hana cluster nodes
7676
# SAP certified instances types can be found at https://aws.amazon.com/sap/instance-types/
7777
# and example sizing at https://aws.amazon.com/sap/solutions/s4hana/ .
78-
#hana_instancetype = "r6i.xlarge"
78+
#hana_vm_size = "r6i.xlarge"
7979

8080
# Disk type for HANA
8181
#hana_data_disk_type = "gp2"
@@ -183,7 +183,7 @@ hana_count = "2"
183183
# Hostname, without the domain part
184184
#drbd_name = "vmdrbd"
185185

186-
#drbd_instancetype = "t3.medium"
186+
#drbd_vm_size = "t3.medium"
187187

188188
# DRBD machines image. By default, PAYG image is used. The usage is the same as the HANA images
189189
#drbd_os_image = "suse-sles-sap-15-sp3-byos"
@@ -222,7 +222,7 @@ hana_count = "2"
222222
# Instance type to use for the Netweaver nodes
223223
# SAP certified instances types can be found at https://aws.amazon.com/sap/instance-types/
224224
# and example sizing at https://aws.amazon.com/sap/solutions/s4hana/ .
225-
#netweaver_instancetype = "r5.large"
225+
#netweaver_vm_size = "r5.large"
226226

227227
# Netweaver machines image. By default, PAYG image is used. The usage is the same as the HANA images
228228
#netweaver_os_image = "suse-sles-sap-15-sp3-byos"

terraform/aws/variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ variable "hana_os_owner" {
136136
default = ""
137137
}
138138

139-
variable "hana_instancetype" {
139+
variable "hana_vm_size" {
140140
description = "The instance type of the hana nodes"
141141
type = string
142142
default = "r6i.xlarge"
@@ -325,7 +325,7 @@ variable "drbd_os_owner" {
325325
default = ""
326326
}
327327

328-
variable "drbd_instancetype" {
328+
variable "drbd_vm_size" {
329329
description = "The instance type of the drbd node"
330330
type = string
331331
default = "t3.medium"
@@ -449,7 +449,7 @@ variable "iscsi_os_owner" {
449449
default = ""
450450
}
451451

452-
variable "iscsi_instancetype" {
452+
variable "iscsi_vm_size" {
453453
description = "The instance type of the iscsi server node."
454454
type = string
455455
default = "t3.small"
@@ -505,7 +505,7 @@ variable "monitoring_os_owner" {
505505
default = ""
506506
}
507507

508-
variable "monitor_instancetype" {
508+
variable "monitoring_vm_size" {
509509
description = "The instance type of the monitoring node."
510510
type = string
511511
default = "t3.micro"
@@ -567,7 +567,7 @@ variable "netweaver_os_owner" {
567567
default = ""
568568
}
569569

570-
variable "netweaver_instancetype" {
570+
variable "netweaver_vm_size" {
571571
description = "Instance type for the Netweaver machines"
572572
type = string
573573
default = "r5.large"

terraform/gcp/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ module "drbd_node" {
145145
name = var.drbd_name
146146
network_domain = var.drbd_network_domain == "" ? var.network_domain : var.drbd_network_domain
147147
drbd_count = var.drbd_enabled == true ? 2 : 0
148-
vm_size = var.drbd_machine_type
148+
vm_size = var.drbd_vm_size
149149
compute_zones = local.compute_zones
150150
network_name = local.vpc_name
151151
network_subnet_name = local.subnet_name
@@ -165,7 +165,7 @@ module "netweaver_node" {
165165
network_domain = var.netweaver_network_domain == "" ? var.network_domain : var.netweaver_network_domain
166166
xscs_server_count = local.netweaver_xscs_server_count
167167
app_server_count = var.netweaver_enabled ? var.netweaver_app_server_count : 0
168-
vm_size = var.netweaver_machine_type
168+
vm_size = var.netweaver_vm_size
169169
compute_zones = local.compute_zones
170170
network_name = local.vpc_name
171171
network_subnet_name = local.subnet_name
@@ -182,7 +182,7 @@ module "hana_node" {
182182
name = var.hana_name
183183
network_domain = var.hana_network_domain == "" ? var.network_domain : var.hana_network_domain
184184
hana_count = var.hana_count
185-
vm_size = var.machine_type
185+
vm_size = var.hana_vm_size
186186
compute_zones = local.compute_zones
187187
network_name = local.vpc_name
188188
network_subnet_name = local.subnet_name
@@ -203,7 +203,7 @@ module "monitoring" {
203203
name = var.monitoring_name
204204
network_domain = var.monitoring_network_domain == "" ? var.network_domain : var.monitoring_network_domain
205205
monitoring_enabled = var.monitoring_enabled
206-
vm_size = var.machine_type_monitor_server
206+
vm_size = var.monitoring_vm_size
207207
compute_zones = local.compute_zones
208208
network_subnet_name = local.subnet_name
209209
os_image = local.monitoring_os_image
@@ -216,7 +216,7 @@ module "iscsi_server" {
216216
name = var.iscsi_name
217217
network_domain = var.iscsi_network_domain == "" ? var.network_domain : var.iscsi_network_domain
218218
iscsi_count = local.iscsi_enabled == true ? var.iscsi_count : 0
219-
vm_size = var.machine_type_iscsi_server
219+
vm_size = var.iscsi_vm_size
220220
compute_zones = local.compute_zones
221221
network_subnet_name = local.subnet_name
222222
os_image = local.iscsi_os_image

terraform/gcp/terraform.tfvars.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ hana_name = "vmhana"
8282

8383
# HANA machine type
8484
# VM size to use for the cluster nodes
85-
machine_type = "n1-highmem-32"
85+
hana_vm_size = "n1-highmem-32"
8686

8787
# Custom sles4sap image
8888
# HANA machines image. By default, PAYG image is used (it will select the latest version that matches this name)
@@ -176,7 +176,7 @@ machine_type = "n1-highmem-32"
176176
#iscsi_disk_size = 10
177177

178178
# Type of VM (vCPUs and RAM)
179-
#machine_type_iscsi_server = "custom-1-2048"
179+
#iscsi_vm_size = "custom-1-2048"
180180

181181
##############################
182182
# Monitoring related variables
@@ -204,7 +204,7 @@ machine_type = "n1-highmem-32"
204204
# Hostname, without the domain part
205205
#drbd_name = "vmdrbd"
206206

207-
#drbd_machine_type = "n1-standard-4"
207+
#drbd_vm_size = "n1-standard-4"
208208

209209
# DRBD machines image. By default, PAYG image is used. The usage is the same as the HANA images
210210
#drbd_os_image = "suse-byos-cloud/sles-15-sp3-sap-byos"
@@ -248,7 +248,7 @@ machine_type = "n1-highmem-32"
248248
# Set to 2 or higher to deploy additional AAS instances in new machines
249249
#netweaver_app_server_count = 2
250250

251-
#netweaver_machine_type = "n1-standard-8"
251+
#netweaver_vm_size = "n1-standard-8"
252252

253253
# Netweaver machines image. By default, PAYG image is used. The usage is the same as the HANA images
254254
#netweaver_os_image = "suse-byos-cloud/sles-15-sp3-sap-byos"

terraform/gcp/variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ variable "hana_os_image" {
128128
default = ""
129129
}
130130

131-
variable "machine_type" {
131+
variable "hana_vm_size" {
132132
description = "The instance type of the hana nodes"
133133
type = string
134134
default = "n1-highmem-32"
@@ -322,7 +322,7 @@ variable "monitoring_name" {
322322
default = "vmmonitoring"
323323
}
324324

325-
variable "machine_type_monitor_server" {
325+
variable "monitoring_vm_size" {
326326
description = "VM size for the monitor server machine"
327327
type = string
328328
default = "custom-1-2048"
@@ -407,7 +407,7 @@ variable "iscsi_os_image" {
407407
default = ""
408408
}
409409

410-
variable "machine_type_iscsi_server" {
410+
variable "iscsi_vm_size" {
411411
description = "VM size for the iscsi server machine"
412412
type = string
413413
default = "custom-1-2048"
@@ -456,7 +456,7 @@ variable "drbd_enabled" {
456456
default = false
457457
}
458458

459-
variable "drbd_machine_type" {
459+
variable "drbd_vm_size" {
460460
description = "VM size for the DRBD machine"
461461
type = string
462462
default = "n1-standard-4"
@@ -566,7 +566,7 @@ variable "netweaver_os_image" {
566566
default = ""
567567
}
568568

569-
variable "netweaver_machine_type" {
569+
variable "netweaver_vm_size" {
570570
description = "The instance type of the netweaver nodes"
571571
type = string
572572
default = "n1-highmem-8"

0 commit comments

Comments
 (0)