Hi all, How to use secret defined in prefect clou...
# prefect-community
d
Hi all, How to use secret defined in prefect cloud in Azure storage? I have added "azureflowsecret" as secret in prefect cloud. This is my code: Storage=Azure("edwflows",connection_string_secret="azureflowsecret") but when I tried to register it to prefect cloud, it failed with the error: ValueError: Local Secret "azureflowsecret" was not found.
k
Try
export PREFECT___CLOUD____USE__LOCAL_SECRETS=false
upvote 2
💯 1
d
Yeah. that works! In windows, the command is : set
PREFECT___CLOUD____USE__LOCAL_SECRETS=false
The flow code is uploaded with format slugified-flow-name/slugified-current-timestamp in azure blob storage container successfully. two questions: 1: When agents run, it pulls the latest timestamp flow code? 2: When I register the flow to prefect cloud, I found the version increased even the code is as same as the previous version. How to avoid that? Thanks!
k
I think anytime you change storage or runconfig, you need to bump up the version even if the Flow code is the same because it needs to be updated in our database. Agent will pull the latest registered version.
flow.register()
will always bump up a version. Using the CLI has a check if the code has changed. What it does is it provides an idempotency key that is the serialized flow to the registration. If you provide the same idempotency key, it won’t register and won’t bump up the version
💯 1