# @backstage/plugin-catalog-backend-module-puppetdb

> A Backstage catalog backend module that helps integrate towards PuppetDB

Latest version **0.2.26** (published 2026-09-15) · Apache-2.0 license · 1.3K weekly downloads

## Install

```sh
npm install @backstage/plugin-catalog-backend-module-puppetdb
pnpm add @backstage/plugin-catalog-backend-module-puppetdb
yarn add @backstage/plugin-catalog-backend-module-puppetdb
bun add @backstage/plugin-catalog-backend-module-puppetdb
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: pre 1.0.

Negative: declining downloads.

## Facts

| | |
|---|---|
| Version | 0.2.26 |
| Published | 2026-09-15 |
| First published | 2023-03-04 |
| Weekly downloads | 1.3K |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 120 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 34590 |
| Maintainers | patriko, freben, marcuseide |
| Keywords | backstage, puppetdb, puppet |

## Links

- npm: https://www.npmjs.com/package/@backstage/plugin-catalog-backend-module-puppetdb
- Repository: https://github.com/backstage/backstage
- Homepage: https://backstage.io
- npm.io page: https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb

## Dependencies (7)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [@backstage/types](https://npm.io/package/@backstage/types.md) ^1.2.2
- [@backstage/config](https://npm.io/package/@backstage/config.md) ^1.3.9
- [@backstage/errors](https://npm.io/package/@backstage/errors.md) ^1.3.1
- [@backstage/catalog-model](https://npm.io/package/@backstage/catalog-model.md) ^1.10.1
- [@backstage/backend-plugin-api](https://npm.io/package/@backstage/backend-plugin-api.md) ^1.10.1
- [@backstage/plugin-catalog-node](https://npm.io/package/@backstage/plugin-catalog-node.md) ^2.2.5

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@lowdefy/block-dev-e2e](https://npm.io/package/@lowdefy/block-dev-e2e.md) — 582 weekly downloads

## Recent versions

- 0.2.26 (latest) — 2026-09-15
- 0.2.27-next.1 (next) — 2026-09-29
- 0.0.0-nightly-20260928023907 (nightly) — 2026-09-28
- 0.0.0-nightly-20260927023342 — 2026-09-27
- 0.0.0-nightly-20260926022852 — 2026-09-26
- 0.0.0-nightly-20260925022940 — 2026-09-25
- 0.0.0-nightly-20260924023050 — 2026-09-24
- 0.0.0-nightly-20260923023054 — 2026-09-23
- 0.2.27-next.0 — 2026-09-22
- 0.0.0-nightly-20260922023058 — 2026-09-22
- 0.0.0-nightly-20260921023416 — 2026-09-21
- 0.0.0-nightly-20260920023043 — 2026-09-20
- 0.0.0-nightly-20260919022921 — 2026-09-19
- 0.0.0-nightly-20260918023200 — 2026-09-18
- 0.0.0-nightly-20260909022715 — 2026-09-09
- … 1195 more at https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb/versions

## README

# Catalog Backend Module for Puppet

This is an extension module to the `plugin-catalog-backend` plugin, providing an `PuppetDbEntityProvider` that can be used to ingest
[Resource entities](https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource) from a
[PuppetDB](https://www.puppet.com/docs/puppet/6/puppetdb_overview.html) instance(s). This provider is useful if you want to import nodes
from your PuppetDB into Backstage.

## Installation

The provider is not installed by default, therefore you have to add a dependency to `@backstage/plugin-catalog-backend-module-puppetdb`
to your backend package:

```bash
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-puppetdb
```

Update the catalog plugin initialization in your backend to add the provider and schedule it:

```diff
+ import { PuppetDbEntityProvider } from '@backstage/plugin-catalog-backend-module-puppetdb';

 export default async function createPlugin(
   env: PluginEnvironment,
 ): Promise<Router> {
   const builder = await CatalogBuilder.create(env);

+  builder.addEntityProvider(
+    PuppetDbEntityProvider.fromConfig(env.config, {
+      logger: env.logger,
+      schedule: env.scheduler.createScheduledTaskRunner({
+        frequency: { minutes: 10 },
+        timeout: { minutes: 50 },
+        initialDelay: { seconds: 15 }
+      }),
+    })
+  );
```

After this, you also have to add some configuration in your app-config that describes what you want to import for that target.

## Configuration

The following configuration is an example of how a setup could look for importing nodes from an internal PuppetDB instance:

```yaml
catalog:
  providers:
    puppetdb:
      default:
        # (Required) The base URL of PuppetDB API instance:
        baseUrl: https://puppetdb.example.com

        # (Optional) Query to filter PuppetDB nodes:
        #query: '["=","certname","example.com"]'
```

## Customize the Provider

The default ingestion behaviour will likely not work for all use cases - you will want to set proper `Owner`, `System` and other fields for the
ingested resources. In case you want to customize the ingested entities, the provider allows to pass a transformer for resources. Here we will show an example
of overriding the default transformer.

1. Create a transformer:

```ts
export const customResourceTransformer: ResourceTransformer = async (
  node,
  config,
): Promise<ResourceEntity | undefined> => {
  // Transformations may change namespace, owner, change entity naming pattern, add labels, annotations, etc.

  // Create the Resource Entity on your own, or wrap the default transformer
  return await defaultResourceTransformer(node, config);
};
```

2. Configure the provider with the transformer:

```diff
  builder.addEntityProvider(
    PuppetDbEntityProvider.fromConfig(env.config, {
      logger: env.logger,
+     transformer: customResourceTransformer,
      schedule: env.scheduler.createScheduledTaskRunner({
        frequency: { minutes: 10 },
        timeout: { minutes: 50 },
        initialDelay: { seconds: 15 }
      }),
    })
  );
```

---
_Source: https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
