Skip to content

Conversation

@jta
Copy link

@jta jta commented Jun 22, 2023

We provide newer builds that can run on provided.al2 for different architectures. These builds are under a GOARCH directory (e.g. arm64/latest). This commit identifies what runtime, handler and architecture to use based off of the version string.

Will defer switching the default for lambda_version to a future release.

@jta jta requested review from aping1 and bendrucker as code owners June 22, 2023 17:06
@jta jta requested a review from obs-gh-irismcleary June 22, 2023 17:06
main.tf Outdated
s3_bucket = var.s3_bucket != "" ? var.s3_bucket : lookup(var.s3_regional_buckets, data.aws_region.current.name, local.default_lambda_bucket)
s3_key = var.s3_key != "" ? var.s3_key : join("/", [var.s3_key_prefix, format("%s.zip", var.lambda_version)])

goarch = lookup({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay so, logicking through the lookup() and current default lambda_version ("latest"), this will always fall through to the default go1.x unless we explicitly override lambda_version. sgtm

@jta jta force-pushed the joao/arch-bis branch from 283ed6c to ab3c13f Compare June 22, 2023 17:26
Copy link
Contributor

@bendrucker bendrucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a syntax error here

@bendrucker
Copy link
Contributor

Actually no just weird indentation

@jta
Copy link
Author

jta commented Jun 22, 2023

There's a syntax error here

I was really surprised by the result of terraform fmt there, but can't figure out how to make it do the right thing :/

Edit: the trick was not having the opening { on the same line as lookup(

We provide newer builds that can run on `provided.al2` for different
architectures. These builds are under a GOARCH directory (e.g.
`arm64/latest`). This commit identifies what runtime, handler and
architecture to use based off of the version string.

Will defer switching the default for `lambda_version` to a future
release.
@jta jta force-pushed the joao/arch-bis branch from ab3c13f to f0d2585 Compare June 22, 2023 17:55
@jta jta merged commit edac772 into main Jun 22, 2023
@jta jta deleted the joao/arch-bis branch September 5, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants