Open papanito opened 1 year ago
@papanito Can you please review the discussion in https://github.com/rancher/terraform-provider-rancher2/pull/1117 and try the suggested workaround on the latest version of the provider and verify if this is sufficient for your usecase? Thanks
The recommended workaround at https://github.com/rancher/rancher/issues/12821#issuecomment-391381651 or https://github.com/rancher/rancher/issues/12821#issuecomment-516421250 respectively, seems to work for us. So basically we add a placeholder
annotations = {
"metallb.universe.tf/ip-allocated-from-pool" = "placeholder"
"field.cattle.io/publicEndpoints" = "placeholder"
}
then, ignore_changes
works
lifecycle {
prevent_destroy = true
ignore_changes = [
metadata[0].annotations["field.cattle.io/publicEndpoints"],
metadata[0].annotations["metallb.universe.tf/ip-allocated-from-pool"]
]
}
Rancher Server Setup
Information about the Cluster
I manually changed Pod Security Admission Configuration Template in the UI. Since then
tf plan
fails as mentioned in https://github.com/rancher/terraform-provider-rancher2/issues/908So I add the following to be able to ignore the changes
However I still get the error.
I also downgraded the provider to e.g. 2.0.0 with the same result
I also tried this notation, without success
To Reproduce
resource "rancher2_cluster" "cluster"
with theignore_changes
addedtf plan
Actual Result
Error appears as mentioned in the bug description
Expected Result
The changes I expect are ignored and I get a successful plan
Screenshots
N/A
Additional context
Related issue https://github.com/rancher/terraform-provider-rancher2/issues/908
Output of console