@@ -257,6 +257,7 @@ def import_secrets(passphrase,
257257@cfy .options .update_hidden_value
258258@cfy .options .update_visibility
259259@cfy .options .tenant_name (required = False , resource_name_for_help = 'secret' )
260+ @cfy .options .provider
260261@cfy .options .common_options
261262@cfy .assert_manager_active ()
262263@cfy .pass_client (use_tenant_in_header = True )
@@ -267,6 +268,7 @@ def update(key,
267268 hidden_value ,
268269 visibility ,
269270 tenant_name ,
271+ provider ,
270272 logger ,
271273 client ):
272274 """Update an existing secret
@@ -275,6 +277,10 @@ def update(key,
275277 """
276278 utils .explicit_tenant_name_message (tenant_name , logger )
277279 validate_visibility (visibility )
280+
281+ if provider :
282+ client .secrets_providers .get (provider )
283+
278284 value = _get_secret_string (secret_file , secret_string )
279285 graceful_msg = 'Requested secret with key `{0}` was not found' .format (key )
280286 with handle_client_error (404 , graceful_msg , logger ):
@@ -287,7 +293,7 @@ def update(key,
287293 f'Error decoding secret value: \' { value } \' is not of '
288294 f'type \' { secret_details .schema .get ("type" )} \' ' )
289295
290- client .secrets .update (key , value , visibility , hidden_value )
296+ client .secrets .update (key , value , visibility , hidden_value , provider )
291297 logger .info ('Secret `{0}` updated' .format (key ))
292298
293299
0 commit comments