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

Non-described argument in artifactory_permission_target resource #98

Open
avkudryashov opened this issue Sep 24, 2020 · 2 comments
Open

Comments

@avkudryashov
Copy link

avkudryashov commented Sep 24, 2020

An argument is added to the artifactory_permission_target resource after import. It is also added when the artifactory_permission_target resource is created from scratch.

Terraform Version

Terraform v0.12.29

  • provider.artifactory (unversioned)

Affected Resource(s)

  • artifactory_7.6.3

Terraform Configuration Files

resource "artifactory_permission_target" "test-team" {
  name             = "test-team"
  repo {
    includes_pattern = ["**",]
    repositories     = [
    "datalab-docker-local",
    ]
actions {
      groups {
        name        = "test-team"
        permissions = ["manage", "delete", "write", "annotate", "read"]
      }
      users {
      name        = "test-deploy"
      permissions = ["delete", "write", "annotate", "read"]
      }
}
  }
}

Expected Behavior

No changes. Infrastructure is up-to-date.

Actual Behavior

# artifactory_permission_target.test-team will be updated in-place
~ resource "artifactory_permission_target" "test-team" {
      id               = "test-team"
    + includes_pattern = "**"
      name             = "test-team"

      repo {
          excludes_pattern = []
          includes_pattern = [
              "**",
          ]
          repositories     = [
              "datalab-docker-local",
          ]

          actions {
              groups {
                  name        = "test-team"
                  permissions = [
                      "annotate",
                      "delete",
                      "manage",
                      "read",
                      "write",
                  ]
              }

              users {
                  name        = "test-deploy"
                  permissions = [
                      "annotate",
                      "delete",
                      "read",
                      "write",
                  ]
              }
          }
      }
  }

Steps to Reproduce

  1. Create permission in artifactory
  2. Create artifactory_permission_target with the same permission, users and groups as in the artifactory
  3. Import artifactory_permission_target into terraform state
  4. terraform apply

I expect to see a message "No changes. Infrastructure is up-to-date."
Instead, the resource is updated with the addition this argument

    + includes_pattern = "**"
@avkudryashov avkudryashov changed the title Non-described argument in includes_pattern artifactory_permission_target resource Non-described argument in artifactory_permission_target resource Sep 24, 2020
@peters95
Copy link

migrated -> jfrog/terraform-provider-artifactory#17

@chb0github
Copy link

This has been closed in the new repo. Suggest the same is done here.

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

3 participants