Florian Kühnlenz
06/23/2021, 6:09 PMKevin Kho
PREFECT__CLOUD__USE_LOCAL_SECRETS=false ?Florian Kühnlenz
06/24/2021, 5:24 AMFlorian Kühnlenz
06/24/2021, 7:15 AMKevin Kho
Florian Kühnlenz
06/24/2021, 1:28 PMKevin Kho
flow.run_config = DockerRun(env={"PREFECT__CLOUD__USE_LOCAL_SECRETS": "false"})Florian Kühnlenz
06/24/2021, 2:08 PMFlorian Kühnlenz
06/24/2021, 2:19 PMKevin Kho
Florian Kühnlenz
06/24/2021, 2:35 PMKevin Kho
Florian Kühnlenz
06/24/2021, 2:39 PMKevin Kho
"PREFECT__CLOUD__USE_LOCAL_SECRETS": "false"
from prefect.client import Secret
from prefect.client.client import Client
client = Client()
test = client.set_secret(name="MYSECRET", value="MY SECRET VALUE")
print(Secret("MYSECRET").get())Kevin Kho
true by default when you are developing locally. This means it pulls from environment variables. When you run with Cloud as the backend, this value is false by default. It should pull the Cloud secret by default when you run your Flow.Kevin Kho
use_local_secrets to false will help you see if you can pull the secret you’re trying to pullFlorian Kühnlenz
06/24/2021, 3:04 PMKevin Kho
Florian Kühnlenz
06/24/2021, 3:08 PMpassword = PrefectSecret("PWD") within the flow contextKevin Kho
Florian Kühnlenz
06/24/2021, 3:10 PMKevin Kho
Florian Kühnlenz
06/24/2021, 3:13 PMFlorian Kühnlenz
06/24/2021, 3:19 PM<http://logger.info|logger.info>(prefect.config.backend) and this prints server. So the flow inside the docker agent does not know the correct backend.Kevin Kho
Florian Kühnlenz
06/24/2021, 3:46 PMKevin Kho
prefect backend cloud where the agent is being spun up from?Florian Kühnlenz
06/24/2021, 5:25 PMKevin Kho
prefect backend server and prefect backend cloud so even if you configure, you still need to specify the backendFlorian Kühnlenz
06/25/2021, 6:01 AMKevin Kho
Florian Kühnlenz
06/25/2021, 8:15 PMKevin Kho
Florian Kühnlenz
06/28/2021, 9:25 AMKevin Kho