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

ProjectKey does not accept a hyphen where UI does. #21

Closed
5 tasks done
Assignees
Labels
bug Something isn't working

Comments

@coreyjackwilson
Copy link

coreyjackwilson commented Aug 8, 2022

Describe the bug
The client only accepts alphanumerics where the AF UI accepts hyphens. This needs to be loosened to allow project_key to take hyphens.

validation.StringMatch(regexp.MustCompile(`^[a-z0-9]{3,10}$`), "project_key must be 3 - 10 lowercase alphanumeric characters"),

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.
project_key = "depart-bu"

you receive the error `Error: invalid value for project_key (project_key must be 3 - 10 lowercase alphanumeric characters)`
  • Your version of artifactory (you can curl it at $host/artifactory/api/system/version
  • Artifactory SaaS
  • Your version of terraform
  • 1.0.6
  • Your version of terraform provider
  • 6.11.2

Expected behavior
Hyphens can be used in the project_key property

Additional context
We follow a naming scheme of DEPARTMENT-BUSINESSUNIT for our project keys. This is blocking our migration to projects and AF SaaS

@coreyjackwilson coreyjackwilson added the bug Something isn't working label Aug 8, 2022
@coreyjackwilson coreyjackwilson changed the title ProjectKey does not take a hyphen ProjectKey does not accept a hyphen where UI does. Aug 8, 2022
@coreyjackwilson
Copy link
Author

@alexhung looks like the fix is in. Thank you. When is this going to get bumped? https://github.com/jfrog/terraform-provider-artifactory/blob/ac22ecd2f1f8cc2d79d8f39c893203d5d6414f7e/go.mod#L12

@alexhung
Copy link
Member

alexhung commented Aug 9, 2022

@coreyjackwilson Should be some time today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment