@varde-flyt/vfac 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -7
- package/dist/vfac.mjs +26 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,13 +228,38 @@ holding on to:
|
|
|
228
228
|
| `valueFrom.resourceOutput` | read a value another resource publishes |
|
|
229
229
|
| `dependencyBindings` | use that resource as the PROVIDER for a declared dependency |
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
231
|
+
An entry means one of three things, and only one of them releases anything:
|
|
232
|
+
|
|
233
|
+
| The manifest says | What `vfac apply` does |
|
|
234
|
+
| --- | --- |
|
|
235
|
+
| nothing for the key | leaves that connection exactly as it is |
|
|
236
|
+
| `resourceKey: …` | connects to that resource, or keeps the connection it has |
|
|
237
|
+
| `state: disconnected` | releases the connection, in the same apply as your settings |
|
|
238
|
+
|
|
239
|
+
```yaml
|
|
240
|
+
spec:
|
|
241
|
+
configuration:
|
|
242
|
+
signIn: Disabled # whatever setting made the connection necessary
|
|
243
|
+
dependencyBindings:
|
|
244
|
+
<dependency-key>:
|
|
245
|
+
state: disconnected
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Leaving a key out never releases anything, so a manifest written before this
|
|
249
|
+
field existed re-applies unchanged. `vfac plan` lists a release under
|
|
250
|
+
`connections to disconnect` before you approve it. A dependency the Product
|
|
251
|
+
requires cannot be disconnected; one a setting makes required can be, in the same
|
|
252
|
+
file that turns the setting off. A released connection is torn down by its
|
|
253
|
+
provider afterwards, and the providing resource can only be deleted once that
|
|
254
|
+
teardown is done.
|
|
255
|
+
|
|
256
|
+
**A manifest never moves a connection in one apply**: pointing an existing
|
|
257
|
+
connection at a different resource is refused rather than performed, because a
|
|
258
|
+
file you re-apply on every push must not be able to silently move a running
|
|
259
|
+
service onto a different identity provider. Disconnect it and apply, then name
|
|
260
|
+
the new resource and apply again. The credential the connection delivers never
|
|
261
|
+
appears in your manifest, in a plan, or in any `vfac` output — the providing
|
|
262
|
+
service issues it and the platform stores it.
|
|
238
263
|
|
|
239
264
|
## For an agent or a pipeline
|
|
240
265
|
|
package/dist/vfac.mjs
CHANGED
|
@@ -16473,7 +16473,7 @@ function looksLikeReference(value) {
|
|
|
16473
16473
|
}
|
|
16474
16474
|
|
|
16475
16475
|
// ../product-contracts/dist/dependency-binding.js
|
|
16476
|
-
var
|
|
16476
|
+
var DependencyBindingConnectSchema = external_exports.object({
|
|
16477
16477
|
/** The providing Resource's `metadata.key`. */
|
|
16478
16478
|
resourceKey: ResourceKeySchema,
|
|
16479
16479
|
/**
|
|
@@ -16492,6 +16492,11 @@ var DependencyBindingSelectorSchema = external_exports.object({
|
|
|
16492
16492
|
*/
|
|
16493
16493
|
projectId: external_exports.string().min(1).max(64).optional()
|
|
16494
16494
|
}).strict();
|
|
16495
|
+
var DependencyBindingDisconnectSchema = external_exports.object({ state: external_exports.literal("disconnected") }).strict();
|
|
16496
|
+
var DependencyBindingSelectorSchema = external_exports.union([
|
|
16497
|
+
DependencyBindingConnectSchema,
|
|
16498
|
+
DependencyBindingDisconnectSchema
|
|
16499
|
+
]);
|
|
16495
16500
|
var DependencyBindingsSchema = external_exports.record(ServiceBindingKeySchema, DependencyBindingSelectorSchema);
|
|
16496
16501
|
|
|
16497
16502
|
// ../product-contracts/dist/product-instance-template.schema.js
|
|
@@ -16593,10 +16598,17 @@ var ProductInstanceTemplateSchema = external_exports.object({
|
|
|
16593
16598
|
* schema; this names another Resource, and the create envelope made the
|
|
16594
16599
|
* identical split for the identical reason.
|
|
16595
16600
|
*
|
|
16601
|
+
* THREE MEANINGS, AND ONLY ONE OF THEM RELEASES ANYTHING:
|
|
16602
|
+
*
|
|
16603
|
+
* key omitted leave that connection alone
|
|
16604
|
+
* { resourceKey, … } connect to (or keep) this provider
|
|
16605
|
+
* { state: disconnected } release the connection it holds
|
|
16606
|
+
*
|
|
16596
16607
|
* OPTIONAL, PERMANENTLY. Every manifest written before this field
|
|
16597
16608
|
* existed omits it, and absence has to keep meaning "leave the
|
|
16598
16609
|
* connections alone" — otherwise re-applying an unchanged file would
|
|
16599
|
-
* release a binding somebody made in the portal.
|
|
16610
|
+
* release a binding somebody made in the portal. A release is
|
|
16611
|
+
* therefore never inferred from a missing key; it is stated.
|
|
16600
16612
|
*
|
|
16601
16613
|
* The keys the platform will ACCEPT here are narrower than the shape:
|
|
16602
16614
|
* only a dependency whose interface the registry calls
|
|
@@ -19227,6 +19239,18 @@ function printPlan(plan, json) {
|
|
|
19227
19239
|
}
|
|
19228
19240
|
}
|
|
19229
19241
|
}
|
|
19242
|
+
const disconnects = plan.dependencyDisconnects ?? [];
|
|
19243
|
+
if (disconnects.length > 0) {
|
|
19244
|
+
lines.push(" connections to disconnect:");
|
|
19245
|
+
for (const disconnect of disconnects) {
|
|
19246
|
+
lines.push(` ${disconnect.dependencyKey}`);
|
|
19247
|
+
if (disconnect.interfaceId !== void 0) {
|
|
19248
|
+
lines.push(
|
|
19249
|
+
` interface: ${disconnect.interfaceId}${disconnect.interfaceVersion ? `/${disconnect.interfaceVersion}` : ""}`
|
|
19250
|
+
);
|
|
19251
|
+
}
|
|
19252
|
+
}
|
|
19253
|
+
}
|
|
19230
19254
|
if ((plan.secretsToWrite ?? []).length > 0) {
|
|
19231
19255
|
lines.push(` secrets to set: ${plan.secretsToWrite.join(", ")}`);
|
|
19232
19256
|
for (const line of secretWriteConsequence(plan)) lines.push(` ${line}`);
|