Skip to content

Bug: bootstrap file is missing on second run #36

@morremeyer

Description

@morremeyer

Hey everyone,

I upgraded our use of the module today, from grafana/loki:v3.5.5 to the HEAD of grafana/lambda-promtail's main branch.

The next terraform plan & apply happened without any problems.

However, all subsequent plans now error with

{
    "severity": "error",
    "summary": "Archive creation error",
    "detail": "error creating archive: error archiving file: could not archive missing file: .terraform/modules/lambda_promtail/pkg/bootstrap",
    "address": "module.lambda_promtail.data.archive_file.lambda[0]",
    "range": {
      "filename": ".terraform/modules/lambda_promtail/main.tf",
      "start": {
        "line": 211,
        "column": 30,
        "byte": 5931
      },
      "end": {
        "line": 211,
        "column": 31,
        "byte": 5932
      }
    },
    "snippet": {
      "context": "data \"archive_file\" \"lambda\"",
      "code": "data \"archive_file\" \"lambda\" {",
      "start_line": 211,
      "highlight_start_offset": 29,
      "highlight_end_offset": 30,
      "values": []
    }
  }

This log extract is taken from terraform cloud.

I looked into the issue for a bit and it looks to me like the binary build is not triggered on every run.

This makes sense, since the build is only triggered by changes to the module files.
As far as I understand, the go build would need to run on every run of the module, so that archive_file.lambda can run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNew issues will automatically receive this label. Maintainers should replace it.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions