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

Artifactory Scoped Token Resource does not support applied-permissions/groups #889

Closed
5 tasks done
johannges opened this issue Feb 16, 2024 · 1 comment · Fixed by #895
Closed
5 tasks done

Artifactory Scoped Token Resource does not support applied-permissions/groups #889

johannges opened this issue Feb 16, 2024 · 1 comment · Fixed by #895
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@johannges
Copy link

Artifactory Scoped Token Resource does not support applied-permissions/groups
If you try to create a group scoped_token, it will throw an error, that it is not supported:

resource "artifactory_scoped_token" "group" {
  username = "group_name"
  scopes   = ["applied-permissions/groups"]
}

Returns:

│ Error: Invalid Attribute Value Match
│ 
│   with artifactory_scoped_token.group,
│   on tf__artifactory_groups.tf line 24, in resource "artifactory_scoped_token" "group":
│   24:   scopes   = ["applied-permissions/groups"]
│ 
│ Attribute scopes[Value("applied-permissions/groups")] must be '<resource-type>:<target>[/<sub-resource>]:<actions>', got: applied-permissions/groups

This is also the case for applied-permissions/group

Terraform Module version: 10.1.3

Terraform Version: 1.5.7

Artifactory Version: 7.71.10

Requirements for and issue

  • A description of the bug
  • A fully functioning terraform snippet that can be copy&pasted (no outside files or ENV vars unless that's part of the issue). If this is not supplied, this issue will likely be closed without any effort expended.
  • Your version of artifactory (you can curl it at $host/artifactory/api/system/version
  • Your version of terraform
  • Your version of terraform provider

Expected behavior
It should create a Scoped Token with the permission of the group

Additional context
Add any other context about the problem here.

@johannges johannges added the bug Something isn't working label Feb 16, 2024
@alexhung
Copy link
Member

@johannges Your scope is missing a group name. The regex for validating the scopes attribute is ^applied-permissions/groups:.+$. I'm not sure why the error message isn't the correct text. I'll look into that.

@alexhung alexhung added the question Further information is requested label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants