Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 688112954
  • Loading branch information
sjswerdlow authored and copybara-github committed Oct 21, 2024
1 parent 0d5833d commit b67517b
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 68 deletions.
9 changes: 5 additions & 4 deletions modules/s4/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ resource "google_compute_disk" "sapdapp11_export_interfaces" {
}
name = "${length(var.app_vm_names) > (0 + (count.index * 2)) ? var.app_vm_names[0 + (count.index * 2)] : "${var.vm_prefix}app1${1 + (count.index * 2)}"}-export-interfaces"
project = data.google_project.sap-project.project_id
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["app_disk_export_interfaces_size"] != 0 ? var.disk_size_map["app_disk_export_interfaces_size"] : var.app_disk_export_interfaces_size)) : null
size = (var.disk_size_map["app_disk_export_interfaces_size"] != 0 ? var.disk_size_map["app_disk_export_interfaces_size"] : var.app_disk_export_interfaces_size)
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "app_disk_export_interfaces_size", var.app_disk_export_interfaces_size))) : null
size = lookup(var.disk_size_map, "app_disk_export_interfaces_size", var.app_disk_export_interfaces_size)

timeouts {
create = "1h"
delete = "1h"
Expand All @@ -74,8 +75,8 @@ resource "google_compute_disk" "sapdapp11_usr_sap" {
}
name = "${length(var.app_vm_names) > (0 + (count.index * 2)) ? var.app_vm_names[0 + (count.index * 2)] : "${var.vm_prefix}app1${1 + (count.index * 2)}"}-usr-sap"
project = data.google_project.sap-project.project_id
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["app_disk_usr_sap_size"] != 0 ? var.disk_size_map["app_disk_usr_sap_size"] : var.app_disk_usr_sap_size)) : null
size = (var.disk_size_map["app_disk_usr_sap_size"] != 0 ? var.disk_size_map["app_disk_usr_sap_size"] : var.app_disk_usr_sap_size)
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "app_disk_usr_sap_size", var.app_disk_usr_sap_size))) : null
size = lookup(var.disk_size_map, "app_disk_usr_sap_size", var.app_disk_usr_sap_size)
timeouts {
create = "1h"
delete = "1h"
Expand Down
4 changes: 2 additions & 2 deletions modules/s4/ascs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ resource "google_compute_disk" "sapdascs11_usr_sap" {
}
name = "${length(var.ascs_vm_names) > 0 ? var.ascs_vm_names[0] : "${var.vm_prefix}ascs11"}-usr-sap"
project = data.google_project.sap-project.project_id
provisioned_iops = var.ascs_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["ascs_disk_usr_sap_size"] != 0 ? var.disk_size_map["ascs_disk_usr_sap_size"] : var.ascs_disk_usr_sap_size)) : null
size = (var.disk_size_map["ascs_disk_usr_sap_size"] != 0 ? var.disk_size_map["ascs_disk_usr_sap_size"] : var.ascs_disk_usr_sap_size)
provisioned_iops = var.ascs_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "ascs_disk_usr_sap_size", var.ascs_disk_usr_sap_size))) : null
size = lookup(var.disk_size_map, "ascs_disk_usr_sap_size", var.ascs_disk_usr_sap_size)
timeouts {
create = "1h"
delete = "1h"
Expand Down
20 changes: 10 additions & 10 deletions modules/s4/db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ resource "google_compute_disk" "sapddb11_hana_data" {
}
name = "${length(var.db_vm_names) > 0 ? var.db_vm_names[0] : "${var.vm_prefix}db11"}-hana-data-${count.index}"
project = data.google_project.sap-project.project_id
provisioned_iops = var.db_data_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["db_disk_hana_data_size"] != 0 ? var.disk_size_map["db_disk_hana_data_size"] : var.db_disk_hana_data_size)) / var.number_data_disks : null
size = (var.disk_size_map["db_disk_hana_data_size"] != 0 ? var.disk_size_map["db_disk_hana_data_size"] : var.db_disk_hana_data_size) / var.number_data_disks
provisioned_iops = var.db_data_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "db_disk_hana_data_size", var.db_disk_hana_data_size))) / var.number_data_disks : null
size = lookup(var.disk_size_map, "db_disk_hana_data_size", var.db_disk_hana_data_size) / var.number_data_disks
timeouts {
create = "1h"
delete = "1h"
Expand All @@ -75,8 +75,8 @@ resource "google_compute_disk" "sapddb11_hana_log" {
}
name = "${length(var.db_vm_names) > 0 ? var.db_vm_names[0] : "${var.vm_prefix}db11"}-hana-log-${count.index}"
project = data.google_project.sap-project.project_id
provisioned_iops = var.db_log_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["db_disk_hana_log_size"] != 0 ? var.disk_size_map["db_disk_hana_log_size"] : var.db_disk_hana_log_size)) / var.number_log_disks : null
size = (var.disk_size_map["db_disk_hana_log_size"] != 0 ? var.disk_size_map["db_disk_hana_log_size"] : var.db_disk_hana_log_size) / var.number_log_disks
provisioned_iops = var.db_log_disk_type == "hyperdisk-extreme" ? max(10000, 2 * lookup(var.disk_size_map, "db_disk_hana_log_size", var.db_disk_hana_log_size)) / var.number_log_disks : null
size = lookup(var.disk_size_map, "db_disk_hana_log_size", var.db_disk_hana_log_size) / var.number_log_disks
timeouts {
create = "1h"
delete = "1h"
Expand All @@ -92,8 +92,8 @@ resource "google_compute_disk" "sapddb11_hana_shared" {
}
name = "${length(var.db_vm_names) > 0 ? var.db_vm_names[0] : "${var.vm_prefix}db11"}-hana-shared"
project = data.google_project.sap-project.project_id
provisioned_iops = var.db_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["db_disk_hana_shared_size"] != 0 ? var.disk_size_map["db_disk_hana_shared_size"] : var.db_disk_hana_shared_size)) : null
size = (var.disk_size_map["db_disk_hana_shared_size"] != 0 ? var.disk_size_map["db_disk_hana_shared_size"] : var.db_disk_hana_shared_size)
provisioned_iops = var.db_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "db_disk_hana_shared_size", var.db_disk_hana_shared_size))) : null
size = lookup(var.disk_size_map, "db_disk_hana_shared_size", var.db_disk_hana_shared_size)
timeouts {
create = "1h"
delete = "1h"
Expand All @@ -109,8 +109,8 @@ resource "google_compute_disk" "sapddb11_hanabackup" {
}
name = "${length(var.db_vm_names) > 0 ? var.db_vm_names[0] : "${var.vm_prefix}db11"}-hanabackup"
project = data.google_project.sap-project.project_id
provisioned_iops = var.db_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["db_disk_backup_size"] != 0 ? var.disk_size_map["db_disk_backup_size"] : var.db_disk_backup_size)) : null
size = (var.disk_size_map["db_disk_backup_size"] != 0 ? var.disk_size_map["db_disk_backup_size"] : var.db_disk_backup_size)
provisioned_iops = var.db_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "db_disk_backup_size", var.db_disk_backup_size))) : null
size = lookup(var.disk_size_map, "db_disk_backup_size", var.db_disk_backup_size)
timeouts {
create = "1h"
delete = "1h"
Expand All @@ -126,8 +126,8 @@ resource "google_compute_disk" "sapddb11_usr_sap" {
}
name = "${length(var.db_vm_names) > 0 ? var.db_vm_names[0] : "${var.vm_prefix}db11"}-usr-sap"
project = data.google_project.sap-project.project_id
provisioned_iops = var.db_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["db_disk_usr_sap_size"] != 0 ? var.disk_size_map["db_disk_usr_sap_size"] : var.db_disk_usr_sap_size)) : null
size = (var.disk_size_map["db_disk_usr_sap_size"] != 0 ? var.disk_size_map["db_disk_usr_sap_size"] : var.db_disk_usr_sap_size)
provisioned_iops = var.db_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "db_disk_usr_sap_size", var.db_disk_usr_sap_size))) : null
size = lookup(var.disk_size_map, "db_disk_usr_sap_size", var.db_disk_usr_sap_size)
timeouts {
create = "1h"
delete = "1h"
Expand Down
11 changes: 1 addition & 10 deletions modules/s4/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -423,16 +423,7 @@ variable "zone1_name" {
}

variable "disk_size_map" {
default = {
app_disk_export_interfaces_size = 0
app_disk_usr_sap_size = 0
ascs_disk_usr_sap_size = 0
db_disk_backup_size = 0
db_disk_hana_data_size = 0
db_disk_hana_log_size = 0
db_disk_hana_shared_size = 0
db_disk_usr_sap_size = 0
}
default = {}
description = "disk_size_map"
type = map(number)
}
Expand Down
17 changes: 9 additions & 8 deletions modules/s4_ha/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ resource "google_compute_disk" "sapdapp11_export_interfaces" {
}
name = "${length(var.app_vm_names) > (0 + (count.index * 2)) ? var.app_vm_names[0 + (count.index * 2)] : "${var.vm_prefix}app1${1 + (count.index * 2)}"}-export-interfaces"
project = data.google_project.sap-project.project_id
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["app_disk_export_interfaces_size"] != 0 ? var.disk_size_map["app_disk_export_interfaces_size"] : var.app_disk_export_interfaces_size)) : null
size = var.disk_size_map["app_disk_export_interfaces_size"] != 0 ? var.disk_size_map["app_disk_export_interfaces_size"] : var.app_disk_export_interfaces_size
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "app_disk_export_interfaces_size", var.app_disk_export_interfaces_size))) : null
size = lookup(var.disk_size_map, "app_disk_export_interfaces_size", var.app_disk_export_interfaces_size)
timeouts {
create = "1h"
delete = "1h"
Expand All @@ -83,8 +83,8 @@ resource "google_compute_disk" "sapdapp11_usr_sap" {
}
name = "${length(var.app_vm_names) > (0 + (count.index * 2)) ? var.app_vm_names[0 + (count.index * 2)] : "${var.vm_prefix}app1${1 + (count.index * 2)}"}-usr-sap"
project = data.google_project.sap-project.project_id
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["app_disk_usr_sap_size"] != 0 ? var.disk_size_map["app_disk_usr_sap_size"] : var.app_disk_usr_sap_size)) : null
size = (var.disk_size_map["app_disk_usr_sap_size"] != 0 ? var.disk_size_map["app_disk_usr_sap_size"] : var.app_disk_usr_sap_size)
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "app_disk_usr_sap_size", var.app_disk_usr_sap_size))) : null
size = lookup(var.disk_size_map, "app_disk_usr_sap_size", var.app_disk_usr_sap_size)
timeouts {
create = "1h"
delete = "1h"
Expand Down Expand Up @@ -119,8 +119,9 @@ resource "google_compute_disk" "sapdapp12_export_interfaces" {
}
name = "${length(var.app_vm_names) > (1 + (count.index * 2)) ? var.app_vm_names[1 + (count.index * 2)] : "${var.vm_prefix}app1${2 + (count.index * 2)}"}-export-interfaces"
project = data.google_project.sap-project.project_id
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["app_disk_export_interfaces_size"] != 0 ? var.disk_size_map["app_disk_export_interfaces_size"] : var.app_disk_export_interfaces_size)) : null
size = (var.disk_size_map["app_disk_export_interfaces_size"] != 0 ? var.disk_size_map["app_disk_export_interfaces_size"] : var.app_disk_export_interfaces_size)
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "app_disk_export_interfaces_size", var.app_disk_export_interfaces_size))) : null
size = lookup(var.disk_size_map, "app_disk_export_interfaces_size", var.app_disk_export_interfaces_size)

timeouts {
create = "1h"
delete = "1h"
Expand All @@ -137,8 +138,8 @@ resource "google_compute_disk" "sapdapp12_usr_sap" {
}
name = "${length(var.app_vm_names) > (1 + (count.index * 2)) ? var.app_vm_names[1 + (count.index * 2)] : "${var.vm_prefix}app1${2 + (count.index * 2)}"}-usr-sap"
project = data.google_project.sap-project.project_id
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["app_disk_usr_sap_size"] != 0 ? var.disk_size_map["app_disk_usr_sap_size"] : var.app_disk_usr_sap_size)) : null
size = (var.disk_size_map["app_disk_usr_sap_size"] != 0 ? var.disk_size_map["app_disk_usr_sap_size"] : var.app_disk_usr_sap_size)
provisioned_iops = var.app_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "app_disk_usr_sap_size", var.app_disk_usr_sap_size))) : null
size = lookup(var.disk_size_map, "app_disk_usr_sap_size", var.app_disk_usr_sap_size)
timeouts {
create = "1h"
delete = "1h"
Expand Down
8 changes: 4 additions & 4 deletions modules/s4_ha/ascs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ resource "google_compute_disk" "sapdascs11_usr_sap" {
}
name = "${length(var.ascs_vm_names) > 0 ? var.ascs_vm_names[0] : "${var.vm_prefix}ascs11"}-usr-sap"
project = data.google_project.sap-project.project_id
provisioned_iops = var.ascs_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["ascs_disk_usr_sap_size"] != 0 ? var.disk_size_map["ascs_disk_usr_sap_size"] : var.ascs_disk_usr_sap_size)) : null
size = (var.disk_size_map["ascs_disk_usr_sap_size"] != 0 ? var.disk_size_map["ascs_disk_usr_sap_size"] : var.ascs_disk_usr_sap_size)
provisioned_iops = var.ascs_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "ascs_disk_usr_sap_size", var.ascs_disk_usr_sap_size))) : null
size = lookup(var.disk_size_map, "ascs_disk_usr_sap_size", var.ascs_disk_usr_sap_size)
timeouts {
create = "1h"
delete = "1h"
Expand Down Expand Up @@ -95,8 +95,8 @@ resource "google_compute_disk" "sapdascs12_usr_sap" {
}
name = "${length(var.ascs_vm_names) > 1 ? var.ascs_vm_names[1] : "${var.vm_prefix}ascs12"}-usr-sap"
project = data.google_project.sap-project.project_id
provisioned_iops = var.ascs_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (var.disk_size_map["ascs_disk_usr_sap_size"] != 0 ? var.disk_size_map["ascs_disk_usr_sap_size"] : var.ascs_disk_usr_sap_size)) : null
size = (var.disk_size_map["ascs_disk_usr_sap_size"] != 0 ? var.disk_size_map["ascs_disk_usr_sap_size"] : var.ascs_disk_usr_sap_size)
provisioned_iops = var.ascs_disk_type == "hyperdisk-extreme" ? max(10000, 2 * (lookup(var.disk_size_map, "ascs_disk_usr_sap_size", var.ascs_disk_usr_sap_size))) : null
size = lookup(var.disk_size_map, "ascs_disk_usr_sap_size", var.ascs_disk_usr_sap_size)
timeouts {
create = "1h"
delete = "1h"
Expand Down
Loading

0 comments on commit b67517b

Please sign in to comment.