Skip to main content
Version: main 🚧

Retrieve Stack Instance Outputs

Retrieve the outputs a StackTemplate publishes for a StackInstance. Reading this subresource requires separate get permission on stackinstances/outputs. See Stack permissions and What are Stacks for the output-capture concept.

StackInstanceOutputs example​

An example StackInstanceOutputs:

apiVersion: management.loft.sh/v1
kind: StackInstanceOutputs
metadata:
name: example-platform
namespace: p-my-project
outputs:
- name: databaseAddress
sensitive: false
state: Available
task: database
value: 10.0.0.12

StackInstanceOutputs reference​

outputs object[] ​

Outputs are the stack's published outputs, in the order publishedOutputs declares them. Task outputs the stack does not publish are not listed here.

name required string ​

Name is the public name the stack publishes the value under.

task required string ​

Task is the task that produced the value.

sensitive required boolean ​

Sensitive reflects the output's declared source type, not its content: a value read via fromSecret is sensitive, one read via fromResource is not. To have a value treated as sensitive, read it from a Secret via fromSecret. Always serialized.

state required string ​

State reports whether the value can be read yet.

reason string ​

Reason is the cause of the state in one word. An Available output carries one only when its task failed after the value was captured, meaning the value served is the last good one.

message string ​

Message explains the reason in words. It names the task, the output or the failure behind it.

value string ​

Value is the captured value. It is set when State is Available, including when the captured value is an empty string.

StackInstanceOutputs (Get)​

Retrieve the published outputs of a StackInstance. Values captured from Secrets are marked sensitive.

Run the following command:

# Exchange example-platform in the url below with the name of the StackInstance
kubectl get --raw "/kubernetes/management/apis/management.loft.sh/v1/namespaces/p-my-project/stackinstances/example-platform/outputs"