Questionable design

The resource itself will always be static.

Though, the creation can be dynamic:
Since docker 18.06 (and 19.03 for compose) secrets and configs support --template-driver to render the the configuration.

I found a post of mine where I did some research about it:

Update: after re-reading the moby issue description, it seems secrets can dynamically reference other resources as well - I am not sure anymore, if the rendered output is stored in the resource, or the placeholders are stored in the resource.