Skip to content

Commit 434668e

Browse files
committed
terraform/Azure: Use "output yaml" for the EBS volume size setting
Remove the line in terraform.Makefile that sets "terraform_aws_volume_size" and just pass it directly from Kconfig via an "output yaml" directive. Signed-off-by: Chuck Lever <[email protected]>
1 parent 40747b4 commit 434668e

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

playbooks/roles/gen_tfvars/templates/aws/terraform.tfvars.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ aws_ami_owner = "{{ terraform_aws_ami_owner }}"
66
aws_instance_type = "{{ terraform_aws_instance_type }}"
77
aws_enable_ebs = "{{ terraform_aws_enable_ebs | lower }}"
88
aws_ebs_volumes_per_instance = "{{ terraform_aws_ebs_volumes_per_instance }}"
9-
aws_ebs_volume_size = "{{ terraform_aws_ebs_volume_size }}"
9+
aws_ebs_volume_size = {{ terraform_aws_ebs_volume_size }}
1010
aws_ebs_volume_type = "{{ terraform_aws_ebs_volume_type }}"
1111
{% if terraform_aws_ebs_volume_iops is defined %}
1212
aws_ebs_volume_iops = {{ terraform_aws_ebs_volume_iops }}

scripts/terraform.Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ DEFAULT_DEPS_REQS_EXTRA_VARS += $(KDEVOPS_TFVARS)
5050
ifeq (y,$(CONFIG_TERRAFORM_AWS))
5151
ifeq (y,$(CONFIG_TERRAFORM_AWS_ENABLE_EBS_VOLUMES))
5252
TERRAFORM_EXTRA_VARS += terraform_aws_enable_ebs='True'
53-
TERRAFORM_EXTRA_VARS += terraform_aws_ebs_volume_size=$(subst ",,$(CONFIG_TERRAFORM_TERRAFORM_AWS_EBS_VOLUME_SIZE))
5453
endif # CONFIG_TERRAFORM_AWS_ENABLE_EBS_VOLUMES
5554

5655
endif

terraform/aws/kconfigs/Kconfig.storage

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ config TERRAFORM_AWS_EBS_VOLUME_SIZE_4096G
174174

175175
endchoice
176176

177-
config TERRAFORM_TERRAFORM_AWS_EBS_VOLUME_SIZE
177+
config TERRAFORM_AWS_EBS_VOLUME_SIZE
178178
int
179+
output yaml
179180
default 4 if TERRAFORM_AWS_EBS_VOLUME_SIZE_4G
180181
default 8 if TERRAFORM_AWS_EBS_VOLUME_SIZE_8G
181182
default 16 if TERRAFORM_AWS_EBS_VOLUME_SIZE_16G

terraform/aws/vars.tf

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,9 @@ variable "aws_ebs_volumes_per_instance" {
6565
type = number
6666
}
6767

68-
# The t2.micro comes with 8 GiB of storage.
69-
# For more storage we need to use EBS.
70-
# AWS Free Tier includes 30GB of Storage, 2 million I/Os, and 1GB of snapshot
71-
# storage with Amazon Elastic Block Store (EBS).
72-
#
7368
variable "aws_ebs_volume_size" {
7469
description = "Size in GiB for each of the volumes"
75-
type = string
70+
type = number
7671
}
7772

7873
variable "aws_ebs_volume_type" {

0 commit comments

Comments
 (0)