Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 607322441
  • Loading branch information
sjswerdlow committed Sep 4, 2024
1 parent 7e44fcf commit 1500695
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 97 deletions.
2 changes: 1 addition & 1 deletion modules/s4/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource "google_compute_disk" "sapdapp11" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
type = "pd-balanced"
zone = var.zone1_name
}

Expand Down
2 changes: 1 addition & 1 deletion modules/s4/ascs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resource "google_compute_disk" "sapdascs11" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
type = "pd-balanced"
zone = var.zone1_name
}

Expand Down
38 changes: 9 additions & 29 deletions modules/s4/db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,7 @@ resource "google_compute_disk" "sapddb11" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
zone = var.zone1_name
}

resource "google_compute_disk" "sapddb11_export_backup" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-export-backup" : "${var.vm_prefix}db11-export-backup"
project = data.google_project.sap-project.project_id
size = var.db_disk_export_backup_size
timeouts {
create = "1h"
delete = "1h"
update = "1h"
}
type = var.disk_type == "hyperdisk-extreme" ? "pd-ssd" : var.disk_type
type = "pd-balanced"
zone = var.zone1_name
}

Expand Down Expand Up @@ -97,13 +81,13 @@ resource "google_compute_disk" "sapddb11_hana_log" {
zone = var.zone1_name
}

resource "google_compute_disk" "sapddb11_hana_restore" {
resource "google_compute_disk" "sapddb11_hana_shared" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-hana-restore" : "${var.vm_prefix}db11-hana-restore"
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-hana-shared" : "${var.vm_prefix}db11-hana-shared"
project = data.google_project.sap-project.project_id
size = var.db_disk_hana_restore_size
size = var.db_disk_hana_shared_size
timeouts {
create = "1h"
delete = "1h"
Expand All @@ -113,13 +97,13 @@ resource "google_compute_disk" "sapddb11_hana_restore" {
zone = var.zone1_name
}

resource "google_compute_disk" "sapddb11_hana_shared" {
resource "google_compute_disk" "sapddb11_hanabackup" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-hana-shared" : "${var.vm_prefix}db11-hana-shared"
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-hanabackup" : "${var.vm_prefix}db11-hanabackup"
project = data.google_project.sap-project.project_id
size = var.db_disk_hana_shared_size
size = var.db_disk_backup_size
timeouts {
create = "1h"
delete = "1h"
Expand Down Expand Up @@ -164,12 +148,8 @@ resource "google_compute_instance" "sapddb11" {
source = google_compute_disk.sapddb11_hana_shared.self_link
}
attached_disk {
device_name = google_compute_disk.sapddb11_export_backup.name
source = google_compute_disk.sapddb11_export_backup.self_link
}
attached_disk {
device_name = google_compute_disk.sapddb11_hana_restore.name
source = google_compute_disk.sapddb11_hana_restore.self_link
device_name = google_compute_disk.sapddb11_hanabackup.name
source = google_compute_disk.sapddb11_hanabackup.self_link
}
boot_disk {
auto_delete = false
Expand Down
5 changes: 5 additions & 0 deletions modules/s4/project.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@ resource "google_filestore_instance" "sap_fstore_1" {
}
project = data.google_compute_network.sap-vpc.project
tier = var.filestore_tier
timeouts {
create = "30m"
delete = "30m"
update = "30m"
}
}
4 changes: 2 additions & 2 deletions modules/s4/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ variable "configuration_bucket_name" {
description = "configuration_bucket_name"
}

variable "db_disk_export_backup_size" {
variable "db_disk_backup_size" {
default = 128
description = "db_disk_export_backup_size"
description = "db_disk_backup_size"
}

variable "db_disk_hana_data_size" {
Expand Down
4 changes: 2 additions & 2 deletions modules/s4_ha/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ resource "google_compute_disk" "sapdapp11" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
type = "pd-balanced"
zone = var.zone1_name
}

Expand Down Expand Up @@ -102,7 +102,7 @@ resource "google_compute_disk" "sapdapp12" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
type = "pd-balanced"
zone = var.zone2_name
}

Expand Down
4 changes: 2 additions & 2 deletions modules/s4_ha/ascs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ resource "google_compute_disk" "sapdascs11" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
type = "pd-balanced"
zone = var.zone1_name
}

Expand Down Expand Up @@ -80,7 +80,7 @@ resource "google_compute_disk" "sapdascs12" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
type = "pd-balanced"
zone = var.zone2_name
}

Expand Down
76 changes: 18 additions & 58 deletions modules/s4_ha/db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,7 @@ resource "google_compute_disk" "sapddb11" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
zone = var.zone1_name
}

resource "google_compute_disk" "sapddb11_export_backup" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-export-backup" : "${var.vm_prefix}db11-export-backup"
project = data.google_project.sap-project.project_id
size = var.db_disk_export_backup_size
timeouts {
create = "1h"
delete = "1h"
update = "1h"
}
type = var.disk_type == "hyperdisk-extreme" ? "pd-ssd" : var.disk_type
type = "pd-balanced"
zone = var.zone1_name
}

Expand Down Expand Up @@ -105,13 +89,13 @@ resource "google_compute_disk" "sapddb11_hana_log" {
zone = var.zone1_name
}

resource "google_compute_disk" "sapddb11_hana_restore" {
resource "google_compute_disk" "sapddb11_hana_shared" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-hana-restore" : "${var.vm_prefix}db11-hana-restore"
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-hana-shared" : "${var.vm_prefix}db11-hana-shared"
project = data.google_project.sap-project.project_id
size = var.db_disk_hana_restore_size
size = var.db_disk_hana_shared_size
timeouts {
create = "1h"
delete = "1h"
Expand All @@ -121,13 +105,13 @@ resource "google_compute_disk" "sapddb11_hana_restore" {
zone = var.zone1_name
}

resource "google_compute_disk" "sapddb11_hana_shared" {
resource "google_compute_disk" "sapddb11_hanabackup" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-hana-shared" : "${var.vm_prefix}db11-hana-shared"
name = length(var.db_vm_names) > 0 ? "${var.db_vm_names[0]}-hanabackup" : "${var.vm_prefix}db11-hanabackup"
project = data.google_project.sap-project.project_id
size = var.db_disk_hana_shared_size
size = var.db_disk_backup_size
timeouts {
create = "1h"
delete = "1h"
Expand Down Expand Up @@ -166,23 +150,7 @@ resource "google_compute_disk" "sapddb12" {
delete = "1h"
update = "1h"
}
type = "pd-ssd"
zone = var.zone2_name
}

resource "google_compute_disk" "sapddb12_export_backup" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 1 ? "${var.db_vm_names[1]}-export-backup" : "${var.vm_prefix}db12-export-backup"
project = data.google_project.sap-project.project_id
size = var.db_disk_export_backup_size
timeouts {
create = "1h"
delete = "1h"
update = "1h"
}
type = var.disk_type == "hyperdisk-extreme" ? "pd-ssd" : var.disk_type
type = "pd-balanced"
zone = var.zone2_name
}

Expand Down Expand Up @@ -220,13 +188,13 @@ resource "google_compute_disk" "sapddb12_hana_log" {
zone = var.zone2_name
}

resource "google_compute_disk" "sapddb12_hana_restore" {
resource "google_compute_disk" "sapddb12_hana_shared" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 1 ? "${var.db_vm_names[1]}-hana-restore" : "${var.vm_prefix}db12-hana-restore"
name = length(var.db_vm_names) > 1 ? "${var.db_vm_names[1]}-hana-shared" : "${var.vm_prefix}db12-hana-shared"
project = data.google_project.sap-project.project_id
size = var.db_disk_hana_restore_size
size = var.db_disk_hana_shared_size
timeouts {
create = "1h"
delete = "1h"
Expand All @@ -236,13 +204,13 @@ resource "google_compute_disk" "sapddb12_hana_restore" {
zone = var.zone2_name
}

resource "google_compute_disk" "sapddb12_hana_shared" {
resource "google_compute_disk" "sapddb12_hanabackup" {
lifecycle {
ignore_changes = [snapshot]
}
name = length(var.db_vm_names) > 1 ? "${var.db_vm_names[1]}-hana-shared" : "${var.vm_prefix}db12-hana-shared"
name = length(var.db_vm_names) > 1 ? "${var.db_vm_names[1]}-hanabackup" : "${var.vm_prefix}db12-hanabackup"
project = data.google_project.sap-project.project_id
size = var.db_disk_hana_shared_size
size = var.db_disk_backup_size
timeouts {
create = "1h"
delete = "1h"
Expand Down Expand Up @@ -323,12 +291,8 @@ resource "google_compute_instance" "sapddb11" {
source = google_compute_disk.sapddb11_hana_shared.self_link
}
attached_disk {
device_name = google_compute_disk.sapddb11_export_backup.name
source = google_compute_disk.sapddb11_export_backup.self_link
}
attached_disk {
device_name = google_compute_disk.sapddb11_hana_restore.name
source = google_compute_disk.sapddb11_hana_restore.self_link
device_name = google_compute_disk.sapddb11_hanabackup.name
source = google_compute_disk.sapddb11_hanabackup.self_link
}
boot_disk {
auto_delete = false
Expand Down Expand Up @@ -393,12 +357,8 @@ resource "google_compute_instance" "sapddb12" {
source = google_compute_disk.sapddb12_hana_shared.self_link
}
attached_disk {
device_name = google_compute_disk.sapddb12_export_backup.name
source = google_compute_disk.sapddb12_export_backup.self_link
}
attached_disk {
device_name = google_compute_disk.sapddb12_hana_restore.name
source = google_compute_disk.sapddb12_hana_restore.self_link
device_name = google_compute_disk.sapddb12_hanabackup.name
source = google_compute_disk.sapddb12_hanabackup.self_link
}
boot_disk {
auto_delete = false
Expand Down
5 changes: 5 additions & 0 deletions modules/s4_ha/project.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@ resource "google_filestore_instance" "sap_fstore_1" {
}
project = data.google_compute_network.sap-vpc.project
tier = var.filestore_tier
timeouts {
create = "30m"
delete = "30m"
update = "30m"
}
}
4 changes: 2 additions & 2 deletions modules/s4_ha/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ variable "configuration_bucket_name" {
description = "configuration_bucket_name"
}

variable "db_disk_export_backup_size" {
variable "db_disk_backup_size" {
default = 128
description = "db_disk_export_backup_size"
description = "db_disk_backup_size"
}

variable "db_disk_hana_data_size" {
Expand Down

0 comments on commit 1500695

Please sign in to comment.