Getting plugin did not respond errors with v8.2.1

Describe the bug
When running a terraform plan, I'm getting the following error:
Error: Plugin did not respond
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.

Followed by a lot of request cancelled errors, similar to:
 Error: Request cancelled

  with artifactory_user.this,
  on file.tf line 6, in resource "artifactory_user" "this":
   6: resource "artifactory_user" "this" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

I'm not able to include a snippet since I don't exactly know which part of the code is causing the
plugin to not respond.

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
2023-06-22T19:32:55.325Z [DEBUG] provider: plugin exited

Requirements for and issue

[x] 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.
[x] Your version of artifactory (you can curl it at $host/artifactory/api/system/version
[x] Your version of terraform
[x] Your version of terraform provider

version of artifactory: 7.59.9
version of terraform: 1.4.6
verrsion of terraform provider: 8.2.1
Thank you so much for your consideration!
Expected behavior
terraform plan succeeding
Additional context
Add any other context about the problem here.

Hi @charmmarch, it's hard to tell what's wrong without knowing the resource which causing the error. What was the first errored-out resource? Can you give me a snippet?

I got the same error with version ~> 8.0 of the plugin, but it does not seem to error with version ~> 7.0 of the plugin.
The resources it was failing on for me were:
│ Error: Request cancelled
│
│   with artifactory_permission_target.local_private_repo_access,
│   on permissions.tf line 3, in resource "artifactory_permission_target" "local_private_repo_access":
│    3: resource "artifactory_permission_target" "local_private_repo_access" {

...

╷
│ Error: Request cancelled
│
│   with artifactory_user.bob,
│   on users.tf line 11, in resource "artifactory_user" "bob":
│   11: resource "artifactory_user" "bob" {

These were the only two resource types impacted for us.
Note that I'm currently migrating from an ancient version (2.2.7), and had to re-import all of the resources since the resource names from all of the repository types changed).
Maybe this has something to do with changes to how users are put into groups?  From the current documentation it looks like this information goes into the user resource, but before we always put it into the group resource.

@charmmarch we've noticed that the permission target resource test is running much longer when migrated to the plugin framework. We have a ticket to investigate but haven't started yet. We will look into it since it's causing problems for you.

@danielmkn  - thank you so much! Anything we can do in our artifactory_permission_target definitions in the mean time that will optimize the validation process?

@charmmarch, sorry, I don't know yet. How many of them do you have?

@danielmkn - we have close to 200 artifactory_permission_target resources.
Curios if this stands out to you, but this line seems to always come up in the errors:
panic: runtime error: index out of range [1] with length 1

Don't know if its relevant or not.
To test, I remove all dynamic blocks and count conditionals to ensure we don't have any indexed resources, but this line still comes up. 😕

@charmmarch Can you post an example (as close to your config as possible) of the artifactory_permission_target resource? I would like to reproduce this issue using your example (vs our own) to ensure we fix the underlying issue.

The performance issue may be related to this: https://github.com/hashicorp/terraform-plugin-framework/issues/775

This issue is fixed in this PR: https://github.com/hashicorp/terraform-plugin-framework/pull/772
Updating our provider to use framework 1.3.1 should fix this issue.

@alexhung , thank you so much for looking into this. True to that issue you linked above, many of our artifactory_permission_target  resource definitions contain block sets.  Looking forward to when the framework version gets upgraded to benefit from the fix. 👍

@alexhung , sorry to report  that even after upgrading to v8.2.3 we are still getting a long executions of tf plan . It goes on for hours 😞 but now even with version 8.3.1 we are still seeing the same behavior. Here's a snippet of all the permission targets that we have:
resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = ["ANY"]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = ["ANY REMOTE"]
     actions {
       dynamic "users" {
         for_each = var.anonymous_user_rw[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_debian_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_chef_repository.redacted.key]
     actions {
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_cocoapods_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_cocoapods_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_composer_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_composer_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_composer_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_composer_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_debian_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_debian_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_debian_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_docker_v2_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_docker_v2_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_docker_v2_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_docker_v2_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_docker_v2_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_docker_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_docker_v2_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_docker_v2_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_gems_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_gems_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_gems_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       # this user is created under the `npm-meps-wol.tf` but assigned permissions
       # to this generic-meps-wol local repo here
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_helm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_helm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_maven_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_maven_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_maven_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_maven_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_maven_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_maven_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_maven_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_npm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_nuget_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate", "manage"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_pypi_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_pypi_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_pypi_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_pypi_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_pypi_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_rpm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_rpm_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_sbt_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_sbt_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       users {
         name        = "anonymous"
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_terraform_module_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
 }

 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_terraform_module_repository.redacted.key]
     actions {
       groups {
         name        = "BETHEL-APP-RTF-TerraformMepsLocal-CHANGE"
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = "BETHEL-APP-RTF-TerraformMepsLocal-READ"
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
   count = terraform.workspace == "union" ? 1 : 0
 }

 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_terraform_provider_repository.terraform_provider-meps-local.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
 }

 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_terraform_provider_repository.terraform_provider-meps-local.key]
     actions {
       groups {
         name        = "BETHEL-APP-RTF-TerraformMepsLocal-CHANGE"
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = "BETHEL-APP-RTF-TerraformMepsLocal-READ"
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
   count = terraform.workspace == "union" ? 1 : 0
 }

 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_terraformbackend_repository.terraformbackend-meps-local.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_terraform_repository.terraform-remote.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "write"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_terraform_provider_repository.terraform-provider-local.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
 }

 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_terraform_provider_repository.terraform-provider-local.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = "BETHEL-APP-RTF-TerraformGenericLocal-CHANGE"
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = "BETHEL-APP-RTF-TerraformGenericLocal-READ"
         permissions = ["read"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
   count = terraform.workspace == "union" ? 1 : 0
 }

 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_terraform_module_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_remote_docker_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_vagrant_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_vagrant_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "manage", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read"]
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       users {
         name        = artifactory_user.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}
 resource "artifactory_permission_target" "redacted" {
   name = "redacted"
   repo {
     includes_pattern = ["**"]
     repositories     = [artifactory_local_generic_repository.redacted.key]
     actions {
       groups {
         name        = artifactory_group.redacted.name
         permissions = ["read", "delete", "write", "annotate"]
       }
       dynamic "users" {
         for_each = var.anonymous_user_r[*]
         content {
           name        = users.value.name
           permissions = users.value.permissions
         }
       }
     }
   }
}

@charmmarch My suspicion is that this is the performance issue from Terraform framework:

The performance issue may be related to this: hashicorp/terraform-plugin-framework#775

The release fixed specifically the issue with error:
panic: runtime error: index out of range [1] with length 1

@charmmarch Looks like there is some performance improvement coming in the next framework release: https://github.com/hashicorp/terraform-plugin-framework/issues/775#issuecomment-1618814589

I have exactly the same performance problem. In the past I've used provider version 7.X. After upgrading to the latest one 8.4.0 my terraform plan performance dropped heavily. It takes hours to apply artifactory_permission_target resources.

@alexhung Been seeing this error since last week with the latest provider version 8.4.1. ETA on fix?
Stack trace from the terraform-provider-artifactory_v8.4.1.exe plugin:

panic: runtime error: index out of range [0] with length 0

goroutine 118 [running]:
github.com/jfrog/terraform-provider-artifactory/v8/pkg/artifactory/resource/security.(*PermissionTargetResourceModel).toActionsAPIModel(0x1817a00?, {0xc000d4e790?, 0x19243ff?}, {{0x0, 0x0, 0x0}, {0x1adc080, 0xc00112ebd0}, 0x0})
        github.com/jfrog/terraform-provider-artifactory/v8/pkg/artifactory/resource/security/resource_artifactory_permission_target.go:58 +0x47c
github.com/jfrog/terraform-provider-artifactory/v8/pkg/artifactory/resource/security.(*PermissionTargetResourceModel).toSectionAPIModel(0xc0006db470?, {0x1ad8aa0, 0xc000cc6540}, {{0xc0010e2220, 0x1, 0x1}, {0x1adc080, 0xc00112eae0}, 0x2})
        github.com/jfrog/terraform-provider-artifactory/v8/pkg/artifactory/resource/security/resource_artifactory_permission_target.go:73 +0x445
github.com/jfrog/terraform-provider-artifactory/v8/pkg/artifactory/resource/security.(*PermissionTargetResourceModel).toAPIModel(0xc00028cd80, {0x1ad8aa0, 0xc000cc6540})
        github.com/jfrog/terraform-provider-artifactory/v8/pkg/artifactory/resource/security/resource_artifactory_permission_target.go:85 +0xaf
github.com/jfrog/terraform-provider-artifactory/v8/pkg/artifactory/resource/security.(*PermissionTargetResource).Create(0xc000bcff08, {0x1ad8aa0, 0xc000cc6540}, {{{{0x1add840, 0xc000d51dd0}, {0x1817f40, 0xc000b25860}}, {0x1aded08, 0xc00007c4b0}}, {{{0x1add840, ...}, ...}, ...}, ...}, ...)
        github.com/jfrog/terraform-provider-artifactory/v8/pkg/artifactory/resource/security/resource_artifactory_permission_target.go:380 +0x251
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).CreateResource(0xc0001b8420, {0x1ad8aa0, 0xc000cc6540}, 0xc000d4f148, 0xc000d4f0e8)
        github.com/hashicorp/terraform-plugin-framework@v1.3.1/internal/fwserver/server_createresource.go:101 +0x5b8
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ApplyResourceChange(0x1ad8aa0?, {0x1ad8aa0, 0xc000cc6540}, 0xc0003b2c80, 0xc000d4f2b8)
        github.com/hashicorp/terraform-plugin-framework@v1.3.1/internal/fwserver/server_applyresourcechange.go:57 +0x4a8
github.com/hashicorp/terraform-plugin-framework/internal/proto5server.(*Server).ApplyResourceChange(0xc0001b8420, {0x1ad8aa0?, 0xc000cc63f0?}, 0xc0003b2b90)
        github.com/hashicorp/terraform-plugin-framework@v1.3.1/internal/proto5server/server_applyresourcechange.go:55 +0x27b
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.muxServer.ApplyResourceChange({0xc0006db1a0, 0xc0006db200, {0xc0005a5080, 0x2, 0x2}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}, ...}, ...)
        github.com/hashicorp/terraform-plugin-mux@v0.9.0/tf5muxserver/mux_server_ApplyResourceChange.go:27 +0x102
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000476b40, {0x1ad8aa0?, 0xc001257ce0?}, 0xc0007f8070)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x18ec640?, 0xc000476b40}, {0x1ad8aa0, 0xc001257ce0}, 0xc0007f8000, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:419 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0007e65a0, {0x1addb80, 0xc00017fd40}, 0xc000bc0000, 0xc000602030, 0x20b0ac0, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1345 +0xdf0
google.golang.org/grpc.(*Server).handleStream(0xc0007e65a0, {0x1addb80, 0xc00017fd40}, 0xc000bc0000, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1722 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.54.0/server.go:966 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.54.0/server.go:964 +0x28a

@neatcoder This looks like a separate issue. Please create a new GitHub issue.

@neatcoder This looks like a separate issue. Please create a new GitHub issue.

@alexhung Here's the new issue #782

We are having the same issue. terraform plan times out.
Highest version of the Artifactory provider we can go to is 7.11.2.
Anything higher suffers from the terraform plan time out issue.
Artifactory version: 7.63.7
Terraform version: 1.3.9

@oallauddin @charmmarch @m-barczyk I did a quick perf test with 'terraform-plugin-framework' 1.3.5 and noticed a 60%+ decrease in execution time (vs 1.3.1 that this provider is currently using). We are planning to upgrade to this latest release. Hopefully this will make your TF execution time more bearable.

https://github.com/jfrog/terraform-provider-artifactory/pull/785

@oallauddin @neatcoder @m-barczyk @charmmarch Any feedback on the recent release w.r.t performance improvement? I'd love to hear from you all, which I can pass on to the TF team.

@alexhung - I just tried right now using version 9.0.0 and the behavior is the same.
72 minutes has elapsed and terraform plan did not even start. The process timed out.

@charmmarch I'd encourage you to also voice your experience in this HashiCorp community thread: https://discuss.hashicorp.com/t/performance-issue-with-terraform-plugin-framework/58422 Hopefully TF team will see it and prioritize the fix.