From edf9c8c28181e950621f0435eaa99459341ab4b8 Mon Sep 17 00:00:00 2001 From: Michele Pagot Date: Wed, 28 Aug 2024 17:20:16 +0200 Subject: [PATCH] Remove machine type default from AWS Terrafor AWS code variables has default about machine type in two place: - HIGH: in the main variables.tf - LOW: in each module variable.tf It is problematic to maintain these two level of defaults with the same values. Removing defaults from the HIGH level result in all machine types variables to become mandatory in the terraform.tfvars and so in the conf.yaml. Thic commit remove defaults from LOW level. Doing so does not change user experience as HIGH levels will always provide value to them from user tfvars file ir default. This commit also ensure that each description field is at the first place if available. --- terraform/aws/modules/hana_node/variables.tf | 15 +++++++-------- .../aws/modules/iscsi_server/variables.tf | 13 ++++++------- terraform/aws/modules/monitoring/variables.tf | 9 ++++----- .../aws/modules/netweaver_node/variables.tf | 18 +++++++++--------- 4 files changed, 26 insertions(+), 29 deletions(-) diff --git a/terraform/aws/modules/hana_node/variables.tf b/terraform/aws/modules/hana_node/variables.tf index 5598f8b2..ca736898 100644 --- a/terraform/aws/modules/hana_node/variables.tf +++ b/terraform/aws/modules/hana_node/variables.tf @@ -19,38 +19,37 @@ variable "hana_count" { } variable "instance_type" { - type = string - default = "r3.8xlarge" + type = string } variable "availability_zones" { - type = list(string) description = "Used availability zones" + type = list(string) } variable "vpc_id" { - type = string description = "Id of the vpc used for this deployment" + type = string } variable "subnet_address_range" { - type = list(string) description = "List with subnet address ranges in cidr notation to create the netweaver subnets" + type = list(string) } variable "key_name" { - type = string description = "AWS key pair name" + type = string } variable "security_group_id" { - type = string description = "Security group id" + type = string } variable "route_table_id" { - type = string description = "Route table id" + type = string } variable "aws_credentials" { diff --git a/terraform/aws/modules/iscsi_server/variables.tf b/terraform/aws/modules/iscsi_server/variables.tf index ed23f80b..2c335523 100644 --- a/terraform/aws/modules/iscsi_server/variables.tf +++ b/terraform/aws/modules/iscsi_server/variables.tf @@ -3,13 +3,13 @@ variable "common_variables" { } variable "availability_zones" { - type = list(string) description = "Used availability zones" + type = list(string) } variable "subnet_ids" { - type = list(string) description = "Subnet ids to attach the machines network interface" + type = list(string) } variable "name" { @@ -23,24 +23,23 @@ variable "network_domain" { } variable "iscsi_count" { - type = number description = "Number of iscsi machines to deploy" + type = number } variable "instance_type" { - type = string description = "The instance type of iscsi server node." - default = "t2.large" + type = string } variable "key_name" { - type = string description = "AWS key pair name" + type = string } variable "security_group_id" { - type = string description = "Security group id" + type = string } variable "host_ips" { diff --git a/terraform/aws/modules/monitoring/variables.tf b/terraform/aws/modules/monitoring/variables.tf index 28e279cb..4ac3e7e2 100644 --- a/terraform/aws/modules/monitoring/variables.tf +++ b/terraform/aws/modules/monitoring/variables.tf @@ -11,7 +11,6 @@ variable "monitoring_enabled" { variable "instance_type" { description = "The instance type of monitoring node." type = string - default = "t3.micro" } variable "name" { @@ -25,13 +24,13 @@ variable "network_domain" { } variable "key_name" { - type = string description = "AWS key pair name" + type = string } variable "security_group_id" { - type = string description = "Security group id" + type = string } variable "monitoring_srv_ip" { @@ -41,13 +40,13 @@ variable "monitoring_srv_ip" { } variable "availability_zones" { - type = list(string) description = "Used availability zones" + type = list(string) } variable "subnet_ids" { - type = list(string) description = "List of subnet IDs" + type = list(string) } variable "timezone" { diff --git a/terraform/aws/modules/netweaver_node/variables.tf b/terraform/aws/modules/netweaver_node/variables.tf index 6a06b334..ed461e31 100644 --- a/terraform/aws/modules/netweaver_node/variables.tf +++ b/terraform/aws/modules/netweaver_node/variables.tf @@ -13,8 +13,8 @@ variable "app_server_count" { } variable "instance_type" { - type = string - default = "r3.8xlarge" + description = "The instance type of netweaver node." + type = string } variable "name" { @@ -28,38 +28,38 @@ variable "network_domain" { } variable "availability_zones" { - type = list(string) description = "Used availability zones" + type = list(string) } variable "vpc_id" { - type = string description = "Id of the vpc used for this deployment" + type = string } variable "subnet_address_range" { - type = list(string) description = "List with subnet address ranges in cidr notation to create the netweaver subnets" + type = list(string) } variable "key_name" { - type = string description = "AWS key pair name" + type = string } variable "security_group_id" { - type = string description = "Security group id" + type = string } variable "route_table_id" { - type = string description = "Route table id" + type = string } variable "efs_performance_mode" { - type = string description = "Performance mode of the EFS storage used by Netweaver" + type = string default = "generalPurpose" }