I’m using automation api for dotnet. Is there any ...
# automation-api
c
I’m using automation api for dotnet. Is there any way to actually set a secret value? If you use
StackSettingsConfigValue
with
isSecure = true
, it copies the value directly into the stack yaml without encrypting it first, and then chokes when trying to decrypt it during preview/apply.
e
You'll need to use the
SetConfigAsync
method on the
Workspace
. The yaml serialisation/deserialisation is just for raw manipulation of the yaml config files, it doesn't have access to the secret encryption in the engine.
c
Thanks! I was creating a workspace using LocalWorkspace.CreateAsync, and passing the config values into LocalWorkspaceOptions.StackSettings. It’s not very clear that this is a semantically different operation than SetConfigAsync.
e
Yeh, I think something we'd relook at if doing an automation api V2