This template follows the documented steps https://cloud.google.com/solutions/sap/docs/netweaver-deployment-guide-linux and deploys GCP and Pacemaker resources up to the installation of SAP's central services.
Install Terraform on the machine you would like to use to deploy from by following https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/gcp-get-started#install-terraform
-
Download .tf file into an empty directory
curl https://storage.googleapis.com/cloudsapdeploy/terraform/latest/terraform/sap_nw/terraform/sap_nw.tf -o sap_nw.tf
-
Fill in mandatory variables and if the desired optional variable in the .tf file.
-
Deploy
-
Run
terraform init
(only needed once) -
Run
terraform plan
to see what is going to be deployed. Verify if names, zones, sizes, etc. are as desired. -
Run
terrafom apply
to deploy the resources -
Run
terrafom destroy
to remove the resources -
Continue installation of SAP software and setup of remaining cluster resources as per documentation at https://cloud.google.com/solutions/sap/docs/netweaver-deployment-guide-linux
For additional information see https://www.terraform.io/docs/index.html and https://cloud.google.com/docs/terraform
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 |
custom_metadata | Optional - default is empty. Custom metadata to be added to the VM. | map(string) |
{} |
no |
instance_name | Hostname of the GCE instance. | string |
n/a | yes |
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 |
machine_type | Machine type for the instances. | 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_startup_url | Startup script to be executed when the VM boots, should not be overridden. | string |
`"curl -s https://storage.googleapis.com/cloudsapdeploy/terraform/latest/terraform/sap_nw/nw_startup.sh | bash -s https://storage.googleapis.com/cloudsapdeploy/terraform/latest/terraform"` |
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 |
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 |
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_mnt_size | Size of /sapmnt in GB | number |
8 |
no |
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 |
swap_size | Size in GB of swap volume | number |
8 |
no |
usr_sap_size | Size of /usr/sap in GB | number |
8 |
no |
zone | Zone where the instances will be created. | string |
n/a | yes |
Name | Description |
---|---|
sap_nw_self_link | SAP NW self-link for 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.