github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/outputs/resource.md (about)

     1  ---
     2  title: resource
     3  type: output
     4  status: stable
     5  categories: ["Utility"]
     6  ---
     7  
     8  <!--
     9       THIS FILE IS AUTOGENERATED!
    10  
    11       To make changes please edit the contents of:
    12       lib/output/resource.go
    13  -->
    14  
    15  import Tabs from '@theme/Tabs';
    16  import TabItem from '@theme/TabItem';
    17  
    18  
    19  Resource is an output type that runs a resource output by its name.
    20  
    21  ```yaml
    22  # Config fields, showing default values
    23  output:
    24    resource: ""
    25  ```
    26  
    27  This output allows you to reference the same configured output resource in multiple places, and can also tidy up large nested configs. For example, the config:
    28  
    29  ```yaml
    30  output:
    31    broker:
    32      pattern: fan_out
    33      outputs:
    34      - kafka:
    35          addresses: [ TODO ]
    36          topic: foo
    37      - gcp_pubsub:
    38          project: bar
    39          topic: baz
    40  ```
    41  
    42  Could also be expressed as:
    43  
    44  ``` yaml
    45  output:
    46    broker:
    47      pattern: fan_out
    48      outputs:
    49      - resource: foo
    50      - resource: bar
    51  
    52  output_resources:
    53    - label: foo
    54      kafka:
    55        addresses: [ TODO ]
    56        topic: foo
    57  
    58    - label: bar
    59      gcp_pubsub:
    60        project: bar
    61        topic: baz
    62   ```
    63  
    64  You can find out more about resources [in this document.](/docs/configuration/resources)
    65  
    66