diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a4a438..ee0f141 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@ CHANGELOG
 - Add implicit and explicit caching (#102 / #103)
 - Add `config_file=` in lib mode
 - Add a `--flat` option to the `get-all` command (the new output uses full paths as dictionnary key)
+- Add support of templates when values are dict
 
 0.9.0 (2019-07-11)
 ------------------
diff --git a/vault_cli/client.py b/vault_cli/client.py
index d50508d..74f89d5 100644
--- a/vault_cli/client.py
+++ b/vault_cli/client.py
@@ -422,6 +422,8 @@ class VaultClientBase:
     template_prefix = "!template!"
 
     def _render_template_value(self, secret: types.JSONValue) -> types.JSONValue:
+        if isinstance(secret, dict):
+            return {k: self._render_template_value(v) for k, v in secret.items()}
         if not isinstance(secret, str):
             return secret
 

diff --git a/tests/unit/test_client_base.py b/tests/unit/test_client_base.py
index d8376e5..1bfff71 100644
--- a/tests/unit/test_client_base.py
+++ b/tests/unit/test_client_base.py
@@ -366,6 +366,14 @@ def test_vault_client_base_render_template_path_not_found(vault):
         ({"a": {"value": "!template!b"}, "b": {"value": "c"}}, "b"),
         # Secret is a template
         ({"a": {"value": "!template!{{ vault('b') }}"}, "b": {"value": "c"}}, "c"),
+        # Secret is a dict with containing a template
+        (
+            {
+                "a": {"value": {"x": "!template!{{ vault('b') }}", "y": "yay"}},
+                "b": {"value": "c"},
+            },
+            {"x": "c", "y": "yay"},
+        ),
         # Finite recursion
         (
             {

add support for templates in dict
Currently the "template" feature of vault-cli only works when the value is a string (`{"value": "!template!..."}`

We would like to also support templates when values are dict. For example:
```
{
  "value": {
    "a": "!template!...",
    "b": "!template!...",
    "c": "value",
  }
}
```
tests/unit/test_client_base.py::test_vault_client_base_get_secret[vault_contents4-expected4]
tests/unit/test_client_base.py::test_get_client tests/unit/test_client_base.py::test_get_client_class tests/unit/test_client_base.py::test_vault_client_base_call_init_client tests/unit/test_client_base.py::test_vault_client_base_authenticate[test_kwargs0-expected0] tests/unit/test_client_base.py::test_vault_client_base_authenticate[test_kwargs1-expected1] tests/unit/test_client_base.py::test_vault_client_base_authenticate[test_kwargs2-expected2] tests/unit/test_client_base.py::test_vault_client_base_username_without_password tests/unit/test_client_base.py::test_vault_client_base_login_cert_without_key tests/unit/test_client_base.py::test_vault_client_base_no_auth tests/unit/test_client_base.py::test_vault_client_ca_bundle_verify[True-yay-yay] tests/unit/test_client_base.py::test_vault_client_ca_bundle_verify[True-None-True] tests/unit/test_client_base.py::test_vault_client_ca_bundle_verify[False-yay-False] tests/unit/test_client_base.py::test_vault_client_base_browse_recursive_secrets tests/unit/test_client_base.py::test_vault_client_base_browse_recursive_secrets_single_secret tests/unit/test_client_base.py::test_vault_client_base_get_all_secrets tests/unit/test_client_base.py::test_vault_client_base_get_all_secrets_flat tests/unit/test_client_base.py::test_vault_client_base_get_secrets[a-expected0] tests/unit/test_client_base.py::test_vault_client_base_get_secrets[b-expected1] tests/unit/test_client_base.py::test_vault_client_base_delete_all_secrets_generator tests/unit/test_client_base.py::test_vault_client_base_delete_all_secrets_no_generator tests/unit/test_client_base.py::test_vault_client_base_context_manager tests/unit/test_client_base.py::test_vault_client_set_secret tests/unit/test_client_base.py::test_vault_client_set_secret_overwrite_invalid[True-False] tests/unit/test_client_base.py::test_vault_client_set_secret_overwrite_invalid[True-None] tests/unit/test_client_base.py::test_vault_client_set_secret_overwrite_invalid[False-False] tests/unit/test_client_base.py::test_vault_client_set_secret_overwrite_valid[True-True-c] tests/unit/test_client_base.py::test_vault_client_set_secret_overwrite_valid[False-None-c] tests/unit/test_client_base.py::test_vault_client_set_secret_overwrite_valid[True-None-d] tests/unit/test_client_base.py::test_vault_client_set_secret_when_there_are_existing_secrets_beneath_path tests/unit/test_client_base.py::test_vault_client_set_secret_when_a_parent_is_an_existing_secret tests/unit/test_client_base.py::test_vault_client_set_secret_read_not_allowed tests/unit/test_client_base.py::test_vault_client_set_secret_list_not_allowed tests/unit/test_client_base.py::test_vault_client_set_secret_read_parent_not_allowed tests/unit/test_client_base.py::test_vault_client_move_secrets tests/unit/test_client_base.py::test_vault_client_move_secrets_generator tests/unit/test_client_base.py::test_vault_client_move_secrets_overwrite_safe tests/unit/test_client_base.py::test_vault_client_move_secrets_overwrite_force tests/unit/test_client_base.py::test_vault_client_base_render_template tests/unit/test_client_base.py::test_vault_client_base_render_template_path_not_found tests/unit/test_client_base.py::test_vault_client_base_get_secret[vault_contents0-b] tests/unit/test_client_base.py::test_vault_client_base_get_secret[vault_contents1-expected1] tests/unit/test_client_base.py::test_vault_client_base_get_secret[vault_contents2-b] tests/unit/test_client_base.py::test_vault_client_base_get_secret[vault_contents3-c] tests/unit/test_client_base.py::test_vault_client_base_get_secret[vault_contents5-d] tests/unit/test_client_base.py::test_vault_client_base_get_secret[vault_contents6-<recursive tests/unit/test_client_base.py::test_vault_client_base_get_secret[vault_contents7-<recursive tests/unit/test_client_base.py::test_vault_client_base_get_secret_template_root tests/unit/test_client_base.py::test_vault_client_base_get_secret_no_value tests/unit/test_client_base.py::test_vault_client_base_get_secret_with_dict tests/unit/test_client_base.py::test_vault_client_base_get_secret_not_found tests/unit/test_client_base.py::test_vault_client_base_lookup_token tests/unit/test_client_base.py::test_vault_client_base_get_secrets_error tests/unit/test_client_base.py::test_vault_client_base_absolute_path[get_secret-params0-expected0] tests/unit/test_client_base.py::test_vault_client_base_absolute_path[get_secret-params1-expected1] tests/unit/test_client_base.py::test_vault_client_base_absolute_path[delete_secret-params2-expected2] tests/unit/test_client_base.py::test_vault_client_base_absolute_path[delete_secret-params3-expected3] tests/unit/test_client_base.py::test_vault_client_base_absolute_path[list_secrets-params4-expected4] tests/unit/test_client_base.py::test_vault_client_base_absolute_path[list_secrets-params5-expected5] tests/unit/test_client_base.py::test_vault_client_base_absolute_path[set_secret-params6-expected6] tests/unit/test_client_base.py::test_vault_client_base_absolute_path[set_secret-params7-expected7] tests/unit/test_client_base.py::test_vault_client_base_build_full_path[foo-/base/foo] tests/unit/test_client_base.py::test_vault_client_base_build_full_path[/foo-/foo] tests/unit/test_client_base.py::test_vault_client_base_base_path[foo-/foo/] tests/unit/test_client_base.py::test_vault_client_base_base_path[foo/-/foo/] tests/unit/test_client_base.py::test_vault_client_base_base_path[foo//-/foo/] tests/unit/test_client_base.py::test_vault_client_base_base_path[/foo-/foo/] tests/unit/test_client_base.py::test_vault_client_base_base_path[/foo/-/foo/] tests/unit/test_client_base.py::test_vault_client_base_base_path[/foo//-/foo/] tests/unit/test_client_base.py::test_vault_client_base_get_secret_implicit_cache_ends tests/unit/test_client_base.py::test_vault_client_base_get_secret_implicit_cache_no_race_condition tests/unit/test_client_base.py::test_vault_client_base_get_secrets_implicit_cache_no_race_condition tests/unit/test_client_base.py::test_vault_client_base_get_secret_explicit_cache