Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudflare_access_rule is documented as account scope only #454

Open
2 tasks done
Arnall opened this issue Aug 31, 2022 · 1 comment
Open
2 tasks done

cloudflare_access_rule is documented as account scope only #454

Arnall opened this issue Aug 31, 2022 · 1 comment

Comments

@Arnall
Copy link

Arnall commented Aug 31, 2022

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

cf-terraforming version

v0.8.3

Expected outcome

accodring to the code cloudflare_access_rule can either use zoneID or accountID. So the documentation should indicate the scope as Account or Zone.

case "cloudflare_access_rule":
if accountID != "" {
jsonPayload, err := api.ListAccountAccessRules(context.Background(), accountID, cloudflare.AccessRule{}, 1)
if err != nil {
log.Fatal(err)
}
resourceCount = len(jsonPayload.Result)
m, _ := json.Marshal(jsonPayload.Result)
json.Unmarshal(m, &jsonStructData)
} else {
jsonPayload, err := api.ListZoneAccessRules(context.Background(), zoneID, cloudflare.AccessRule{}, 1)
if err != nil {
log.Fatal(err)
}
resourceCount = len(jsonPayload.Result)
m, _ := json.Marshal(jsonPayload.Result)
json.Unmarshal(m, &jsonStructData)
}

Actual outcome

The documentation indicates the scope as Account only :

| [cloudflare_access_rule](https://www.terraform.io/docs/providers/cloudflare/r/access_rule) | Account |||

Steps to reproduce

read the doc :)

References

No response

@Arnall
Copy link
Author

Arnall commented Aug 31, 2022

Note that there is the same issue for:

  • cloudflare_access_group
  • cloudflare_access_application
  • cloudflare_access_identity_provider
  • cloudflare_access_service_token

and a similar issue here:

  • cloudflare_custom_hostname_fallback_origin (it uses zoneID not accountID)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant