Skip to content

Conversation

saikonen
Copy link
Collaborator

introduces a get_secrets function that exposes the same capabilities as the @secrets decorator, but returns them as a dictionary instead of setting environment variables.

The use case is to make accessing secrets possible in user-code as well.

example:

@step
def start(self):
    secrets_dict = get_secrets(sources=["secret_source"], role="IAM_role_for_accessing")
    
    for secret_spec, contents_dict in secrets_dict.items():
         pass # do something with the fetched secrets

@nflx-mf-bot
Copy link
Collaborator

Testing[888] @ 252012d

@romain-intel
Copy link
Contributor

Need to see why this is not testing -- there is a load problem. May be an ordering issue. I will check (we now use secrets too). Thanks for trying to run the test. I'll take a look.

@savingoyal savingoyal merged commit 1fd4b74 into master Jul 10, 2025
30 checks passed
@savingoyal savingoyal deleted the feature/make-secrets-function branch July 10, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants