Skip to content

Non-described argument in artifactory_permission_target resource #98

@avkudryashov

Description

@avkudryashov

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 = "**"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions