Closed piyush94 closed 3 years ago
Yes, but you need to have a procedure to convert from a credentials object to a regular variable. This example is getting the credential name from the environment attributes. The attribute dictionary name is 'creds'. The key would be something like 'helm' and the value is the name of the credential object. The getcredential() call is what retrieves the credential from the database. From there you have access to the username and password. The set -g places the myusername and mypassword as global variables so they can be used anywhere in the deployment process.
set creds = ${environment.attributes['creds']};
set credname = ${creds['helm']};
set c = getcredential($credname);
set -g myusername = ${c.username};
set -g mypassword = ${c.password};
@sbtaylor15 Thanks. I'll give this a try.
Is it possible to pass a credential object values as an attribute for a non-helm deployment? I know the attributes are passed as environment variables to the host.