Hi all, I am has stored some API keys in prefect s...
# ask-community
s
Hi all, I am has stored some API keys in prefect secret blocks and I am getting these keys in my code using the below task @task def get_delighted_api_keys(): attorney_scheduling_key = Secret.load("delighted-attorney-scheduling").get() metlife_legal_plans_csat_key = Secret.load("delighted-metlife-legal-plans-csat").get() metlife_legal_plans_nps_key = Secret.load("delighted-metlife-legal-plans-nps").get() return [ {'project': 'Attorney_scheduling', 'key': attorney_scheduling_key}, {'project': 'Metlife_legal_plans_csat', 'key': metlife_legal_plans_csat_key}, {'project': 'Metlife_legal_plans_NPS', 'key': metlife_legal_plans_nps_key} ] and I am looping through these keys in my main() if name == "__main__": # Get the delighted API keys from the task delighted_api_keys = get_delighted_api_keys.fn() for key in delighted_api_keys: delighted_pipeline(key) this works and my code is able to get the keys from prefect blocks when I am running it from local docker, but its not picking the secret keys values when I am scheduling the deployment in prefect UI. what could be the possible issue here?
n
hi @Sowmiya Anand - can you explain what you're seeing when you notice this?
its not picking the secret keys values when I am scheduling the deployment in prefect UI.
when you run locally, are you pointing at the workspace where you're running your deployment in the UI?