@@ -272,62 +272,6 @@ spec:
272
272
# Removed for brevity
273
273
` ` `
274
274
275
- # ## Store connection details
276
-
277
- Some managed resources generate unique details like usernames, passwords, IP
278
- addresses, ports or other connection details.
279
-
280
- When resources inside a Composition create connection details Crossplane creates
281
- a Kubernetes secret object for each managed resource generating connection
282
- details.
283
-
284
- # ### Composed resource secrets
285
-
286
- Inside the `spec` of each resource producing connection details, define the
287
- ` writeConnectionSecretToRef` , with a `namespace` and `name` of the secret object
288
- for the resource.
289
-
290
- If a `writeConnectionSecretToRef` isn't defined, Crossplane doesn't write any
291
- keys to the secret.
292
-
293
- ` ` ` yaml {label="writeConnRes"}
294
- apiVersion: apiextensions.crossplane.io/v1
295
- kind: Composition
296
- spec:
297
- writeConnectionSecretsToNamespace: other-namespace
298
- mode: Pipeline
299
- pipeline:
300
- - step: patch-and-transform
301
- functionRef:
302
- name: function-patch-and-transform
303
- input:
304
- apiVersion: pt.fn.crossplane.io/v1beta1
305
- kind: Resources
306
- resources:
307
- - name: key
308
- base:
309
- apiVersion: iam.aws.upbound.io/v1beta1
310
- kind: AccessKey
311
- spec:
312
- forProvider:
313
- # Removed for brevity
314
- writeConnectionSecretToRef:
315
- namespace: docs
316
- name: key1
317
- ` ` `
318
-
319
- Crossplane saves a secret with the `name` in the `namespace` provided.
320
-
321
- ` ` ` shell {label="viewComposedSec"}
322
- kubectl get secrets -n docs
323
- NAME TYPE DATA AGE
324
- key1 connection.crossplane.io/v1alpha1 4 4m30s
325
- ` ` `
326
-
327
- {{<hint "tip" >}}
328
- Remember to create a unique name for each secret.
329
- {{< /hint >}}
330
-
331
275
# # Test a composition
332
276
333
277
You can preview the output of any composition using the Crossplane CLI. You
0 commit comments