SUSE / ha-sap-terraform-deployments

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

Improve documentation with default values written in examples #583

Closed MalloZup closed 3 years ago

MalloZup commented 3 years ago

description:

in our terraform.tfvars.example file, we should state more explicitly what are the default values for X parameter and what are the possible values.

for example:

A file contains this

we should also state in the example.file that if the variable are commented, they are not mandatory to set..

A 1 line comment about this could also help readability

# Cost optimized scenario
#scenario_type: "cost-optimized"

# To disable the provisioning process
#provisioner = ""

# Run provisioner execution in background
#background = true

should be like:

# Cost optimized scenario. Default `performance-optimized`, possible value `cost-optimized`.
#scenario_type: "cost-optimized"

# To disable the provisioning process. Default: Enabled
#provisioner = ""

# Run provisioner execution in background. Default Disabled
#background = true

This make more clear to the user and he doesn't need to check all the variables in HCL default

tuttipazzo commented 3 years ago

Can I also add the explanation of some those more complex variables like: disks_type, disks_size, etc. And how they fit together?

arbulu89 commented 3 years ago

@MalloZup @tuttipazzo The default values and the descriptions are already available in the variables.tf file. I wouldn't like to start duplicating the content in both files.

Maybe, we need to enforce somehow the users to check that file, and obviously improve the descriptions if they are not good enough.

@MalloZup Just as a curiosity, why don't you like HCL syntax? I find it easy to understand and consume, even without any technical skill.

tuttipazzo commented 3 years ago

The default values and the descriptions are already available in the variables.tf file. Yeah. I didn't know the variable definitions were in another file until I started greping.

Maybe, we need to enforce somehow the users to check that file, and obviously improve the descriptions if they are not good enough. I think a 1 line at the beginning of the example tfvars file is enough.

HCL? I think that is a typo.

arbulu89 commented 3 years ago

The default values and the descriptions are already available in the variables.tf file. Yeah. I didn't know the variable definitions were in another file until I started greping.

Maybe, we need to enforce somehow the users to check that file, and obviously improve the descriptions if they are not good enough. I think a 1 line at the beginning of the example tfvars file is enough.

HCL? I think that is a typo.

This is already done in develop branch: https://github.com/SUSE/ha-sap-terraform-deployments/blob/develop/azure/terraform.tfvars.example#L3

More information about HCL syntax: https://www.terraform.io/docs/configuration/syntax.html https://hub.packtpub.com/what-is-hcl-hashicorp-configuration-language-how-does-it-relate-to-terraform-and-why-is-it-growing-in-popularity/

yeoldegrove commented 3 years ago

Find all the available variables and definitions in the variables.tf file is stated in every terraform.tfvars.example More complex variables are explained in the README.md files also. If something concrete is missing, please file a new issue.