@task(
secret_requests=[
Secret(
group=SECRET_GROUP,
key=SECRET_NAME,
mount_requirement=Secret.MountType.ENV_VAR,
)
]
)
def secret_file_task() -> Tuple[str, str]:
# SM here is a handle to the secrets manager
sm = flytekit.current_context().secrets
f = sm.get_secrets_file(SECRET_GROUP, SECRET_NAME)
secret_val = sm.get(SECRET_GROUP, SECRET_NAME)
# returning the filename and the secret_val
return f, secret_val
thankful-minister-83577
09/27/2022, 7:54 PM
oh are secret requests even exposed?
thankful-minister-83577
09/27/2022, 7:56 PM
oh it is not… you’ll have to do it manually i think