Can environment variables be scoped per project?

I am trying to scope an environment variable to be re-usable across a project and it does not work.

the best i could do was to scope it on an environment basis.

Are you trying to scope them via the Web UI, Terraform or API?

i am trying to scope them via the web UI

thanks

Did you set up an environment variable with a project scope like in the video below?

Otherwise, can you explain to me what are the steps you are going through?

it is wierd - it has just started working on the UI

can we do this with Terraform (creating projects with default secret variables scoped to that project) ?

also am I right to assume each environment in Qovery corresponds to a namespace in Kubernetes ?

if that is the case then what does a project map to (corresspond to) in Kubernetes ?

Absolutely, look at this example:

https://registry.terraform.io/providers/Qovery/qovery/latest/docs/resources/project#example-usage

Indeed, every Environment is a Kubernetes namespace.

Project is a virtual entity only available at the Qovery level. There is no Kubernetes-related resource. However, if you look at the Kubernetes namespace ID you will see that it’s splitter in 2 parts with a -. The first part corresponds to the project ID.

If you are curious about how this part work, you can inspect the open-source code.

https://github.com/Qovery/engine/blob/dev/src/cloud_provider/environment.rs#L34