๐ BUG: Build Requests `account_id` in Wrangler.toml but fails with `account_id`
Opened this issue ยท 3 comments
Which Cloudflare product(s) does this pertain to?
Workers Runtime
What version(s) of the tool(s) are you using?
3.70.0 [wrangler]
What version of Node are you using?
No response
What operating system and version are you using?
Cloudflare Dashboard
Describe the Bug
00:30:22.332 โ [ERROR] More than one account available but unable to select one in non-interactive mode.
00:30:22.332
00:30:22.332 Please set the appropriate `account_id` in your `wrangler.toml` file.
00:30:22.332 Available accounts are (`<name>`: `<account_id>`):
00:31:50.811 Found wrangler.toml file. Reading build configuration...
00:31:50.825
00:31:50.930 โ [ERROR] Running configuration file validation for Pages:
00:31:50.930
00:31:50.931 - Configuration file for Pages projects does not support "account_id"
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
I think this could be solved if the Pages build infrastructure simply provided the CLOUDFLARE_ACCOUNT_ID
environment variable when running the Wrangler commands. I believe that the account is already known at this point and so could be made available.
Allowing the wrangler.toml
to specify the account_id
could create potential for a source of truth conflict where the Pages infrastructure is running within one account but then Wrangler is trying to deploy to another account.
@petebacondarwin it does fix it by adding the CLOUDFLARE_ACCOUNT_ID
as an environment variable.
I'm just following the directions as per the console error suggestions. And yes I think it should know already what account is in it.
Yeah the error message is the most unfortunate piece here but I do think that Pages CI can just do this for us and avoid the user having to do anything.