Best way to prevent deletion #632
-
We are using this provider purely for repository configuration which we've delegated to junior engineers. We'd like to ensure that repositories can't be deleted by mistake and must be deleted manually. We thought about using a user that lacked this permission, but it doesn't seem like it's possible to use a user other than Should I create a feature request that turns deletion off at the provider level or is there a better solution? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@nrowealign There's no magic bullet to solve this problem. Authorization is not the responsibility of the provider so we will not implement any support. You should open a feature request ticket via JFrog's support to request the repository API be controlled by roles and/or permissions (vs user type only). In addition my suggestion is to implement a combination of policy and practices with some technical hurdle to prevent accidental deletion. For example:
|
Beta Was this translation helpful? Give feedback.
@nrowealign There's no magic bullet to solve this problem. Authorization is not the responsibility of the provider so we will not implement any support. You should open a feature request ticket via JFrog's support to request the repository API be controlled by roles and/or permissions (vs user type only).
In addition my suggestion is to implement a combination of policy and practices with some technical hurdle to prevent accidental deletion.
For example:
lifecycle.prevent_destroy
to the resources and set it totrue
. See Terraform documentation.lifecycle.prevent_destroy
must be modified in order to perform the deletion.