Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b5bf216
Add sample Temporal integration for Aspire
cecilphillip Feb 21, 2026
d89d4bc
Update src/AspireIntegrations/TemporalioSamples.SampleAppHost/AppHost.cs
cecilphillip Feb 23, 2026
ff59b4f
Rename Temporal local test server
cecilphillip Feb 23, 2026
b45ba00
Merge remote-tracking branch 'origin/cp-aspire' into cp-aspire
cecilphillip Feb 23, 2026
cae22a7
Merge branch 'main' into cp-aspire
cecilphillip Jun 16, 2026
12a9874
build: align Aspire integration projects and package/version baselines
cecilphillip Jun 16, 2026
ff4cabc
fix: stabilize Temporal resource options and health-check behavior
cecilphillip Jun 16, 2026
344ac89
refactor: consolidate Aspire integration extension helpers
cecilphillip Jun 16, 2026
fde2522
fix README method names, update Prerequisites with links and net8 ver…
cecilphillip Jun 17, 2026
25dab66
inject TEMPORAL_NAMESPACE and TEMPORAL_DEFAULT_NAMESPACE via WithRefe…
cecilphillip Jun 17, 2026
1c0a34f
chore: bump Aspire SDK to 13.4.4, Microsoft.Extensions.* to 10.0.8; a…
cecilphillip Jun 17, 2026
37d7c6e
fix: Aspire integration startup race, unhealthy health checks, and mi…
cecilphillip Jun 17, 2026
b0a250c
replace .aspire/settings.json file with aspire.config.json
cecilphillip Jun 17, 2026
bba7770
fix: align CLI/container endpoints, add test seam for CLI availabilit…
cecilphillip Jun 17, 2026
7f23e39
Fix code review feedback: casting, version override, spacing, and README
cecilphillip Jun 17, 2026
fe60f45
docs: Add Advanced Configuration section to CLI-based setup in README
cecilphillip Jun 17, 2026
a49a80f
docs: add more XML doc strings
cecilphillip Jun 17, 2026
17b2151
docs: Add comprehensive XML documentation to Aspire hosting library
cecilphillip Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<PackageVersion Include="coverlet.collector" Version="3.1.2" />
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.7.1" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.26" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.8" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48" />
<PackageVersion Include="NexusRpc" Version="0.3.0" />
Expand All @@ -21,6 +21,7 @@
<PackageVersion Include="Temporalio.Extensions.DiagnosticSource" Version="1.15.0" />
<PackageVersion Include="Temporalio.Extensions.Hosting" Version="1.15.0" />
<PackageVersion Include="Temporalio.Extensions.OpenTelemetry" Version="1.15.0" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="13.4.4" Condition="'$(MSBuildProjectName)' != 'TemporalioSamples.SampleAppHost'" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.console" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.4" />
Expand Down
77 changes: 77 additions & 0 deletions TemporalioSamples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TemporalioSamples.NexusCanc
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NexusCancellation", "NexusCancellation", "{7123C63D-3158-4C9A-8EAD-6D4F1295BC04}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TemporalioSamples.SampleWorkflow", "src\AspireIntegrations\TemporalioSamples.SampleWorkflow\TemporalioSamples.SampleWorkflow.csproj", "{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspireIntegrations", "AspireIntegrations", "{8781BE47-D710-408E-B143-4D5E20C356E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TemporalioSamples.SampleWorker", "src\AspireIntegrations\TemporalioSamples.SampleWorker\TemporalioSamples.SampleWorker.csproj", "{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TemporalioSamples.SampleClient", "src\AspireIntegrations\TemporalioSamples.SampleClient\TemporalioSamples.SampleClient.csproj", "{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TemporalioSamples.SampleAppHost", "src\AspireIntegrations\TemporalioSamples.SampleAppHost\TemporalioSamples.SampleAppHost.csproj", "{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Temporal.Extensions.Aspire.Hosting", "src\AspireIntegrations\Temporal.Extensions.Aspire.Hosting\Temporal.Extensions.Aspire.Hosting.csproj", "{89D196AD-A6CE-42FB-BF46-C80BF579FE20}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StandaloneActivity", "StandaloneActivity", "{EAB0C45A-7620-D2D2-2901-5E7FCBFFDA77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TemporalioSamples.StandaloneActivity", "src\StandaloneActivity\TemporalioSamples.StandaloneActivity.csproj", "{240517A1-13B5-4A67-8519-BFCF2C4591B9}"
Expand Down Expand Up @@ -639,6 +650,66 @@ Global
{6D0BE4C4-9C4F-4A3D-78F1-B0B761568559}.Release|x64.Build.0 = Release|Any CPU
{6D0BE4C4-9C4F-4A3D-78F1-B0B761568559}.Release|x86.ActiveCfg = Release|Any CPU
{6D0BE4C4-9C4F-4A3D-78F1-B0B761568559}.Release|x86.Build.0 = Release|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Debug|x64.ActiveCfg = Debug|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Debug|x64.Build.0 = Debug|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Debug|x86.ActiveCfg = Debug|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Debug|x86.Build.0 = Debug|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Release|Any CPU.Build.0 = Release|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Release|x64.ActiveCfg = Release|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Release|x64.Build.0 = Release|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Release|x86.ActiveCfg = Release|Any CPU
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9}.Release|x86.Build.0 = Release|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Debug|x64.ActiveCfg = Debug|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Debug|x64.Build.0 = Debug|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Debug|x86.ActiveCfg = Debug|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Debug|x86.Build.0 = Debug|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Release|Any CPU.Build.0 = Release|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Release|x64.ActiveCfg = Release|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Release|x64.Build.0 = Release|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Release|x86.ActiveCfg = Release|Any CPU
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398}.Release|x86.Build.0 = Release|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Debug|x64.ActiveCfg = Debug|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Debug|x64.Build.0 = Debug|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Debug|x86.ActiveCfg = Debug|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Debug|x86.Build.0 = Debug|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Release|Any CPU.Build.0 = Release|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Release|x64.ActiveCfg = Release|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Release|x64.Build.0 = Release|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Release|x86.ActiveCfg = Release|Any CPU
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8}.Release|x86.Build.0 = Release|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Debug|x64.ActiveCfg = Debug|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Debug|x64.Build.0 = Debug|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Debug|x86.ActiveCfg = Debug|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Debug|x86.Build.0 = Debug|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Release|Any CPU.Build.0 = Release|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Release|x64.ActiveCfg = Release|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Release|x64.Build.0 = Release|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Release|x86.ActiveCfg = Release|Any CPU
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E}.Release|x86.Build.0 = Release|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Debug|x64.ActiveCfg = Debug|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Debug|x64.Build.0 = Debug|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Debug|x86.ActiveCfg = Debug|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Debug|x86.Build.0 = Debug|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Release|Any CPU.Build.0 = Release|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Release|x64.ActiveCfg = Release|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Release|x64.Build.0 = Release|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Release|x86.ActiveCfg = Release|Any CPU
{89D196AD-A6CE-42FB-BF46-C80BF579FE20}.Release|x86.Build.0 = Release|Any CPU
{240517A1-13B5-4A67-8519-BFCF2C4591B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{240517A1-13B5-4A67-8519-BFCF2C4591B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{240517A1-13B5-4A67-8519-BFCF2C4591B9}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -716,6 +787,12 @@ Global
{AF077751-E4B9-4696-93CB-74653F0BB6C4} = {1A647B41-53D0-4638-AE5A-6630BAAE45FC}
{6D0BE4C4-9C4F-4A3D-78F1-B0B761568559} = {7123C63D-3158-4C9A-8EAD-6D4F1295BC04}
{7123C63D-3158-4C9A-8EAD-6D4F1295BC04} = {1A647B41-53D0-4638-AE5A-6630BAAE45FC}
{8781BE47-D710-408E-B143-4D5E20C356E2} = {1A647B41-53D0-4638-AE5A-6630BAAE45FC}
{6BA6C609-6D33-425B-883F-88ECE2E3DDB9} = {8781BE47-D710-408E-B143-4D5E20C356E2}
{FF13AD0E-4F24-4044-B8AD-5A57EF3AE398} = {8781BE47-D710-408E-B143-4D5E20C356E2}
{035FF43C-D9C8-4CCE-A35A-E4ABF6F842C8} = {8781BE47-D710-408E-B143-4D5E20C356E2}
{CA136E75-FC34-44E1-B8B2-6E33D8AF520E} = {8781BE47-D710-408E-B143-4D5E20C356E2}
{89D196AD-A6CE-42FB-BF46-C80BF579FE20} = {8781BE47-D710-408E-B143-4D5E20C356E2}
{EAB0C45A-7620-D2D2-2901-5E7FCBFFDA77} = {1A647B41-53D0-4638-AE5A-6630BAAE45FC}
{240517A1-13B5-4A67-8519-BFCF2C4591B9} = {EAB0C45A-7620-D2D2-2901-5E7FCBFFDA77}
{5D493692-53AB-4FAA-BA4D-33B1E54E9A48} = {1A647B41-53D0-4638-AE5A-6630BAAE45FC}
Expand Down
277 changes: 277 additions & 0 deletions src/AspireIntegrations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
# Temporal Extensions for .NET Aspire

## Overview

This project provides custom Aspire resource definitions that enable developers to integrate Temporal workflow servers into their Aspire applications with minimal configuration. It supports three deployment models:

- **Local Testing** - Temporal server using `Temporalio.Testing.WorkflowEnvironment` for fast local development and testing
- **Container-based** - Docker container running the official Temporal server image for development and staging environments
- **CLI-based** - Temporal CLI server for environments where Docker isn't available

### Key Features

- ✅ **Service Discovery** - Automatic environment variable injection for dependent services
- ✅ **Health Checks** - Built-in health checks integrated into Aspire's health pipeline
- ✅ **Resource Management** - Start/Stop commands in the Aspire dashboard with proper state management

## Prerequisites

### Required
Comment thread
cecilphillip marked this conversation as resolved.
- **[.NET SDK](https://dot.net)** 8.0 or later
- **[Aspire tooling](https://learn.microsoft.com/dotnet/aspire/fundamentals/setup-tooling)** 13.0 or later

### For Container-based Setup
- **Docker** - Required to run the Temporal container
- **Docker image** - `temporalio/temporal:latest` (automatically pulled)

### For CLI-based Setup
- **Temporal CLI** - Install via [Temporal CLI documentation](https://docs.temporal.io/cli/install)

## Running the Project

Using the Aspire CLI

1. **Navigate to the AppHost project directory:**
```bash
cd src/AspireIntegrations/
```

2. **Run the project using the Aspire CLI:**
```bash
aspire run
```

> You can also run the project directly with `dotnet run` from the AppHost directory, or use your IDE's run configuration.

## Setup Options

### Local Server

The local server setup uses a Temporal environment for fast testing without external dependencies. It will download and run the necessary Temporal server binaries.

**AppHost.cs:**
```csharp
using Temporal.Extensions.Aspire.Hosting;

var builder = DistributedApplication.CreateBuilder(args);

// Add Temporal local server
var temporal = builder.AddTemporalLocalDevServer();

// Add a worker project that depends on Temporal
builder.AddProject<Projects.TemporalioSamples_SampleWorker>("worker")
.WaitFor(temporal)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do this automatically for them in the .WithReference calls?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's an Apsire pattern that I've wondered about in general. It should be fine

Comment thread
Copilot marked this conversation as resolved.
.WithReference(temporal);

builder.Build().Run();
Comment thread
cecilphillip marked this conversation as resolved.
```

**Advanced Configuration:**
```csharp
var temporal = builder.AddTemporalLocalDevServer(configure: options =>
{
// Port configuration
options.UIPort = 8233; // Web UI port
options.MetricsPort = 9233; // Metrics endpoint port

// Network binding
options.TargetHost = "0.0.0.0:7233";

// Namespace configuration
options.Namespace = "default";
options.AdditionalNamespaces = ["orders", "analytics"];

// Use existing Temporal server binary
options.DevServerOptions.ExistingPath = "/usr/local/bin/temporal";

// UI configuration
options.UI = true;

// Search attributes for custom workflows
options.SearchAttributes = new[]
{
new SearchAttribute { Name = "Environment", ValueType = "Text" },
new SearchAttribute { Name = "UserId", ValueType = "Text" },
new SearchAttribute { Name = "ProcessingTime", ValueType = "Int" }
};

// Dynamic configuration values
options.DynamicConfigValues = [
"persistence.cassandra.hosts = cassandra-host:9042"
];
Comment thread
cecilphillip marked this conversation as resolved.
});
```

> Use `ExistingPath` to leverage a pre-installed Temporal binary

---

### Container-based

Deploy Temporal using the CLI Docker container.

**AppHost.cs:**
```csharp
using Temporal.Extensions.Aspire.Hosting;

var builder = DistributedApplication.CreateBuilder(args);

// Add Temporal as a Docker container
var temporal = builder.AddTemporalDevContainer(
configure: options =>
{
options.ImageTag = "latest"; // Use specific version if needed
options.UI = true; // Enable Web UI
options.Namespace = "default";
});

// Add dependent projects that require Temporal
builder.AddProject<Projects.TemporalioSamples_SampleWorker>("worker")
.WaitFor(temporal)
Comment thread
Copilot marked this conversation as resolved.
.WithReference(temporal);

builder.Build().Run();
```

**Advanced Configuration:**
```csharp
var temporal = builder.AddTemporalDevContainer(configure: options =>
{
// Network configuration
options.TargetHost = "127.0.0.1:7233";

// Namespaces
options.AdditionalNamespaces = ["default", "custom-ns"];

// Logging
options.DevServerOptions.LogLevel = "info";
options.DevServerOptions.LogFormat = "json";

// Search attributes for custom workflows
options.SearchAttributes = new[]
{
new SearchAttribute { Name = "CustomField", ValueType = "Text" },
new SearchAttribute { Name = "CustomInt", ValueType = "Int" }
};
});
```
---

### CLI-based

Use the Temporal CLI server for environments without Docker.

**AppHost.cs:**
```csharp
using Temporal.Extensions.Aspire.Hosting;

var builder = DistributedApplication.CreateBuilder(args);

// Add Temporal CLI server
var temporal = builder.AddTemporalCliServer(
configure: options =>
{
options.Namespace = "default";
options.UI = true;
});

// Add dependent projects that require Temporal
builder.AddProject<Projects.TemporalioSamples_SampleWorker>("worker")
.WaitFor(temporal)
Comment thread
Copilot marked this conversation as resolved.
.WithReference(temporal);

builder.Build().Run();
```

**Advanced Configuration:**
```csharp
var temporal = builder.AddTemporalCliServer(configure: options =>
{
// Port configuration
options.UIPort = 8233; // Web UI port
options.MetricsPort = 9233; // Metrics endpoint port

// Network binding
options.TargetHost = "0.0.0.0:7233";

// Namespace configuration
options.Namespace = "default";
options.AdditionalNamespaces = ["orders", "analytics"];

// UI configuration
options.UI = true;

// Search attributes for custom workflows
options.SearchAttributes = new[]
{
new SearchAttribute { Name = "Environment", ValueType = "Text" },
new SearchAttribute { Name = "UserId", ValueType = "Text" },
new SearchAttribute { Name = "ProcessingTime", ValueType = "Int" }
};

// Dynamic configuration values
options.DynamicConfigValues = [
"persistence.cassandra.hosts = cassandra-host:9042"
];
});
```

**Requirements:**
- Temporal CLI must be installed and available in PATH
- Run `temporal --version` to verify installation
---

### Connection Strings

Dependent projects receive the following environment variables automatically:

| Variable | Description |
|----------|-------------|
| `TEMPORAL_ADDRESS` | The gRPC server address (e.g., `localhost:7233` or container name:port) |
| `TEMPORAL_UI_ADDRESS` | The Web UI address (e.g., `http://localhost:8233`) |
| `TEMPORAL_NAMESPACE` | The namespace to use (matches the resource's configured namespace) |
| `TEMPORAL_CODEC_AUTH` | Optional codec authentication token (if configured) |
| `TEMPORAL_CODEC_ENDPOINT` | Optional codec server endpoint (if configured) |

**Example usage:**
```csharp
var temporalAddress = Environment.GetEnvironmentVariable("TEMPORAL_ADDRESS");
var temporalUiAddress = Environment.GetEnvironmentVariable("TEMPORAL_UI_ADDRESS");
var temporalNamespace = Environment.GetEnvironmentVariable("TEMPORAL_NAMESPACE") ?? "default";
```
---

## Configuration Options

### TemporalResourceOptions

The base configuration class for all resource types:

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `Namespace` | string | "default" | Primary namespace for workflows |
| `AdditionalNamespaces` | List<string> | ["default"] | Additional namespaces to register |
| `Port` | int | 7233 | gRPC service port |
| `UIPort` | int | 8233 | Web UI port |
| `MetricsPort` | int | 9233 | Metrics endpoint port |
| `UI` | bool | true | Enable Web UI |
| `TargetHost` | string | "0.0.0.0:7233" | Bind address (IP:port format) |
| `SearchAttributes` | List<SearchAttribute> | null | Custom search attributes |
| `DynamicConfigValues` | List<string> | [] | Dynamic configuration |
| `CodecEndpoint` | string | null | Codec server endpoint |
| `CodecAuth` | string | null | Codec authentication token |

### Container-specific Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `ImageTag` | string | "latest" | Docker image tag version |

---

## Resources

- [Temporal Documentation](https://docs.temporal.io/)
- [Temporal .NET SDK](https://github.com/temporalio/sdk-dotnet)
- [.NET Aspire](https://learn.microsoft.com/dotnet/aspire)
- [Aspire Integrations](https://learn.microsoft.com/dotnet/aspire/integrations)
Loading
Loading