logoCloudomation Docs

    Connection Resource


    The Connection resource lets you store pre-configured inputs for a Task. This is commonly used to store connection information to a remote system. Connections can also be associated with a Vault secret. You can use stored connections in flows to connect to remote systems with more comfort.

    Simple example

    Create a connection for the GIT task type and call it "library". Enter the following into the value field:

    ref: develop
    command: metadata
    repository_url: ''

    The configuration must be a valid YAML document: It is also possible to enter a JSON config, since YAML is a superset of JSON.

    Next, create a new flow to use the connection and call it "connection-test". Use the following script:

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    metadata = this.connect('library').get('output_value')
    return this.success('all done')

    Override inputs

    You can override inputs which are stored in the connection by specifying different values when using the connection. Let's modify the "connection-test" flow from before to read information for a different ref:

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    metadata = this.connect('library', ref='v2').get('output_value')
    return this.success('all done')

    Attach Vault Secrets

    To be able to attach secrets to a connection object, a working vault integration must be configured beforehand.

    Please refer to Vault Integration for details.

    Order of Input Application

    Inputs for a task execution can be specified in different places. Inputs from all places are merged into one combined input set before being used by the task. Inputs are applied in the following order:

    1. Value of the connection
    2. Vault secrets associated with the connection
    3. Inputs specified in the flow script

    Inputs which are applied later can override keys of inputs which were applied before. If, for example, the connection specifies a key port and the vault secret also contains a key port, the value of the vault secret will be used.

    Learn more

    Tasks reference
    Git Integration
    Vault Integration
    Knowledge Base — Previous
    Next — Knowledge Base
    Development and Productive Mode