Manage data sources

This topic describes how to manage data sources with the Connect Pulumi plugin with Python and YAML.

The DatasourceResource resource

The DatasourceResource resource allows you to manage Connect data source configurations using infrastructure as code.

Resource type: mfcpulumiprovider:index:DatasourceResource

Required Properties

Property Type Description
connectName string The display name of the datasource in Connect.
product string The product type (connector name) of the datasource (e.g.,Micro Focus ALM).
datasourceProperties map (string - string) Non-secret connection properties (e.g., server address, port, project).
secretDatasourceProperties map (string - string) Secret connection properties (e.g., passwords). These are stored securely.

Note:The required keys for datasourceProperties and secretDatasourceProperties vary by connector. For the full list of required and optional properties for each connector, refer to the Readme of the corresponding connector. For details, see Connector Readmes.

Python example: data sources

This section provides a Python example for managing data sources.

Copy code
import pulumi 
import pulumi_mfcpulumiprovider as mfcpulumiprovider

datasource = mfcpulumiprovider.DatasourceResource(
    "myDatasource",
    connect_name="aqm-ds",
    product="Micro Focus ALM",
    datasource_properties={
        "COMMENTS_SINCE_DATE": "",
        "Default Project": "<project>",
        "Domain": "DEFAULT",
        "HTTPTimeout": "300000",
        "Inject Comment Header Into Comment Text": "false",
        "Port": "8080",
        "Protocol": "http",
        "Server": "<server>",
        "Skip locking": "false",
        "userName": "<username>",     
    },     
    secret_datasource_properties={ 
        "password": "<password>",
    }
) 

YAML example: data sources

This section provides a YAML example for managing data sources.

Copy code
name: pulumiConnect 
description: Minimal Pulumi YAML program for mfcpulumiprovider 
runtime: yaml 
resources:
    myDatasource:
        type: mfcpulumiprovider:index:DatasourceResource
        properties:
            connectName: aqm-ds
            product: Micro Focus ALM
            datasourceProperties:
                Default Project: <project>
                Domain: DEFAULT
                Port: "8080"
                Protocol: http
                Server: <server>
                userName: <username>
            secretDatasourceProperties:
                password: <password>
outputs: { } 

For onboarding and importing existing resources into Pulumi state, see Pulumi onboarding.

See also