Support complex objects as parameter types
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
I's trying to add some parameter into my AppHost as Json.
I have tried by adding parameter like documented [here](https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/external-parameters#secret-values).
Into ```Program.cs```:
```csharp
var pullingServiceParameter = builder.AddParameter("status-pulling-service-parameter");
```
And into ```appsettings.json```
```json
{
// Some other configuration stuffs
"Parameters": {
"status-pulling-service-parameter": {
"Status": [
{
"Kind": "SqlServer"
}
]
}
}
}
```
Then and adding it as environment reference:
```csharp
var pullingServiceResource = builder.AddProject<...>("status-pulling-service")
// Some other references
.WithEnvironment("parameter", pullingServiceParameter);
```
As expected the value is missing:

### Describe the solution you'd like
That's I wish is we to provide typed parameter like this:
```csharp
var pullingServiceParameter = builder.AddParameter(
name: "status-pulling-service-parameter",
value: new AwesomeType() {
// Some properties...
},
secret: true, /* It could be a secret */
persist: true /* It could be persisted */);
```
Or can be directly parsed like mechanism.
Contributor guide
Assessment
This issue has not been assessed yet.