-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
Hi,
I try to implement upjet provider for rancher2.
On ressource rancher_app_v2,the terraform provider update some fields each time (labels and annotations).
So on upjet, it loop on reconciltation because of that.
Wat is the right way to avoid this ?
First
I not found documentation about the purpose of it (I found it on aws-provider)
func Configure(p *config.Provider) {
p.AddResourceConfigurator("rancher2_app_v2", func(r *config.Resource) {
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{
"annotations",
"labels",
},
}
}
}
Second
I not found documentation about the purpose of it (I found it on aws-provider)
func Configure(p *config.Provider) {
p.AddResourceConfigurator("rancher2_app", func(r *config.Resource) {
r.TerraformCustomDiff = func(diff *terraform.InstanceDiff, _ *terraform.InstanceState, _ *terraform.ResourceConfig) (*terraform.InstanceDiff, error) {
if diff != nil && diff.Attributes != nil {
delete(diff.Attributes, "labels.#")
delete(diff.Attributes, "annotations.#")
}
return diff, nil
}
}
}
Maybee there are another way ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels