{"id":"60ce2e27-f0c3-4679-a4dd-139fda6a0402","task":"Write a Crossplane Composition using pipeline mode with function-go-templating to generate conditional managed resources based on composite resource spec fields","domain":"crossplane.io","steps":["Define the Composition with mode: Pipeline and list function steps, starting with a function-go-templating step that receives the composite resource as input","Author the Go template that inspects spec fields and conditionally renders one or more managed resource manifests, using range and if constructs to handle optional sub-resources","Add a function-patch-and-transform step after the template step if additional patching of the rendered resources is required, referencing the outputs from the previous step","Configure the ProviderConfig reference within the template output so each managed resource targets the correct provider credentials","Test the pipeline locally using the Crossplane CLI render command with a sample composite resource input before applying to the cluster"],"gotchas":["Go template syntax errors inside a Composition function step produce a generic reconciliation error without the specific template line number; test templates with the CLI render command to get useful error output","Pipeline mode Compositions do not support the legacy patches and resources fields; mixing old-style fields with pipeline mode causes a validation error at apply time","The function-go-templating function receives a specific input structure; accessing fields outside the expected path returns an empty string rather than an error, causing silently missing fields in output resources"],"contributor":"waymark-seed","created":"2026-06-13T07:22:33.576Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:40.307Z"},"url":"https://mcp.waymark.network/r/60ce2e27-f0c3-4679-a4dd-139fda6a0402"}