This module is meant to create SAP HANA HA instance(s) for Google Cloud
The resources/services/activations/deletions that this module will create/trigger are:
- A set of compute engine instances, primary and secondary (if specified)
- A set of compute disks
- IP addresses for the instances to use
- Primary and secondary (if specified) GCE instance groups
Basic usage of this module is as follows:
module "sap_hana_ha" {
source = "terraform-google-modules/sap/google//modules/sap_hana_ha"
version = "~> 1.1"
project_id = "PROJECT_ID" # example: my-project-x
machine_type = "MACHINE_TYPE" # example: n1-highmem-32
network = "NETWORK" # example: default
subnetwork = "SUBNETWORK" # example: default
linux_image = "LINUX_IMAGE" # example: rhel-8-4-sap-ha
linux_image_project = "LINUX_IMAGE_PROJECT" # example: rhel-sap-cloud
primary_instance_name = "PRIMARY_NAME" # example: hana-ha-primary
primary_zone = "PRIMARY_ZONE" # example: us-east1-b, must be in the same region as secondary_zone
secondary_instance_name = "SECONDARY_NAME" # example: hana-ha-secondary
secondary_zone = "SECONDARY_ZONE" # example: us-east1-c, must be in the same region as primary_zone
}
Functional example is included in the examples directory.
Name | Description | Type | Default | Required |
---|---|---|---|---|
can_ip_forward | Whether sending and receiving of packets with non-matching source or destination IPs is allowed. | bool |
true |
no |
is_work_load_management_deployment | If set the necessary tags and labels will be added to resoucres to support WLM. | bool |
false |
no |
linux_image | Linux image name to use. | string |
n/a | yes |
linux_image_project | The project which the Linux image belongs to. | string |
n/a | yes |
loadbalancer_name | OPTIONAL - Name of the load balancer that will be created. If left blank with use_ilb_vip set to true, then will use lb-SID as default | string |
"" |
no |
machine_type | Machine type for the instances. | string |
n/a | yes |
network | Network in which the ILB resides including resources like firewall rules. | string |
n/a | yes |
network_tags | OPTIONAL - Network tags can be associated to your instance on deployment. This can be used for firewalling or routing purposes. | list(string) |
[] |
no |
post_deployment_script | OPTIONAL - gs:// or https:// location of a script to execute on the created VM's post deployment. | string |
"" |
no |
primary_instance_group_name | OPTIONAL - Unmanaged instance group to be created for the primary node. If blank, will use ig-VM_NAME | string |
"" |
no |
primary_instance_name | Hostname of the primary GCE instance. | string |
n/a | yes |
primary_reservation_name | Use a reservation specified by RESERVATION_NAME. By default ANY_RESERVATION is used when this variable is empty. In order for a reservation to be used it must be created with the "Select specific reservation" selected (specificReservationRequired set to true) Be sure to create your reservation with the correct Min CPU Platform for the following instance types: n1-highmem-32 : Intel Broadwell n1-highmem-64 : Intel Broadwell n1-highmem-96 : Intel Skylake n1-megamem-96 : Intel Skylake m1-megamem-96 : Intel Skylake All other instance types can have automatic Min CPU Platform" |
string |
"" |
no |
primary_startup_url | Startup script to be executed when the VM boots, should not be overridden. | string |
`"curl -s https://www.googleapis.com/storage/v1/core-connect-dm-templates/202210141928/terraform/sap_hana_ha/startup.sh | bash -s https://www.googleapis.com/storage/v1/core-connect-dm-templates/202210141928/terraform"` |
primary_zone | Zone where the primary instances will be created. | string |
n/a | yes |
project_id | Project id where the instances will be created. | string |
n/a | yes |
public_ip | OPTIONAL - Defines whether a public IP address should be added to your VM. By default this is set to Yes. Note that if you set this to No without appropriate network nat and tags in place, there will be no route to the internet and thus the installation will fail. | bool |
true |
no |
sap_deployment_debug | OPTIONAL - If this value is set to true, the deployment will generates verbose deployment logs. Only turn this setting on if a Google support engineer asks you to enable debugging. | bool |
false |
no |
sap_hana_backup_size | Size in GB of the /hanabackup volume. If this is not set or set to zero, the GCE instance will be provisioned with a hana backup volume of 2 times the total memory. | number |
0 |
no |
sap_hana_deployment_bucket | The GCS bucket containing the SAP HANA media. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. | string |
"" |
no |
sap_hana_instance_number | The SAP instance number. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. | number |
0 |
no |
sap_hana_sapsys_gid | The Linux GID of the SAPSYS group. By default this is set to 79 | number |
79 |
no |
sap_hana_sid | The SAP HANA SID. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. SID must adhere to SAP standard (Three letters or numbers and start with a letter) | string |
"" |
no |
sap_hana_sidadm_password | The linux sidadm login password. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. Minimum requirement is 8 characters. | string |
"" |
no |
sap_hana_sidadm_password_secret | The secret key used to retrieve the linux sidadm login from Secret Manager (https://cloud.google.com/secret-manager). The Secret Manager password will overwrite the clear text password from sap_hana_sidadm_password if both are set. | string |
"" |
no |
sap_hana_sidadm_uid | The Linux UID of the adm user. By default this is set to 900 to avoid conflicting with other OS users. | number |
900 |
no |
sap_hana_system_password | The SAP HANA SYSTEM password. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. Minimum requirement is 8 characters with at least 1 number. | string |
"" |
no |
sap_hana_system_password_secret | The secret key used to retrieve the SAP HANA SYSTEM login from Secret Manager (https://cloud.google.com/secret-manager). The Secret Manager password will overwrite the clear text password from sap_hana_system_password if both are set. | string |
"" |
no |
sap_vip | OPTIONAL - The virtual IP address of the alias/route pointing towards the active SAP HANA instance. For a route based solution this IP must sit outside of any defined networks. | string |
"" |
no |
secondary_instance_group_name | OPTIONAL - Unmanaged instance group to be created for the secondary node. If blank, will use ig-VM_NAME | string |
"" |
no |
secondary_instance_name | Hostname of the secondary GCE instance. | string |
n/a | yes |
secondary_reservation_name | Use a reservation specified by RESERVATION_NAME. By default ANY_RESERVATION is used when this variable is empty. In order for a reservation to be used it must be created with the "Select specific reservation" selected (specificReservationRequired set to true) Be sure to create your reservation with the correct Min CPU Platform for the following instance types: n1-highmem-32 : Intel Broadwell n1-highmem-64 : Intel Broadwell n1-highmem-96 : Intel Skylake n1-megamem-96 : Intel Skylake m1-megamem-96 : Intel Skylake All other instance types can have automatic Min CPU Platform" |
string |
"" |
no |
secondary_startup_url | DO NOT USE | string |
`"curl -s https://www.googleapis.com/storage/v1/core-connect-dm-templates/202210141928/terraform/sap_hana_ha/startup_secondary.sh | bash -s https://www.googleapis.com/storage/v1/core-connect-dm-templates/202210141928/terraform"` |
secondary_zone | Zone where the secondary instances will be created. | string |
n/a | yes |
service_account | OPTIONAL - Ability to define a custom service account instead of using the default project service account. | string |
"" |
no |
subnetwork | The sub network to deploy the instance in. | string |
n/a | yes |
wlm_deployment_name | Deployment name to be used for integrating into Work Load Management. | string |
"" |
no |
Name | Description |
---|---|
sap_hana_ha_firewall_link | Link to the optional fire wall |
sap_hana_ha_loadbalander_link | Link to the optional load balancer |
sap_hana_ha_primary_instance_self_link | Self-link for the primary SAP HANA HA instance created. |
sap_hana_ha_secondary_instance_self_link | Self-link for the secondary SAP HANA HA instance created. |
These sections describe requirements for using this module.
The following dependencies must be available:
- Terraform v0.13
- Terraform Provider for GCP plugin v4.0
Refer to the contribution guidelines for information on contributing to this module.
Please see our security disclosure process.