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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

artifactory_permission_target should not fail when permission with same name already exists #54

Open
bg2132332 opened this issue Aug 30, 2019 · 1 comment

Comments

@bg2132332
Copy link

bg2132332 commented Aug 30, 2019

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

terraform 0.11.14

Affected Resource(s)

  • artifactory_permission_target

Terraform Configuration Files

resource "artifactory_permission_target" "test" {
  name = "test_permission"

  repo {
    includes_pattern = ["$test/**"]
    repositories     = "myrepo1"

    actions = {
      groups = [
        {
          name        = "testgroup"
          permissions = ["read", "annotate", "write", "delete"]
        },
      ]
    }
  }
}

Expected Behavior

Should not fail. Needs to import the permission definition into the state file, for ex. see the same behavior with artifactory_group resource.

Actual Behavior

1 errors occurred:
* artifactory_permission_target.test: 1 error occurred:
* artifactory_permission_target.test: POST https://xxxxxxxxxxx/artifactory/api/v2/security/permissions/test_permission: 409 [{Status:409 Message:Can't create permission target 'test_permission' for type repo. It already exists.}]

Steps to Reproduce

  1. terraform apply
@jamestoyer
Copy link
Contributor

I'm not sure this is really the incorrect behaviour. You should be able to import the resource using the terraform import command

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

2 participants