Manage logical groups
Available from version 26.3: This topic describes how to manage logical groups with the Connect Pulumi plugin with Python and YAML.
The LogicalGroupResource resource
The LogicalGroupResource allows you to manage Connect logical groups using infrastructure as code. Logical groups let you control concurrency settings for synchronizations, iterations, and initializations.
Resource type: mfcpulumiprovider:index:LogicalGroupResource
Required Inputs
| Property | Type | Description |
|---|---|---|
name
|
string | The display name of the logical group. |
logicalGroupProperties
|
object | Concurrency settings for the group. |
Logical Group Properties Object
| Field | Type | Description |
|---|---|---|
maximumConcurrentSynchronizations
|
integer | Maximum number of synchronizations that can run at once. |
maximumConcurrentIterations
|
integer | Maximum number of iterations that can run at once. |
maximumConcurrentInitializations
|
integer | Maximum number of initializations that can run at once. |
Python example: Logical groups
This section provides a Python example for managing logical groups.
import pulumi
import pulumi_mfcpulumiprovider as mfcpulumiprovider
my_logical_group = mfcpulumiprovider.LogicalGroupResource(
"myLogicalGroup",
name="my-logical-group",
logical_group_properties=mfcpulumiprovider.LogicalGroupPropertiesArgs(
maximum_concurrent_synchronizations=5,
maximum_concurrent_iterations=10,
maximum_concurrent_initializations=3,
),
)
YAML example: Logical groups
This section provides a YAML example for managing logical groups.
name: pulumiConnect
description: Minimal Pulumi YAML program for mfcpulumiprovider
runtime: yaml
resources:
myLogicalGroup:
type: mfcpulumiprovider:index:LogicalGroupResource
properties:
name: my-logical-group
logicalGroupProperties:
maximumConcurrentSynchronizations: 5
maximumConcurrentIterations: 10
maximumConcurrentInitializations: 3
outputs: {}
Importing existing logical groups
If you have existing logical groups in Connect that you want to bring under Pulumi state management, use the following script to generate an import file.
The script fetches all logical groups from Connect and generates a pulumi-import-all.json file for use with the pulumi import command.
Temporarily, place the contents of the following script into your __main__.py file. After the import is complete, remove or comment out the script to prevent it from running on every pulumi up command.
import json
from pulumi_mfcpulumiprovider import get_all_logical_groups
result = get_all_logical_groups()
resources = []
for lg in result.logical_groups:
resource_name = f"imported-logical-group-{lg.name}".replace(" ", "-").lower()
resources.append({
"type": "mfcpulumiprovider:index:LogicalGroupResource",
"name": resource_name,
"id": lg.connect_id
})
with open("pulumi-import-all.json", "w") as f:
json.dump({"resources": resources}, f, indent=2)
print(f"Generated import file with {len(resources)} resources")
print("Run: pulumi import -f pulumi-import-all.json")
After generating pulumi-import-all.json, run: pulumi import -f pulumi-import-all.json

