Closed
Description
Describe the solution
(Not a feature, not a bug, just DX that could be improved.)
Problem
Assume you have wrangler.toml
containing a name of mysite
. When creating D1, R2, & KV resources using wrangler you must specify the desired name differently in order to end up with the same name for the resource.
wrangler d1 create mysite-staging # creates mysite-staging ✅
wrangler r2 bucket create mysite-staging # creates mysite-staging ✅
wrangler kv namespace create mysite-staging
# creates mysite-mysite-staging ❌
D1 and R2 are consistent with each other and good.
However, KV's create command preprends <name>-
, and should not in order for a predictable DX with the others.
Suggestion
wrangler kv namespace create <name>
should 1.) not preprend the project name in order to be consistent with the other commands, and 2.) instead it can just throw an error if the resource already exists like the other methods do and which is likely already does too.
Version
wrangler 3.70.0