Skip to content

Commit 8853705

Browse files
travis-reedostermanRoseSecurity
authored
Set allowed and cache methods as non nullable (#324)
Setting nullable to false ensures that the variable value will never be null within the module. If nullable is false and the variable has a default value, then Terraform uses the default when a module input argument is null. Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]> Co-authored-by: RoseSecurity <[email protected]>
1 parent e57a21d commit 8853705

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,14 @@ variable "viewer_protocol_policy" {
215215
variable "allowed_methods" {
216216
type = list(string)
217217
default = ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"]
218+
nullable = false
218219
description = "List of allowed methods (e.g. GET, PUT, POST, DELETE, HEAD) for AWS CloudFront"
219220
}
220221

221222
variable "cached_methods" {
222223
type = list(string)
223224
default = ["GET", "HEAD"]
225+
nullable = false
224226
description = "List of cached methods (e.g. GET, PUT, POST, DELETE, HEAD)"
225227
}
226228

0 commit comments

Comments
 (0)