Skip to content

Commit daedf5d

Browse files
author
Jan Sebastian Siwy
authored
Merge pull request #32 from babbel/unify-variables
Unify structure of module variables
2 parents f01a4f2 + 16d0429 commit daedf5d

File tree

2 files changed

+40
-16
lines changed

2 files changed

+40
-16
lines changed

_test/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ provider "aws" {
33
}
44

55
module "lambda" {
6-
source = "./.."
6+
source = "./.."
77

88
function_name = "example"
99
description = "This is an example"

variables.tf

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,64 +5,84 @@ variable "archive_file" {
55
})
66
default = null
77

8-
description = "An instance of the `archive_file` data source containing the code of the Lambda function. Conflicts with `source_dir`."
8+
description = <<EOS
9+
An instance of the `archive_file` data source containing the code of the Lambda function. Conflicts with `source_dir`.
10+
EOS
911
}
1012

1113
variable "cloudwatch_log_group_retention_in_days" {
1214
type = number
1315
default = 3
1416

15-
description = "The number of days to retain the log of the Lambda function."
17+
description = <<EOS
18+
The number of days to retain the log of the Lambda function.
19+
EOS
1620
}
1721

1822
variable "description" {
1923
type = string
2024

21-
description = "Description of the Lambda function."
25+
description = <<EOS
26+
Description of the Lambda function.
27+
EOS
2228
}
2329

2430
variable "environment_variables" {
2531
type = map(string)
2632
default = null
2733

28-
description = "Environment variable key-value pairs."
34+
description = <<EOS
35+
Environment variable key-value pairs.
36+
EOS
2937
}
3038

3139
variable "function_name" {
3240
type = string
3341

34-
description = "Name of the Lambda function."
42+
description = <<EOS
43+
Name of the Lambda function.
44+
EOS
3545
}
3646

3747
variable "handler" {
3848
type = string
3949

40-
description = "The name of the method within your code that Lambda calls to execute your function."
50+
description = <<EOS
51+
The name of the method within your code that Lambda calls to execute your function.
52+
EOS
4153
}
4254

4355
variable "layers" {
4456
type = list(string)
4557
default = []
4658

47-
description = "List of up to five Lambda layer ARNs."
59+
description = <<EOS
60+
List of up to five Lambda layer ARNs.
61+
EOS
4862
}
4963

5064
variable "memory_size" {
5165
type = number
5266

53-
description = "The amount of memory (in MB) available to the function at runtime. Increasing the Lambda function memory also increases its CPU allocation."
67+
description = <<EOS
68+
The amount of memory (in MB) available to the function at runtime. Increasing the Lambda function memory also increases its CPU allocation.
69+
EOS
5470
}
5571

5672
variable "reserved_concurrent_executions" {
5773
type = number
5874

59-
description = "The number of simultaneous executions to reserve for the Lambda function."
75+
description = <<EOS
76+
The number of simultaneous executions to reserve for the Lambda function.
77+
EOS
6078
}
6179

6280
variable "runtime" {
6381
type = string
6482

65-
description = "The identifier of the Lambda function [runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html)."
83+
description = <<EOS
84+
The identifier of the Lambda function [runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
85+
EOS
6686
}
6787

6888
variable "secret_environment_variables" {
@@ -82,20 +102,26 @@ variable "source_dir" {
82102
type = string
83103
default = null
84104

85-
description = "Path of the directory which shall be packed as code of the Lambda function. Conflicts with `archive_file`."
105+
description = <<EOS
106+
Path of the directory which shall be packed as code of the Lambda function. Conflicts with `archive_file`.
107+
EOS
86108
}
87109

88110
variable "tags" {
89111
type = map(string)
90112
default = {}
91113

92-
description = "Tags which will be assigned to all resources."
114+
description = <<EOS
115+
Map of tags assigned to all AWS resources created by this module.
116+
EOS
93117
}
94118

95119
variable "timeout" {
96120
type = number
97121

98-
description = "The amount of time (in seconds) per execution before stopping it."
122+
description = <<EOS
123+
The amount of time (in seconds) per execution before stopping it.
124+
EOS
99125
}
100126

101127
variable "vpc_config" {
@@ -106,12 +132,10 @@ variable "vpc_config" {
106132
id = string
107133
})
108134
)
109-
110135
vpc = object({
111136
id = string
112137
})
113138
})
114-
115139
default = null
116140

117141
description = <<EOS

0 commit comments

Comments
 (0)