Creation of platform_permission
resources failed to capture changes and update the Terraform state
#190
Labels
bug
Something isn't working
Describe the bug
To safely migrate from artifactory_permission_target to the newly required platform_permission resources, we adopted an approach where we first create the new resources, duplicating the effective permissions but assigning different names.
Following the same logic used for artifactory_permission_target resources, we loop through YAML-based input data to create permission targets for each group and service account. Additionally, we generate permission targets that include all publicly available local and remote repositories (~250 repos in each target).
Requirements for and issue
7.98.10
v1.10.3
v1.19.1
Expected behavior
New permission targets are created and the Terraform state is updated.
Actual behavior
Some permission targets were retried over several minutes before timing out. The actual permission targets in Artifactory were in some instances created, but Terraform did not register the result. The effect was that subsequent plan/apply cycles failed and had to be fixed by importing the resources in question or removing them from Artifactory.
Additional context
The problem persisted through all our environments. 12-15 out of 86 permission targets were left in this state in each environment. I'm not allowed to share our code in a public issue.
Follow-up
We have worked around the issue and have consistent environments now (and also upgraded providers). We wanted to create an issue in case there are underlying issues that should be fixed in order to improve the stability and reliability of the provider, as we understand that we are required to migrate several resources moving forward.
The text was updated successfully, but these errors were encountered: