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

Support for Member Policies #1030

Closed
spaceraccoon opened this issue Jan 9, 2025 · 1 comment
Closed

Support for Member Policies #1030

spaceraccoon opened this issue Jan 9, 2025 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/by-design This issue won't be fixed because the functionality is working as designed

Comments

@spaceraccoon
Copy link

spaceraccoon commented Jan 9, 2025

Describe what happened

Currently the Cloudflare API supports member policies for resource groups and permission groups, e.g.

curl https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/members/<MEMBER_ID>\
    -X PUT \
    -H "Authorization: Bearer <TOKEN>" \
    -H 'Content-Type: application/json' \
  -d '{
  "policies": [
    {
      "permission_groups": [
        {
        "id": "<PERMISSION_GROUP_ID>",
                "meta": {
            }
        }
      ],
      "resource_groups": [
        {
          "scope": {
            "key": "com.cloudflare.api.account.zone.<ZONE_ID>",
            "objects": [
              {
                "key": "*"
              }
            ]
          }
        }
      ]
    }
  ]
}'

Upstream TF provider supports policies: https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/account_member#nested-schema-for-policies

However, the current cloudflare.AccountMember resource only supports roleIds as an array of strings, and doesn't support policies.

Sample program

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@spaceraccoon spaceraccoon added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 9, 2025
@iwahbe iwahbe added resolution/by-design This issue won't be fixed because the functionality is working as designed and removed needs-triage Needs attention from the triage team labels Jan 9, 2025
@iwahbe
Copy link
Member

iwahbe commented Jan 9, 2025

Hi @spaceraccoon. Thanks for raising an issue. The upstream version you linked to is v5.0.0-alpha1. As soon as cloudflare publishes their provider as v5.0.0 (as a standard release), we will pick up those changes.

@iwahbe iwahbe closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/by-design This issue won't be fixed because the functionality is working as designed
Projects
None yet
Development

No branches or pull requests

2 participants