Manage Credentials
You can execute these steps from the command-line and the web application: https://use.runops.io
You can add configs to a Connection in two ways: when creating the Connection, or updating it after it's created
Create a Connection with configs
Use the config
flag in the CLI when creating the Connection. Provide a JSON with the configs keys and values. The config name must follow the names defined for the connections list for them to become available in the execution.
We keep these secrets in a secure vault service. Our Secrets Manager system follow all the best practices. However, you also have the option to self-host this part so Runops systems never touch them, check out Agent Secrets if you need.
runops targets create \
--name 'my-target-with-configs' \
--type 'postgres' \
--config '{"PG_HOST":"127.0.0.1","PG_USER":"abc","PG_PASS":"123","PG_DB": "test"}'
Update or add configs to a Connections
The Runops CLI update command always adds the new values and only updates if they already exist. Adding configs to a Connection is exactly like creating a target with a config. You use the config
flag. Runops creates the new values, and update existing ones.
runops targets update \
--name 'my-target-with-configs' \
--config '{"PG_HOST":"127.0.0.1","PG_USER":"abc","PG_PASS":"123"}'
Test your Connection
Now that you added credentials to your Connection you can use it to access the resource you want. Let's create a Task using the Connection we just configured. Note that we used postgres
as the type, so we'll provide a SQL query in the script:
runops tasks create \
-t 'my-target-with-configs' \
-s 'select 1'
You have just learned the basics of Runops and ran your first script.