Configuration - Encrypt Section Step Template

I am trying to use the Configuration - Encrypt Section step template. I have given the step a name of ‘Encrypt Configuration Section’. However, I can’t seem to get the ‘Website directory’ field set correctly. I have tried all of the following values:

#{Octopus.Action[Encrypt Configuration Section].Output.Package.InstallationDirectoryPath}
#{Octopus.Action['Encrypt Configuration Section'].Output.Package.InstallationDirectoryPath}
#{Octopus.Action["Encrypt Configuration Section"].Output.Package.InstallationDirectoryPath}

This is the error I receive:

The directory #{Octopus.Action["Encrypt Configuration Section"].Output.Package.InstallationDirectoryPath} must exist
At C:\Octopus\Work\20160115155407-197\Script.ps1:22 char:3
+         throw $message
+         ~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (The directory #...ath} must exist:String) [], RuntimeException
    + FullyQualifiedErrorId : The directory #{Octopus.Action["Encrypt Configuration Section"].Output.Package.InstallationDirectoryPath} must exist

Hi
I Can’t see anything obviously wrong with your provided values. Can you please send through a screenshot of how you have it configured. Perhaps could you also try to just print to output this particular variable to make sure it is actually accessible.
Thanks for the extra information,
Robert

I’ve attached the screenshot.

Hi,
You appear to have an extra square bracket at the start of the variable. Could you take that out and try again? If not then perhaps could you also try to just print to output this particular variable to make sure it is actually accessible.
Cheers
Rob

Sorry, I was messing with it and appear to have added a type. Removing the additional square bracket still results in the error:

The directory #{Octopus.Action[Encrypt Configuration Section].Output.Package.InstallationDirectoryPath} must exist.

Hi
Perhaps could you also try to just print to output this particular variable in a script step to make sure it is actually accessible.
Cheers
Rob

I’ve enabled variable debugging using the OctopusPrintEvaluatedVariables and OctopusPrintVariables variables but the #{Octopus.Action[Encrypt Configuration Error Section].Output.Package.InstallationDirectoryPath} does not show up in the raw deployment output.

I also tried creating a new Test variable with a value of #{Octopus.Action[Encrypt Configuration Error Section].Output.Package.InstallationDirectoryPath} and this is what it outputs in the raw deployment output:

11:03:30   Verbose  |         [Test] = '#{Octopus.Action[Encrypt Configuration Error Section].Output.Package.InstallationDirectoryPath}'

So the above variable is definitely not being resolved correctly. Any ideas?

I’ve resolved the issue, I had to use the step name which was doing the actual NuGet deployment. This should be made more clear in the description of the parameter.