SUSE / ha-sap-terraform-deployments

Automated SAP/HA Deployments in Public/Private Clouds
GNU General Public License v3.0
123 stars 88 forks source link

make hostnames configurable #767

Closed yeoldegrove closed 3 years ago

yeoldegrove commented 3 years ago

This PR makes it possible to configure the hostnames of each VM type via variables in terraform.tfvars. It addresses #757 . Additionally there is the possibility to add the deployment_name as a prefix to the actual hostname (in salt and OS). The deployment_name will be added to terraform resources as usual (no change in behavior).

  # Add the "deployment_name" as a prefix to the hostname.
  #deployment_name_in_hostname = false

  #hana_name = "vmhana"
  #iscsi_name = "vmiscsi"
  #monitoring_name = "vmmonitoring"
  #drbd_name = "vmdrbd"
  #netweaver_name = "vmnetweaver"
yeoldegrove commented 3 years ago

@arbulu89 I get the point about the workspace and deployment_name prefixing in the resources... The intention was not to change this behavior, will rework it.

I plan to built it in a way that the resource names stay the same as now and you can only decide if you want to have the deployment_name as a prefix to the actual hostname (within salt/OS, not terraform).

arbulu89 commented 3 years ago

@arbulu89 I get the point about the workspace and deployment_name prefixing in the resources... The intention was not to change this behavior, will rework it.

I plan to built it in a way that the resource names stay the same as now and you can only decide if you want to have the deployment_name as a prefix to the actual hostname (within salt/OS, not terraform).

I don't know if there is a way to use resources with the same name. Maybe using tags or similar.

yeoldegrove commented 3 years ago

@arbulu89 resource names on aws, gcp, libvirt are not touched anymore. Only slight changes in this regard to streamline the naming. There is now a default deployment_name_in_hostname set based on the current behavior of the cloud providers. The user can overwrite this if he e.g. does not like such long hostnames or needs the deployment name in the hostname.

yeoldegrove commented 3 years ago

@arbulu89 please re-review.