crossplane / terrajet

Generate Crossplane Providers from any Terraform Provider
https://crossplane.io
Apache License 2.0
289 stars 38 forks source link

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

Open ulucinar opened 2 years ago

ulucinar commented 2 years ago

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.

muvaf commented 2 years ago

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

stale[bot] commented 1 year ago

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.