https://prefect.io logo
j

Jetta

09/15/2023, 5:32 PM
@Marvin Is the PREFECT_API_TLS_INSECURE_SKIP_VERIFY config setting available on prefect cloud, or only on self hosted servers?
m

Marvin

09/15/2023, 5:32 PM
Well, isn't this a fascinating question. Unfortunately, the PREFECT_API_TLS_INSECURE_SKIP_VERIFY config setting isn't explicitly mentioned in the Prefect documentation I have access to. However, the Prefect Cloud API key and environment variable settings are configurable, and you can use the
prefect config view
and
prefect config set
commands to ensure your execution environment is correctly configured to access Prefect Cloud. But, if you're looking for a definitive answer, I'd suggest reaching out to the Prefect community or their support team. They're humans, after all, and humans are supposed to be good at answering questions, right?
i

Islam Otmani

09/15/2023, 6:01 PM
Hi @Jetta I had a quick look and I see it in both self hosted as well as prefect cloud, so you should be good to go 🙂👍
j

Jetta

09/15/2023, 6:08 PM
@Islam Otmani Thanks! I tried to set it via the command line, which updated my profile, but that didn't seem to make the change during run time. I am now trying to use a process block to update the
Copy code
PREFECT_API_TLS_INSECURE_SKIP_VERIFY
field: {"command":"prefect agent start","environment":{"PREFECT_API_TLS_INSECURE_SKIP_VERIFY":"True"}}
Is there a place to set it directly in the UI? It seems like this process block is a red herring.
@Marvin How can I update the environment settings of the config in my prefect cloud instance?
m

Marvin

09/15/2023, 7:36 PM
Oh, the joys of configuration. Let me walk you through this. To update the environment settings of the config in your Prefect Cloud instance, you'll need to set environment variables in the execution environment of your Prefect tasks. This can be done in a few ways: 1. Docker: If you're using Docker, you can set environment variables in your Dockerfile using the
ENV
instruction, or during container run with the
-e
option. 2. Kubernetes: If you're using Kubernetes, you can set environment variables in your deployment configuration. 3. Prefect Cloud UI: You can also set environment variables directly in the Prefect Cloud UI. Go to the "Settings" page of your flow run and add the environment variables in the "Environment" section. Remember, changes to your environment variables will only affect future flow runs, not currently running or scheduled runs. And, as always, be careful with sensitive data. You wouldn't want your secrets to end up in the wrong hands, would you? Oh, and one more thing. If you're trying to set Prefect-specific configuration settings, you might want to use the
prefect config set
command instead. This will update your local Prefect configuration, which is used to set defaults for your Prefect tasks. I hope that helps. Or at least, I hope it doesn't make things worse.
i

Islam Otmani

09/15/2023, 8:08 PM
Since it's an env variable, it'll depend on your set-up, e.g. if you're using a docker image, add it to the docker file, or for Kubernetes, manifest etc.
j

Jetta

09/15/2023, 8:56 PM
I have been using the default prefect agent. I created a test agent, process block with the Environment set to :`{"PREFECT_API_TLS_INSECURE_SKIP_VERIFY":"True"}` The Pool creation page mentioned attaching the block to a deployment, but I have not seen where to do that in the UI. Missing that connection I added the same above environment snippet to the infrastructure overrides of the deployment. I ran that and it counted up to 10 minutes late before I cancelled it. I was also investigating setting the variable in the python flow via prefect.settings, but that did not seem to make a difference either.