Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Support per-Resource lifecycle.prevent_destroy meta-arg Configuration #158

Open
ulucinar opened this issue Nov 24, 2021 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@ulucinar
Copy link
Collaborator

What problem are you facing?

For certain Terraform resources like Azure's PostgreSQL server configuration, we should not be including the lifecycle.prevent_destroy meta-arg in order to properly implement updates. Refer to crossplane-contrib/provider-jet-azure#97 for one such example.

How could Terrajet help solve your problem?

We could extend our resource configuration framework with an AllowDestroy parameter.

@sboschman
Copy link

Can the merge of the proposed override option in PR #159 be reconsidered please?

Not all jet providers do have a native counterpart. Trying to use the terrajet generated cluster/project role bindings of the provider-jet-rancher ends in

\"summary\":\"Instance cannot be destroyed\",\"detail\":\"Resource rancher2_cluster_role_template_binding.xxx has lifecycle.prevent_destroy set\"

during planning.

The upstream terraform provider docs: https://registry.terraform.io/providers/rancher/rancher2/latest/docs/resources/cluster_role_template_binding
Most attributes are ForceNew.

The only thing this resource does is create a binding/mapping between a rancher cluster/project, a role (role template in rancher terms) and a user or group. In other words it grants a user/group (e.g. ldap group) a set of permissions (role template) for a specific cluster or project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants