Can I somehow use outputs of a one garden project ...
# 🤖|ask-kapa
f
@microscopic-river-74022 Can I somehow use outputs of a one garden project as inputs for another garden project?
m
Please stand by @fresh-angle-76971 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- Yes, you can use the outputs of one Garden project as inputs for another Garden project. This is part of the planned and partially implemented "project dependencies" feature in Garden. The intended workflow is as follows: - You declare a dependency on another project in your parent project's configuration, specifying the source (e.g., a Git repository or a relative path), environment, and any variables to pass as inputs. - The dependent (nested) project can define outputs using the
outputs
key in its project configuration. These outputs can reference action outputs, provider outputs, or runtime outputs. - In the parent project, you can reference these outputs using template strings like
${projects.some-project.outputs.<key>}
. This allows you to pass values from the nested project as inputs or use them elsewhere in your configuration. Here’s a simplified example from the design discussions: Parent project configuration:
Copy code
yaml
kind: Project
name: my-project
dependencies:
  - name: some-project
    source: "<https://github.com/org/some-project#stable">
    environment: dev
    variables:
      username: "${local.username}"
Nested project configuration:
Copy code
yaml
kind: Project
name: some-project
outputs:
  - name: auth-service-url
    description: The URL of the auth service
    value: "${services.auth.outputs.ingress-url}"
You can then reference the output in the parent project as
${projects.some-project.outputs.auth-service-url}
.
This approach is similar to how Terraform stack outputs work and is designed to make cross-project integration straightforward and robust. Note that this feature is under active development, and some aspects may still be evolving, but the mechanism for exporting and consuming project outputs is a core part of the design and partially available in current versions of Garden[Project dependencies discussion](), [Project outputs reference](). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
f
@microscopic-river-74022 is there currently a way to use kubeconfig and context from a Pulumi deploy action outputs in a Helm deploy action?
m
Let me check the knowledge base for you again. One moment! :books:
---------------------- I'm sorry, but the knowledge sources do not contain explicit information about using the kubeconfig or context from a Pulumi deploy action's outputs as inputs for a Helm deploy action in Garden. While the documentation describes how to reference outputs from Pulumi deploy actions in other actions (e.g., via
${actions.deploy.pulumi-deploy-action-name.outputs.<key>}
), it does not specify that kubeconfig or context are available as outputs, nor does it provide an example of passing these specific values to a Helm deploy action. Therefore, I cannot confirm that this is currently supported based on the available documentation sources [Docs-edge Pulumi integration](). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
f
@microscopic-river-74022 Let's say the kubeconfig and context are outputs of a Pulumi deploy action. Can I use those in a Helm deploy action configuration?
m
Let me check the knowledge base for you again. One moment! :books:
---------------------- If the kubeconfig and context are exposed as outputs of a Pulumi deploy action, you can reference those outputs in a Helm deploy action configuration using Garden's templating system. You would use template strings like
${actions.deploy.<pulumi-action-name>.outputs.kubeconfig}
and
${actions.deploy.<pulumi-action-name>.outputs.context}
in your Helm deploy action. However, the knowledge sources do not provide a concrete example or explicitly confirm that Helm deploy actions can consume kubeconfig and context in this way, nor do they specify if these particular outputs are supported or how to wire them into the Helm action's configuration. The documentation does confirm that outputs from Pulumi deploy actions can be referenced in other actions, but it does not detail this specific use case or the required configuration fields for Helm actions to accept a kubeconfig or context from another action's outputs [Docs-edge Pulumi integration](). In summary: If your Pulumi deploy action exposes kubeconfig and context as outputs, you can reference them in other actions using Garden's templating, but the documentation does not explicitly confirm or provide an example for this specific scenario. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted