File tree Expand file tree Collapse file tree 9 files changed +11
-31
lines changed
playbooks/roles/gen_tfvars Expand file tree Collapse file tree 9 files changed +11
-31
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ terraform_private_net_enabled: "false"
1717terraform_private_net_prefix : " "
1818terraform_private_net_mask : 0
1919
20- terraform_aws_enable_ebs : False
21-
2220terraform_oci_region : " invalid"
2321terraform_oci_tenancy_ocid : " invalid"
2422terraform_oci_user_ocid : " invalid"
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ aws_availability_zone = "{{ terraform_aws_av_zone }}"
44aws_name_search = "{{ terraform_aws_ns }}"
55aws_ami_owner = "{{ terraform_aws_ami_owner }}"
66aws_instance_type = "{{ terraform_aws_instance_type }}"
7- aws_enable_ebs = "{{ terraform_aws_enable_ebs | lower }}"
87aws_ebs_volumes_per_instance = "{{ terraform_aws_ebs_volumes_per_instance }}"
98aws_ebs_volume_size = {{ terraform_aws_ebs_volume_size }}
109aws_ebs_volume_type = "{{ terraform_aws_ebs_volume_type }}"
Original file line number Diff line number Diff line change @@ -47,13 +47,6 @@ KDEVOPS_MRPROPER += $(KDEVOPS_NODES)
4747
4848DEFAULT_DEPS_REQS_EXTRA_VARS += $(KDEVOPS_TFVARS )
4949
50- ifeq (y,$(CONFIG_TERRAFORM_AWS ) )
51- ifeq (y,$(CONFIG_TERRAFORM_AWS_ENABLE_EBS_VOLUMES ) )
52- TERRAFORM_EXTRA_VARS += terraform_aws_enable_ebs='True'
53- endif # CONFIG_TERRAFORM_AWS_ENABLE_EBS_VOLUMES
54-
55- endif
56-
5750ifeq (y,$(CONFIG_TERRAFORM_OCI ) )
5851TERRAFORM_EXTRA_VARS += terraform_oci_region=$(subst ",,$(CONFIG_TERRAFORM_OCI_REGION ) )
5952TERRAFORM_EXTRA_VARS += terraform_oci_tenancy_ocid=$(subst ",,$(CONFIG_TERRAFORM_OCI_TENANCY_OCID ) )
Original file line number Diff line number Diff line change 1- config TERRAFORM_AWS_ENABLE_EBS_VOLUMES
2- bool "Enable EBS volumes"
3- help
4- Enable this to enable EBS volumes.
5-
6- if TERRAFORM_AWS_ENABLE_EBS_VOLUMES
7-
81choice
92 prompt "Number of EBS volumes"
103 default TERRAFORM_AWS_EBS_VOLUMES_PER_INSTANCE_4
114
5+ config TERRAFORM_AWS_EBS_VOLUMES_PER_INSTANCE_0
6+ bool "0"
7+
128config TERRAFORM_AWS_EBS_VOLUMES_PER_INSTANCE_1
139 bool "1"
1410
@@ -44,6 +40,7 @@ endchoice
4440config TERRAFORM_AWS_EBS_VOLUMES_PER_INSTANCE
4541 int
4642 output yaml
43+ default 0 if TERRAFORM_AWS_EBS_VOLUMES_PER_INSTANCE_0
4744 default 1 if TERRAFORM_AWS_EBS_VOLUMES_PER_INSTANCE_1
4845 default 2 if TERRAFORM_AWS_EBS_VOLUMES_PER_INSTANCE_2
4946 default 3 if TERRAFORM_AWS_EBS_VOLUMES_PER_INSTANCE_3
@@ -190,8 +187,6 @@ config TERRAFORM_AWS_EBS_VOLUME_SIZE
190187 default 3078 if TERRAFORM_AWS_EBS_VOLUME_SIZE_3078G
191188 default 4096 if TERRAFORM_AWS_EBS_VOLUME_SIZE_4096G
192189
193- endif # TERRAFORM_AWS_ENABLE_EBS_VOLUMES
194-
195190config TERRAFORM_AWS_DATA_VOLUME_DEVICE_FILE_NAME
196191 string
197192 default "/dev/nvme1n1"
Original file line number Diff line number Diff line change 44 prompt "AWS instance size"
55 default TERRAFORM_AWS_INSTANCE_SIZE_C7A_8XLARGE
66 help
7- Add storage by selecting the TERRAFORM_AWS_ENABLE_EBS_VOLUMES
8- option and adjusting the size and number of additional devices .
7+ Add storage by increasing the number of EBS volumes per
8+ instance .
99
1010config TERRAFORM_AWS_INSTANCE_SIZE_C7A_8XLARGE
1111 bool "c7a.8xlarge"
Original file line number Diff line number Diff line change 44 prompt "AWS instance type"
55 default TERRAFORM_AWS_INSTANCE_SIZE_M5AD_4XLARGE
66 help
7- Add storage by selecting the TERRAFORM_AWS_ENABLE_EBS_VOLUMES
8- option and adjusting the size and number of additional devices .
7+ Add storage by increasing the number of EBS volumes per
8+ instance .
99
1010config TERRAFORM_AWS_INSTANCE_SIZE_M5AD_LARGE
1111 bool "m5ad.large"
Original file line number Diff line number Diff line change 44 prompt "AWS instance type"
55 default TERRAFORM_AWS_INSTANCE_SIZE_M7A_XLARGE
66 help
7- Add storage by selecting the TERRAFORM_AWS_ENABLE_EBS_VOLUMES
8- option and adjusting the size and number of additional devices .
7+ Add storage by increasing the number of EBS volumes per
8+ instance .
99
1010config TERRAFORM_AWS_INSTANCE_SIZE_M7A_MEDIUM
1111 bool "m7a.medium"
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ resource "aws_instance" "kdevops_instance" {
139139}
140140
141141module "kdevops_ebs_volumes" {
142- count = var. aws_enable_ebs == " true " ? local. kdevops_num_boxes : 0
142+ count = var. aws_ebs_volumes_per_instance > 0 ? local. kdevops_num_boxes : 0
143143 source = " ./kdevops_ebs_volumes"
144144 vol_availability_zone = var. aws_availability_zone
145145 vol_count = var. aws_ebs_volumes_per_instance
Original file line number Diff line number Diff line change @@ -55,11 +55,6 @@ variable "aws_instance_type" {
5555 type = string
5656}
5757
58- variable "aws_enable_ebs" {
59- description = " Whether or not to enable EBS"
60- type = string
61- }
62-
6358variable "aws_ebs_volumes_per_instance" {
6459 description = " Number of EBS volumes to create per instance"
6560 type = number
You can’t perform that action at this time.
0 commit comments