Confused about workspace variables

Hi,

I don’ t understand how values set in the terraform cloud worspace UI should be referenced in terraform files.

I have FOO=“123” set in the workspace

I expected to be able to do something like
variable “FOO” {
type = string
}
In the root module and any inferiour consuming modules.

But I get "The argument “FOO” is required, but no definition was
found.

If I provide a default value, then that default value is used, the value set in the work space doesn’t get picked up.

I have attempted to follow the advice here

But can’t put it together at all.