Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Conversation

@edolsen-rv
Copy link

Moved the filename to optional. Deleted the stub .zip files from the examples. All examples successfully execute a terraform plan

@edolsen-rv edolsen-rv requested a review from a team as a code owner September 28, 2022 16:32
variables.tf Outdated

variable "filename" {
description = "The path to the function's deployment package within the local filesystem."
default = ""

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?

Copy link
Author

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.

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

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

@edolsen-rv edolsen-rv requested a review from lbrimeyer October 5, 2022 19:54
lbrimeyer
lbrimeyer previously approved these changes Oct 6, 2022
@edolsen-rv
Copy link
Author

@lbrimeyer Can I get this stamped again?

@edolsen-rv edolsen-rv merged commit bc0d3a8 into master Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants