Immutable fields should reject changes
- Dominant language
- Go
- Stars
- 481
- Forks
- 131
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 11
Description
### What problem are you facing?
Terraform has `ForceNew` attribute on fields that represents the immutability but we don't account it at the moment. Changing those fields causes Terraform errors that don't really seem to be related since TF tries to re-create the resource for changes in those fields.
### How could Terrajet help solve your problem?
We can invest in https://github.com/crossplane/crossplane-tools/issues/40 and then add that marker to the fields, similar to how we generate reference resolvers. Though it's also worth investigating whether [Common Expression Language (CEL)](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation) stuff merged in upstream would help here. Though that may require kubebuilder changes since it requires changes on the CRD manifests.
Contributor guide
Assessment
This issue has not been assessed yet.