@biffo/cli 0.272.3 → 0.272.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,30 @@
1
1
  terraform {
2
2
  required_providers {
3
- aws = { source = "hashicorp/aws", version = "~> 5.0" }
4
- archive = { source = "hashicorp/archive", version = "~> 2.0" }
3
+ aws = { source = "hashicorp/aws", version = "~> 5.0" }
5
4
  }
6
5
  }
7
6
 
8
- # Minimal placeholder zip — Terraform creates this automatically during plan.
9
- # The CI/CD pipeline overwrites the function code on every deploy;
10
- # this only exists so the Lambda resource can be created on first apply.
11
- data "archive_file" "placeholder" {
12
- type = "zip"
13
- output_path = "${path.module}/placeholder.zip"
14
- source {
15
- content = "def handler(event, context):\n pass\n"
16
- filename = "handler.py"
17
- }
18
- }
7
+ # Minimal placeholder zip — a COMMITTED file, deliberately not generated.
8
+ #
9
+ # It exists only so the Lambda resource can be created on first apply; the
10
+ # CI/CD pipeline overwrites the function code on every deploy and this resource
11
+ # ignores changes to it thereafter.
12
+ #
13
+ # It used to be produced by a `data "archive_file"` writing to
14
+ # ${path.module}/placeholder.zip. That is evaluated at PLAN time, and
15
+ # deploy-infra.yml runs plan and apply as separate jobs on separate self-hosted
16
+ # runners, transporting only `tfplan`. So the file existed on the plan runner
17
+ # and not on the apply runner, and creating a Lambda failed with
18
+ # "reading ZIP file ...: no such file or directory" — see #1457.
19
+ #
20
+ # It survived a long time because it bites ONLY a function being created: an
21
+ # existing one is unchanged, so `filename` is never re-read. Every routine
22
+ # deploy was green. It was also intermittent, because two jobs landing on the
23
+ # same runner share that runner's checkout — which makes a re-run look like a
24
+ # fix and teaches exactly the wrong lesson.
25
+ #
26
+ # Committing the bytes removes the plan/apply coupling rather than transporting
27
+ # it. The contents are irrelevant, so generating them bought nothing.
19
28
 
20
29
  locals {
21
30
  name_prefix = "${var.project_name}-${var.environment}"
@@ -113,8 +122,8 @@ resource "aws_lambda_function" "main" {
113
122
  memory_size = var.memory_size
114
123
  timeout = var.timeout
115
124
 
116
- filename = data.archive_file.placeholder.output_path
117
- source_code_hash = data.archive_file.placeholder.output_base64sha256
125
+ filename = "${path.module}/placeholder.zip"
126
+ source_code_hash = filebase64sha256("${path.module}/placeholder.zip")
118
127
 
119
128
  dead_letter_config {
120
129
  target_arn = aws_sqs_queue.dlq.arn
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.272.3",
3
+ "version": "0.272.4",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",