Skip to content

cloudflare_rulesets issue #22808

@ts-web

Description

@ts-web

Existing documentation URL(s)

I'm getting a terraform error when creating a ruleset using https://api.cloudflare.com/client/v4/zones/***/rulesets

The API docs list these permissions:

Image

And I added all of them I could find:

Image

But still I get the error:

│ Error: failed to make http request
│ 
│   with cloudflare_ruleset.www_redirect,
│   on main.tf line 31, in resource "cloudflare_ruleset" "www_redirect":
│   31: resource "cloudflare_ruleset" "www_redirect" {
│ 
│ POST
│ "https://api.cloudflare.com/client/v4/zones/***/rulesets":
│ 403 Forbidden {
│   "result": null,
│   "success": false,
│   "errors": [
│     {
│       "message": "request is not authorized"
│     }
│   ],
│   "messages": []
│ }
│ 

This is not user error; this is running in CI where other cloudflare resources have been created successfully.

I have no other options now except to try using less fine-grained access control, up to possibly switching to a global API key.

What changes are you suggesting?

Document the correct permissions so I can create an API token that has them.

Additional information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions