ACCT-4178: Add raw permissions struct to provider #1960
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At the moment, there is an issue with API Token permission groups. When fetching permission groups, there are 5 or 6 groups that can be either account-scoped or zone-scoped. Each of these permission groups results in two objects in the permission group response with the same name but different scopes - for example (pseudocode):
As we're indexing by name only when calling
d.Set
, this can cause the ID forPermission Group 1
(account scope) to be overridden with the ID forPermission Group 1
(zone scope).The resolution here is to index by name AND scope. To achieve this, we are adding a new
zone
,account
anduser
attributes that contain only those for the resource level as opposed to all together. This still allows the ability of building any permission policy you need, but with explicit resource levels as part of the reference.Closes #1004