-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
object.metadata.finalizers causes a diff on every plan #1669
Comments
Hi @mathewpower, In your terraform, code example the attribute resource "kubernetes_manifest" "istio_control_plane" {
computed_fields = ["metadata.finalizers"]
manifest = {
apiVersion = "install.istio.io/v1alpha1"
kind = "IstioOperator"
metadata = {
name = "control-plane"
namespace = "istio-system"
}
spec = {
profile = "minimal"
}
}
} Thank you! |
Apologies. This was a typo in the ticket. I've updated the example. The issue persists. |
I am having the same problem with the resource mentioned in the referenced ticket #1442, resource "kubernetes_manifest" "beanstalkd_targetgroupbinding" {
manifest = {
"apiVersion": "elbv2.k8s.aws/v1beta1",
"kind": "TargetGroupBinding",
"metadata": {
"name": "beanstalkd"
"namespace": helm_release.beanstalkd.namespace
},
"spec": {
"serviceRef": {
"name": "beanstalkd",
"port": aws_lb_target_group.beanstalkd.port
},
"targetGroupARN": aws_lb_target_group.beanstalkd.arn,
"targetType": aws_lb_target_group.beanstalkd.target_type
}
}
computed_fields = [
"metadata.annotations",
"metadata.finalizers",
"metadata.labels",
]
} The provider wants to destroy and re-create the resource on a subsequent apply. Tested using the fresh release:
Edit: my issue might have more to do with the general |
The Generally, I find that if you get an error when applying because the post-apply check found a different object than what was applied, then you need On the other hand, if you find that apply works successfully, but a subsequent plan shows a diff since some other actor has modified the object (e.g. added a finalizer) in the meantime, then I suspect you might need |
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you! |
Bump. like the above commenter said, it's a widely known issue that |
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you! |
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
kubernetes_manifest
Terraform Configuration Files
Debug Output
Panic Output
Steps to Reproduce
terraform apply
Expected Behavior
There should be no diffs in the terraform output when the resource has not changed.
Actual Behavior
Terraform decides there is a state change and wants to replace the
istio_control_plane
resource.Important Factoids
References
Community Note
The text was updated successfully, but these errors were encountered: