able-lizard-25378
04/08/2025, 4:28 PMSystem.InvalidOperationException: Operation is not valid due to the current state of the object.
exception.
I can pass the output<string> value to any of the Input<strings> as expected. I can hardcode the InputMap<string> values without issue.
Example:
//Entra App registration, outputs a ClientId
var appRegistration = new AzureAd.Application("testApp", new()
{
DisplayName = $"test-app",
Description = "testapp",
SignInAudience = "AzureADMyOrg",
IdentifierUris = new[]
{
"<api://testapp>"
}
}
var customComponent = new CustomComponent("testcustom", new()
{
Name = appRegistration.ClientId //This works
EnvironmentVariables = new InputMap<string>()
{
{ "EntraId__ClientId", appRegistration.ClientId } //this throws the error.
}
}
//I've also tried this to no success
var customComponent = new CustomComponent("testcustom", new()
{
Name = appRegistration.ClientId //This works
EnvironmentVariables = new InputMap<string>()
{
{ "EntraId__ClientId", appRegistration.ClientId.Apply(val => val) } //this throws the error.
}
}
//And this
var clientIdDict = appRegistration.ClientId.Apply(clientId =>
{
return new Dictionary<string, string>()
{
{"EntraId__ClientId", clientId}
};
});
var customComponent = new CustomComponent("testcustom", new()
{
Name = appRegistration.ClientId //This works
EnvironmentVariables = clientIdDict //This doesn't work
}
echoing-dinner-19531
04/08/2025, 8:11 PMechoing-dinner-19531
04/13/2025, 6:57 PMCustomComponent
doing with the EnvironmentVariables property? I can't repro an InvalidOperationException with just doing basic things with InputMap.