Skip to content

iac.provider gap: plugin declares moduleTypes but doesn't register IaCProvider impl #5

@intel352

Description

@intel352

Summary

`workflow-plugin-eventbus` v0.1.0 declares `moduleTypes` for `infra.eventbus`, `infra.eventbus.stream`, and `infra.eventbus.consumer` in plugin.json, but does not register itself as an `iac.provider` (no `IaCProvider` impl in the codebase). Without an iac.provider, wfctl's plan dispatch has nowhere to route eventbus resources, so apply fails.

Reproduction

BMW pilot integration. infra.yaml declares:

```yaml

  • name: bmw-eventbus
    type: infra.eventbus
    config:
    provider: nats
    deploy_target: digitalocean.app_platform
    ...

  • name: bmw-stream
    type: infra.eventbus.stream
    config:
    name: BMW_FULFILLMENT
    subjects: ["bmw.>"]
    ...

6 × infra.eventbus.consumer resources

```

`wfctl infra apply` fails at plan-grouping with:

```
error: plan action for "bmw-eventbus" references provider "nats"
which is not declared as an iac.provider module
```

GoCodeAlone/workflow#620 fixes the plan-grouping bit by introducing an `iac_provider` field that disambiguates IaC routing from impl-level `provider` ("nats"/"kafka"). After PR 620 lands, BMW can declare `iac_provider: do-provider` on each eventbus resource.

But that just shifts the failure: `workflow-plugin-digitalocean` v0.14.3 has no driver for `infra.eventbus` / `infra.eventbus.stream` / `infra.eventbus.consumer` (its driver list: container_service, k8s_cluster, database, cache, load_balancer, vpc, firewall, dns, storage, registry, certificate, droplet, volume, iam_role, api_gateway). Apply will fail with "no driver for resource type infra.eventbus".

What's missing

`workflow-plugin-eventbus` declares modules but no `IaCProvider` interface impl that owns the lifecycle of those modules. Two architectural paths:

Path A: eventbus plugin registers as iac.provider

Plugin declares an `iac.provider` capability + IaCProvider impl. Operators put a separate `type: iac.provider, provider: eventbus` module in their config. Each eventbus resource sets `iac_provider: `.

The eventbus IaCProvider's drivers:

  • `infra.eventbus` driver: provisions the broker (delegates to deploy_target plugin — DO App Platform via a sub-RPC, or via a DeployTarget abstraction that the plugin already has internally per the v0.1.0 design)
  • `infra.eventbus.stream` + `infra.eventbus.consumer` drivers: NATS API calls against the live broker

This decouples the eventbus's IaC integration from any specific cloud provider — the plugin owns its lifecycle, deploy_target is a configurable backend.

Path B: cloud iac.provider plugins gain eventbus drivers via delegation

`workflow-plugin-digitalocean` (and AWS/GCP/Azure equivalents) gain drivers for `infra.eventbus.*` that delegate to the eventbus plugin via a sub-plugin pattern. Operators set `iac_provider: do-provider` and the DO plugin handles broker provisioning + delegates stream/consumer ops to a local eventbus-plugin RPC.

This keeps the wfctl plan dispatch model unchanged but puts the responsibility on every cloud iac.provider plugin to know about eventbus. Doesn't scale.

Recommendation

Path A. The eventbus plugin already has a `Provider` abstraction (NATS/Kafka/Kinesis) and a `DeployTarget` matrix (DO App Platform / k8s / aws / self-hosted) per the v0.1.0 design — those primitives are exactly what an IaCProvider needs.

Blast radius

Currently blocks BMW pilot deploys from reaching prod. The user's deploy chain (run 25625555953 attempts 1-2):

  1. F2 alignment failed on InvalidAccessKeyId — fixed by SPACES rotation (rotate-spaces-credentials.yml in BMW)
  2. Plan-grouping failed on "provider 'nats' not declared" — fixed by fix(wfctl): disambiguate iac_provider from impl-level provider in resource configs workflow#620 (iac_provider/provider disambiguation)
  3. Apply will fail on "no driver for infra.eventbus" — this issue

Related

🤖 Filed by Claude Code on behalf of the BMW deploy debug chain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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