<#547 Add support for GCP secret manager> Pull req...
# flyte-github
a
#547 Add support for GCP secret manager Pull request opened by jeevb Tested with:
Copy code
from flytekit import Secret, task, workflow


@task(secret_requests=[Secret(group="mainsecret", key="na", group_version="1")])
def secret_task() -> str:
    with open("/etc/flyte/secrets/mainsecret/1") as f:
        return f.read()


@workflow
def wf() -> str:
    x = secret_task()
    return x

Screenshot 2023-03-30 at 2 03 25 PM

Note the use of the required
key
, even though the secrets plugin does not use it. @thankful-minister-83577: we may want to consider making this optional. Flytekit will also need support for including the group version in the file path when fetching secrets. flyteorg/flytepropeller GitHub Actions: Goreleaser GitHub Actions: Build & Push Flytepropeller Image GitHub Actions: Bump Version 11 other checks have passed 11/14 successful checks