crossplane / crossplane/upjet

Immutable fields should reject changes

Open
#78 8 comments 2 reactions 1 assignee Claimed by @ulucinar View on GitHub
enhancement is:triaged v2
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.