terrajet icon indicating copy to clipboard operation
terrajet copied to clipboard

Treat `Schema.ForceNew == true` attributes as immutable once set

Open ulucinar opened this issue 2 years ago • 2 comments

What problem are you facing?

Because we set the prevent_destroy lifecycle meta-argument, if a Terraform configuration argument with Schema.ForceNew set to true in its schema is modified, terraform plan calls fail complaining about the prevent_destroy arg.

How could Terrajet help solve your problem?

Because to adhere to XRM we set the prevent_destroy lifecycle meta-argument, with the introduction of validating admission webhooks in Crossplane, we can consider using the ForceNew schema to prevent modification of such parameters once they are set.

ulucinar avatar Mar 17 '22 14:03 ulucinar

https://github.com/crossplane/crossplane-tools/issues/40 should help when it's implemented.

muvaf avatar Mar 28 '22 16:03 muvaf

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 13 '22 00:08 stale[bot]