I am setting up my project to use Kubernetes. Best practice for Kuberentes is to not pass in sensitive variables as Environment Variables (into the container). To facilitate this, I plan to have my deployments create a Kubernetes Secret for my Octopus Variables that have the Octopus Deploy Type of “Sensitive”.
Is there a way, from my PowerShell script, that I can know if a variable is “Sensitive”?
I tried this, but it just returned an empty string:
Write-Output "Variable Type: $($OctopusParameters["SecretVariable"].Type)"