components icon indicating copy to clipboard operation
components copied to clipboard

Improve documentation for accessing output variables from other components

Open hypexr opened this issue 4 years ago • 0 comments

Description

The documentation shows this for accessing the output variables from a different component in the same org:

${output:[app]:[stage]:[instance name].[output]}

With example input like:

inputs:
  roleArn: ${output:[STAGE]:[APP]:[INSTANCE].arn} # Fetches an output from another component instance that is already deployed

The pre example text shows the wrong order (should be stage, app, instance).

The terminstance is also a little confusing since you need to use the components name there (unless I'm missing something).

The example should show something like roleArn: ${output:dev:my-api:my-lambda.arn} instead of ${output:[STAGE]:[APP]:[INSTANCE].arn}

I noticed that ${output:[component name / instance].output} works, but I haven't deployed to multiple stages (or apps) and I imagine it doesn't work once there are multiple stages. Maybe it's worth noting something here about how you reference other components?

hypexr avatar Jun 10 '20 20:06 hypexr