Octopus.Client.Exceptions.OctopusValidationException: There was a problem with your request. - Please add a variable expression for your variable run condition

Hello there I am using the octopus api to create a project and deployment steps programmatically using C#. This was all working but recently stopped working.
The failure occurs when setting a conditional variable expression e.g below. The error message is Octopus.Client.Exceptions.OctopusValidationException: There was a problem with your request. - Please add a variable expression for your variable run condition.
The previous step to this uses a step template with a bash script that writes the output variable TerraformChanges . I am creating both steps programmatically and there seems to be a problem evaluating the conditional expression which was working for the past few months without any issues. Can you please help?

public static Step ManualIntervention = new Step
{
Name = “Manual Intervention”,
Template = null,
Properties = new Dictionary<string, string>
{
[StepProperties.TargetRoles] = OctopusConstants.TargetRoleId,
[StepProperties.ConditionVariableExpression] = $"#{{Octopus.Action[{TerraformPlan.Name}].Output.TerraformChanges}}"
},
Action = new StepAction()
{
Name = “Manual Intervention”,
ActionType = “Octopus.Manual”,
Properties = new Dictionary<string, string>
{
[ActionProperties.ManualBlockConcurrentDeployments] = “false”,
[ActionProperties.ManualInstructions] =
“There are terraform changes, are you happy to proceed?\n\n\n" + $"#{{Octopus.Action[{TerraformPlan.Name}].Output.Plan}}\n
},
Environments = Environments.ProtectedByManualIntervention
}

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.