Skip to content

Missing hiera data file for gha_runner role #259

@akuzminsky

Description

@akuzminsky

Description

The terraform-aws-actions-runner module sets puppet_role: gha_runner as a facter fact, but puppet-code has no corresponding hiera data file data/gha_runner.yaml. This causes Puppet to fail with:

Error: Function lookup() did not find a value for the name 'classes'

Root Cause

The hiera config at environments/sandbox/hiera.yaml looks up data by role:

hierarchy:
  - name: "Per role data"
    path: "%{::puppet_role}.yaml"

With puppet_role: gha_runner, it looks for data/gha_runner.yaml — but that file doesn't exist. Other roles have their data files (jumphost.yaml, webserver.yaml, bookstack.yaml, etc.), but gha_runner is missing.

The role::github_runner class and manifests exist in modules/role/manifests/github_runner.pp, but there's no hiera data to wire it up.

Fix

Add environments/sandbox/data/gha_runner.yaml with at minimum the classes key, similar to other role data files. For example:

---
classes:
  - role::github_runner

Impact

Any user of terraform-aws-actions-runner that relies on the default puppet_hiera_config_path (i.e., the built-in puppet-code) will hit this error. Currently masked in module tests because they override puppet_hiera_config_path to point at infrahouse-puppet-data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions