-
Notifications
You must be signed in to change notification settings - Fork 1
Fp 141 - filename variable optional #11
Conversation
variables.tf
Outdated
|
|
||
| variable "filename" { | ||
| description = "The path to the function's deployment package within the local filesystem." | ||
| default = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible to leave this null and check that it's passed at all instead of misusing a zero val?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this look like filename = var.filename != null ? var.filename : "" ?
I'm getting an error when trying to run the examples:
Error: Unsupported argument
│
│ on ../../main.tf line 4, in module "lambda":
│ 4: filename = var.filename != null ? var.filename : ""
│
│ An argument named "filename" is not expected here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah so the underlying module shtuff can't handle nulls, gotcha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just make sure the zero value is documented that an empty string is basically psuedo-null to fulfill the interface
|
@lbrimeyer Can I get this stamped again? |
Moved the filename to optional. Deleted the stub .zip files from the examples. All examples successfully execute a
terraform plan