You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: plugin IaC registration, multi-store secrets, per-env infra resolution
Update dsl-reference (docs/ and cmd/wfctl/embedded) with secretStores
section, updated secrets section (defaultStore, per-secret store field,
multi-store example), and expanded infrastructure section with per-env
resolution strategies (container/provision/existing with connection config).
Update WFCTL.md with 11-screen wizard reference, Ctrl+G navigation, and
secrets setup command documentation. Update CHANGELOG.md with all new
features from this implementation cycle. Create plugin-manifest-guide.md
for plugin authors to declare infrastructure requirements.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
### Added
11
11
12
12
-**`wfctl dev`** (`cmd/wfctl/dev.go`, `dev_compose.go`, `dev_process.go`, `dev_k8s.go`, `dev_expose.go`): local development cluster management. Subcommands: `up`, `down`, `logs`, `status`, `restart`. Three modes: docker-compose (default), process (`--local`, with hot-reload via fsnotify), and minikube (`--k8s`). Exposure integrations: Tailscale Funnel, Cloudflare Tunnel, ngrok (`--expose`). Auto-detects `environments.local.exposure.method` when `--expose` is omitted.
13
-
-**`wfctl wizard`** (`cmd/wfctl/wizard.go`, `wizard_models.go`): interactive Bubbletea TUI wizard for project setup. Nine screens: project info → services → infrastructure → environments → deployment → secrets → CI/CD → review → write. Generates a complete `app.yaml` and optionally triggers `wfctl ci init`. Navigates with Enter/Esc/Tab/Space/arrows.
13
+
-**`wfctl wizard`** (`cmd/wfctl/wizard.go`, `wizard_models.go`): interactive Bubbletea TUI wizard for project setup. Eleven screens: project info → services → infrastructure → infra resolution (per-env strategy) → environments → deployment → secret stores → secret routing → secret values → CI/CD → review → write. New screens vs prior version: per-environment infra resolution (container/provision/existing with connection details for "existing"), named secret store configuration with add/remove flow, per-secret store routing (← → to assign), and bulk hidden secret input with Ctrl+G auto-generation for keys/tokens. Generates a complete `app.yaml` including `secretStores:` and per-secret `store:` routing.
14
+
-**`wfctl secrets setup`** (`cmd/wfctl/secrets_setup.go`): standalone interactive command to set all secrets for a given environment. Reads `secrets.entries` from config, resolves store per secret (env override → per-secret store → defaultStore → legacy provider), prompts with hidden terminal input, and supports `--auto-gen-keys` flag to auto-generate random hex values for names ending in `_KEY`, `_SECRET`, `_TOKEN`, or `_SIGNING`.
15
+
-**Plugin manifest `moduleInfraRequirements`** (`config/plugin_manifest.go`): `PluginManifestFile` struct with `moduleInfraRequirements` map, `ModuleInfraSpec`, and `InfraRequirement`. Allows plugin authors to declare infrastructure dependencies (type, name, Docker image, ports, secrets, providers) per module type.
16
+
-**Multi-store secrets** (`config/secrets_config.go`, `config/config.go`): `SecretStoreConfig`, `SecretStores` map on `WorkflowConfig`, `DefaultStore` on `SecretsConfig`, and `Store` field on `SecretEntry` for per-secret store routing.
17
+
-**Per-environment infra resolution** (`config/infra_resolution.go`): `InfraEnvironmentResolution` with `strategy` (container/provision/existing), `dockerImage`, `port`, `provider`, `config`, and `connection` (host/port/auth). Added `Environments` map to `InfraResourceConfig`.
18
+
-**`SecretsProvider.Check()`** (`cmd/wfctl/secrets_providers.go`): `SecretState` enum (Set/NotSet/NoAccess/FetchError/Unconfigured) and `Check()` method on the interface with `envProvider` implementation. `SecretStatus` now includes `Store` and `State` fields.
19
+
-**Multi-store secret resolution** (`cmd/wfctl/secrets_resolve.go`): `ResolveSecretStore` (priority: env override → per-secret store → defaultStore → legacy provider → "env"), `getProviderForStore` (maps SecretStores config to providers), `buildSecretStatuses` (access-aware status for `wfctl secrets list`).
20
+
-**`detect_infra_needs` plugin manifest integration** (`cmd/wfctl/plugin_infra.go`, `mcp/scaffold_tools.go`): `LoadPluginManifests` and `DetectPluginInfraNeeds` scan local plugin directories for `plugin.json` manifests and surface module-type infra requirements. MCP tool gains optional `plugins_dir` parameter.
-`docs/WFCTL.md`: updated `wizard` reference (11 screens, new navigation keys); added `secrets setup` command reference with flag table and examples; updated `secrets list` description to mention multi-store routing.
25
+
-`docs/dsl-reference.md` + `cmd/wfctl/dsl-reference-embedded.md`: expanded `infrastructure` fields with per-env resolution strategies, connection config, and extended example; added `secretStores:` section with example and relationships; updated `secrets:` section with `defaultStore`, per-secret `store` field, multi-store example, and `secrets setup` CLI command.
26
+
-`docs/plugin-manifest-guide.md`: new guide for plugin authors on declaring infrastructure requirements in `plugin.json` via `moduleInfraRequirements`.
A map of infrastructure resource definitions. Structure is plugin-defined.
671
+
672
+
The `infrastructure:` section declares infrastructure resources the application depends on. Each resource can specify per-environment resolution strategies.
673
+
674
+
- `infrastructure.resources` (array) — list of infrastructure resource declarations. Each entry:
- `provider`(string) — IaC provider to use for provisioning (e.g., `aws`, `gcp`, `azure`, `digitalocean`)
678
+
- `config`(map) — resource-specific configuration
679
+
- `environments` (map) — per-environment resolution strategies. Each key is an environment name and the value is an `InfraEnvironmentResolution` object:
680
+
- `strategy` (string, required) — how to resolve this resource in this environment:
681
+
- `container`— run a container locally (for local/CI environments)
682
+
- `provision`— provision via IaC plugin (for staging/production)
683
+
- `existing`— connect to an already-running instance
684
+
- `dockerImage` (string) — container image to use when `strategy: container`
685
+
- `port` (int) — container port when `strategy: container`
686
+
- `provider`(string) — override IaC provider for this environment
- `connection` (object) — connection details when `strategy: existing`:
689
+
- `host`(string, required) — hostname or IP
690
+
- `port`(int) — port number
691
+
- `auth`(string) — authentication reference (e.g., a secret name)
672
692
673
693
### `sidecars` Fields
674
694
- `sidecars`(array) — list of sidecar container definitions
@@ -699,6 +719,43 @@ platform:
699
719
ports:
700
720
- container_port: 8080
701
721
722
+
infrastructure:
723
+
resources:
724
+
- name: db
725
+
type: postgresql
726
+
provider: aws
727
+
config:
728
+
instanceClass: db.t3.micro
729
+
environments:
730
+
local:
731
+
strategy: container
732
+
dockerImage: postgres:16
733
+
port: 5432
734
+
staging:
735
+
strategy: provision
736
+
provider: aws
737
+
production:
738
+
strategy: provision
739
+
provider: aws
740
+
config:
741
+
instanceClass: db.r6g.large
742
+
- name: cache
743
+
type: redis
744
+
environments:
745
+
local:
746
+
strategy: container
747
+
dockerImage: redis:7
748
+
port: 6379
749
+
staging:
750
+
strategy: existing
751
+
connection:
752
+
host: redis.internal.staging.example.com
753
+
port: 6379
754
+
auth: REDIS_PASSWORD
755
+
production:
756
+
strategy: provision
757
+
provider: aws
758
+
702
759
sidecars:
703
760
- name: redis-cache
704
761
type: redis
@@ -715,6 +772,8 @@ sidecars:
715
772
- `platform.context`module type references the `platform` section org/environment values
716
773
- Sidecars are deployed alongside the application container but are not addressable as workflow modules
717
774
- `infrastructure`resources are provisioned by IaC plugins before application start
775
+
- `infrastructure.resources[*].environments`per-env strategies control `wfctl dev up` container lifecycle
776
+
- Plugins declare their infra requirements in `plugin.json` via `moduleInfraRequirements`
718
777
719
778
---
720
779
@@ -877,33 +936,70 @@ environments:
877
936
878
937
---
879
938
939
+
<!-- section: secretStores -->
940
+
## Secret Stores
941
+
942
+
The optional `secretStores:` section declares named secret storage backends. This enables routing different secrets to different backends (e.g., application secrets in environment variables, payment keys in AWS Secrets Manager).
943
+
944
+
### Fields
945
+
946
+
- `secretStores.<name>` (object) — a named store. Fields:
- `secrets.defaultStore`references a named store from `secretStores`
965
+
- `secrets.entries[*].store`routes an individual secret to a specific store
966
+
- `environments[*].secretsProvider`overrides the store name for all secrets in that environment
967
+
968
+
---
969
+
880
970
<!-- section: secrets -->
881
971
## Secrets
882
972
883
-
The optional `secrets:` section declares the application's secret management configuration: which provider to use, rotation policy, and what secrets the application needs.
973
+
The optional `secrets:` section declares the application's secret management configuration: which stores to use, rotation policy, and what secrets the application needs.
- `secrets.defaultStore`(string) — name of the default store from `secretStores`. When set, all secrets without an explicit `store` field use this store.
978
+
- `secrets.provider` (string) — legacy single-provider name (use `defaultStore` + `secretStores` for new configs). Supported: `env`, `vault`, `aws-secrets-manager`, `gcp-secret-manager`
979
+
- `secrets.config`(map) — provider-specific configuration (used with legacy `provider` field)
Copy file name to clipboardExpand all lines: docs/WFCTL.md
+34-8Lines changed: 34 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1326,7 +1326,7 @@ wfctl secrets set TLS_CERT --from-file ./certs/server.crt
1326
1326
1327
1327
#### `secrets list`
1328
1328
1329
-
List all declared secretsand their set/unset status.
1329
+
List all declared secrets, their store routing, and access-aware set/unset status. For multi-store configs, each secret shows which store it resolves to and whether the store is accessible.
1330
1330
1331
1331
```bash
1332
1332
wfctl secrets list --config app.yaml
@@ -1364,6 +1364,26 @@ Copy secret structure from one environment to another (Tier 2 implementation).
1364
1364
wfctl secrets sync --from staging --to production
1365
1365
```
1366
1366
1367
+
#### `secrets setup`
1368
+
1369
+
Interactively set all secrets declared in the config for a given environment. Prompts for each secret's value with hidden terminal input. Secrets in inaccessible stores are skipped. Use `--auto-gen-keys` to automatically generate random values for secrets whose names end in `_KEY`, `_SECRET`, `_TOKEN`, or `_SIGNING`.
1370
+
1371
+
```
1372
+
wfctl secrets setup [options]
1373
+
```
1374
+
1375
+
| Flag | Default | Description |
1376
+
|------|---------|-------------|
1377
+
|`--env`|`local`| Target environment name |
1378
+
|`--config`|`app.yaml`| Workflow config file |
1379
+
|`--auto-gen-keys`|`false`| Auto-generate random values for key/token/secret-named entries |
1380
+
1381
+
```bash
1382
+
wfctl secrets setup --env local
1383
+
wfctl secrets setup --env production --auto-gen-keys
7.**CI/CD** — generate CI bootstrap and select platform (GitHub Actions, GitLab CI)
1794
-
8.**Review** — preview generated YAML
1795
-
9.**Write** — save to `app.yaml`
1810
+
4.**Infra resolution** — per-environment strategy for each selected infrastructure resource (container/provision/existing); if "existing", prompts for host:port
1811
+
5.**Environments** — local, staging, production (checkboxes)
1812
+
6.**Deployment** — provider per environment (Docker Compose, Kubernetes, AWS ECS)
1813
+
7.**Secret stores** — define named stores (env, Vault, AWS Secrets Manager, GCP Secret Manager); Space to add, Delete to remove, Enter to continue
1814
+
8.**Secret routing** — assign each required secret to a store (← → to change store)
1815
+
9.**Secret values** — enter values for required secrets with hidden input; Ctrl+G auto-generates random values for keys/tokens
1816
+
10.**CI/CD** — generate CI bootstrap and select platform (GitHub Actions, GitLab CI)
1817
+
11.**Review** — preview generated YAML
1818
+
12.**Write** — save to `app.yaml`
1796
1819
1797
1820
**Navigation:**
1798
1821
@@ -1801,8 +1824,10 @@ No flags. The wizard runs in the terminal and collects:
1801
1824
|`Enter`| Advance to next screen / confirm |
1802
1825
|`Esc`| Go back to previous screen |
1803
1826
|`Tab`| Move focus between fields |
1804
-
|`Space`| Toggle checkbox / select option|
1827
+
|`Space`| Toggle checkbox / add store|
1805
1828
|`↑` / `↓`| Move cursor in lists |
1829
+
|`←` / `→`| Change strategy or store selection |
1830
+
|`Ctrl+G`| Auto-generate a random secret value (bulk secrets screen) |
1806
1831
|`Ctrl+C`| Quit without saving |
1807
1832
1808
1833
**Example:**
@@ -1811,6 +1836,7 @@ No flags. The wizard runs in the terminal and collects:
1811
1836
wfctl wizard
1812
1837
# Follow the interactive prompts to generate app.yaml
1813
1838
wfctl validate app.yaml
1839
+
wfctl secrets setup --env local# set secret values interactively
0 commit comments