https://pulumi.com logo
#golang
Title
# golang
m

mammoth-country-64756

08/10/2022, 10:52 AM
Hi beautiful people, I’m having some issues ignoring changes, I have the current scenario: In the screenshot you can see that the installation of a helm chart shows changes, I’d like to ignore these, what do I do? I tried:
Copy code
pulumi.IgnoreChanges([]string{"kube-system/aws-load-balancer-tls"}),
and
Copy code
pulumi.IgnoreChanges([]string{"kubernetes:core/v1:Secret"})
Full code:
Copy code
_, err = helm.NewChart(ctx, "load-balancer-controller", helm.ChartArgs{
		Chart:     pulumi.String("aws-load-balancer-controller"),
		Version:   pulumi.String("1.4.3"),
		Namespace: pulumi.String(lbcNamespace),
		FetchArgs: helm.FetchArgs{
			Repo: pulumi.String("<https://aws.github.io/eks-charts>"),
		},
		Values: pulumi.Map{
			"clusterName": eksCluster.Name,
			"serviceAccount": pulumi.Map{
				"create": pulumi.BoolPtr(false),
				"name":   lbcServiceAccount.Metadata.Name(),
			},
		},
	}, pulumi.Provider(k8sProvider),
		pulumi.IgnoreChanges([]string{"kubernetes:core/v1:Secret"}),
	)
None worked. Any help welcome 🙇
Or I should read the warning message and this won’t actually work
w

worried-xylophone-86184

08/11/2022, 8:49 AM
I am actually facing a similar problem Ákos with ignore change not propagating to a child resource
I tried using transformations too. But that gave the same warning
m

mammoth-country-64756

08/11/2022, 8:52 AM
I was just looking at transformations for this, guess I won’t 😄
w

worried-xylophone-86184

08/11/2022, 8:55 AM
I am not using golang so cant comment if the behaviour is similar.
n

narrow-translator-93508

08/11/2022, 9:49 AM
From what I can see, you need to do that
Copy code
pulumi.IgnoreChanges([]string{"data", "webhooks"})
m

mammoth-country-64756

08/12/2022, 9:09 AM
New code based on your suggestion:
Copy code
_, err = helm.NewChart(ctx, "load-balancer-controller", helm.ChartArgs{
		Chart:     pulumi.String("aws-load-balancer-controller"),
		Version:   pulumi.String("1.4.3"),
		Namespace: pulumi.String(lbcNamespace),
		FetchArgs: helm.FetchArgs{
			Repo: pulumi.String("<https://aws.github.io/eks-charts>"),
		},
		Values: pulumi.Map{
			"clusterName": eksCluster.Name,
			"serviceAccount": pulumi.Map{
				"create": pulumi.BoolPtr(false),
				"name":   lbcServiceAccount.Metadata.Name(),
			},
		},
	}, pulumi.Provider(k8sProvider),
		pulumi.IgnoreChanges([]string{"data", "webhooks"}),
	)
In the output I still see them changing:
6 Views