Terraform module to create a SAP system on VMware on OVHcloud. You have the possibility to create many SAP Application Servers virtual machines and SAP HANA databases virtual machines with different parameters.
User in the vSphere client with the following permissions:
- vSphere access: Read/Write
- Access to the VM Network: Operator
- Access to the V(X)LANs: Operator
This repository has an example folder which includes several ways to use this module.
Name | Version |
---|---|
terraform | >= 1.5.5 |
vsphere | >= 2.4.1 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
sap_application_server_datastore | Name of the datastore to store SAP Application Servers virtual machines | string |
n/a | yes |
sap_application_servers | List of SAP Application Servers virtual machines wanted with these parameters (mandatory, even if empty). Example: [ { "name" = "sidscs", "model" = "", "cpus" = "4", "cpus_per_socket" = "4", "memory" = "4096", "custom_disks" = false, "disks" = [], "networks" = ["VLAN20"], "guest_id" = "sles15_64Guest", "vsphere_content_library" = "", "template" = "", "iso_datastore" = "", "iso_path" = "", "vapp_options" = {} }, { "name" = "sidpas", "model" = "M", "cpus" = "", "cpus_per_socket" = 4, "memory" = "", "custom_disks" = true, "disks" = [ { "id" : 0, "label" : "disk0", "size" : "128", "thin_provisioned" : true, "eagerly_scrub": false, "datastore_name" : "vsanDatastore", "datastore_policy" : "vSAN Default Storage Policy" }, { "id" : 1, "label" : "disk1", "size" : "128", "thin_provisioned" : true, "eagerly_scrub": false, "datastore_name" : "vsanDatastore", "datastore_policy" : "vSAN Default Storage Policy" }, { "id" : 2, "label" : "disk2", "size" : "64", "thin_provisioned" : true, "eagerly_scrub": false, "datastore_name" : "vsanDatastore", "datastore_policy" : "vSAN Default Storage Policy" } ], "networks" = ["VLAN20"], "guest_id" = "sles15_64Guest", "vsphere_content_library" = "", "template" = "", "iso_datastore" = "", "iso_path" = "", "vapp_options" = {} } ] |
list(any) |
n/a | yes |
sap_hana_database_datastore | Name of the datastore to store SAP HANA databases virtual machines | string |
n/a | yes |
sap_hana_databases | List of SAP HANA databases virtual machines wanted with these parameters (mandatory, even if empty). Example: [ { "name" = "sidhana1", "model" = "M", "cpus" = "", "cpus_per_socket" = "48", "memory" = "", "custom_disks" = false, "scsi_controller_count" = "", "disks" = [], "networks" = ["VLAN20"], "guest_id" = "sles15_64Guest", "vsphere_content_library" = "", "template" = "", "iso_datastore" = "", "iso_path" = "", "vapp_options" = {} }, { "name" = "sidhana2", "model" = "S", "cpus" = "", "cpus_per_socket" = "24", "memory" = "", "custom_disks" = false, "scsi_controller_count" = "", "disks" = [], "networks" = ["VLAN20"], "guest_id" = "sles15_64Guest", "vsphere_content_library" = "", "template" = "", "iso_datastore" = "", "iso_path" = "", "vapp_options" = {} } ] |
list(any) |
n/a | yes |
vsphere_compute_cluster | Name of the vSphere cluster Example: Cluster1 |
string |
n/a | yes |
vsphere_datacenter | Name of the datacenter in vSphere interface | string |
n/a | yes |
sap_application_server_anti_affinity_rule_enable | Avoid running SAP Application Servers virtual machines on the same ESXi host | bool |
false |
no |
sap_application_server_anti_affinity_rule_mandatory | When this value is true, prevents any virtual machine operations that may violate this rule | bool |
false |
no |
sap_application_server_anti_affinity_rule_name | Name for the anti-affinity rule | string |
"sap-application-server-anti-affinity-rule" |
no |
sap_application_server_folder | Name of the folder to store the SAP Application Server virtual machines | string |
"" |
no |
sap_application_server_hardware_version | Hardware compatibility between SAP Application Server virtual machines and ESXi host. By default, the newest version. More information available on VMware |
number |
19 |
no |
sap_application_server_hosts_distribution | Allow to set which SAP Application Server virtual machines have to run on a specific ESXi host. When mandatory is true, prevents any virtual machine operations that may violate this rule. Example: [ { "group_name" = "scs-ts1", "hosts" = ["192.168.2.1", "192.168.2.2"], "sap_application_servers" = ["sidscs"], "mandatory" = true }, { "group_name" = "pas-ts1", "hosts" = ["192.168.2.2"], "sap_application_servers" = ["sidpas"], "mandatory" = false } ] |
list(any) |
[] |
no |
sap_application_server_wait_for_guest_ip_timeout | The amount of time, in minutes, to wait for an available guest IP address on the SAP Application Server virtual machine. | number |
0 |
no |
sap_application_server_wait_for_guest_net_timeout | The amount of time, in minutes, to wait for an available guest IP address on the SAP Application Server virtual machine. | number |
0 |
no |
sap_hana_database_anti_affinity_rule_enable | Avoid running SAP HANA databases virtual machines on the same ESXi host | bool |
false |
no |
sap_hana_database_anti_affinity_rule_mandatory | When this value is true, prevents any virtual machine operations that may violate this rule | bool |
false |
no |
sap_hana_database_anti_affinity_rule_name | Name for the anti-affinity rule | string |
"sap-hana-database-anti-affinity-rule" |
no |
sap_hana_database_folder | Name of the folder to store the SAP HANA database virtual machines | string |
"" |
no |
sap_hana_database_hardware_version | Hardware compatibility between SAP HANA database virtual machines and ESXi host. By default, the newest version. More information available on VMware |
number |
19 |
no |
sap_hana_database_hosts_distribution | Allow to set which SAP HANA database virtual machines have to run on a specific ESXi host. When mandatory is true, prevents any virtual machine operations that may violate this rule. Example: [ { "group_name" = "hana-primary-ts1", "hosts" = ["192.168.2.1", "192.168.2.2"], "sap_hana_databases" = ["sidhana1"], "mandatory" = true }, { "group_name" = "hana-secondary-ts1", "hosts" = ["192.168.2.2", "192.168.2.3"], "sap_hana_databases" = ["sidhana2"], "mandatory" = false } ] |
list(any) |
[] |
no |
sap_hana_database_thick_datastore_policy | This Storage Policy must be a Thick provisioning | string |
"" |
no |
sap_hana_database_thin_datastore_policy | This Storage Policy must be a Thin provisioning | string |
"" |
no |
sap_hana_database_wait_for_guest_ip_timeout | The amount of time, in minutes, to wait for an available guest IP address on the SAP HANA database virtual machine. | number |
0 |
no |
sap_hana_database_wait_for_guest_net_timeout | The amount of time, in minutes, to wait for an available guest IP address on the SAP HANA database virtual machine. | number |
0 |
no |
Name | Description |
---|---|
affinity_hosts_sap_application_servers_rules | Map of affinity hosts SAP Application Servers virtual machines rules information |
affinity_hosts_sap_hana_databases_rules | Map of affinity hosts SAP HANA databases virtual machines rules information |
anti_affinity_sap_application_servers_rule | Map of anti affinity SAP Application Servers virtual machines rule information |
anti_affinity_sap_hana_databases_rule | Map of anti affinity SAP HANA databases virtual machines rule information |
sap_application_servers_ids | Map of SAP Application Server virtual machines names and its IDs |
sap_hana_databases_ids | Map of SAP HANA databases virtual machines names and its IDs |
Contributions are very welcome! Check out the Contribution Guidelines for instructions.
This Terraform Module follows the principles of Semantic Versioning. You can find each new release, along with the changelog, in the Releases Page.
During initial development, the major version will be 0 (e.g., 0.x.y), which indicates the code does not yet have a stable API. Once we hit 1.0.0, we will make every effort to maintain a backwards compatible API and use the MAJOR, MINOR, and PATCH versions on each release to indicate any incompatibilities.
This code is released under the Apache 2.0 License. Please see LICENSE for more details.