Is there a way to tell Pulumi to ignore an attribu...
# general
g
Is there a way to tell Pulumi to ignore an attribute of a resource when it decides which resources need to be updated / replaced?
The use-case I’m working on is DigitalOcean Kubernetes cluster. Definition looks like this:
Copy code
new docean.KubernetesCluster(`${coreConfig.applicationName}-K8S`.toLowerCase(),
            {
                region: doConfig.region as docean.Region,
                version: "latest",
                nodePool: {
                    name: `${coreConfig.applicationName}-K8S-default`.toLowerCase(),
                    size: doConfig.nodeSize,
                    nodeCount:doConfig.nodeCount
                }
            },
            {
                provider: doProvider,
                parent: this
            }
        );
The problem is with the
version: "latest"
part, on any subsequent
pulumi up
updates it wants to replace the cluster, because the version saved will be the actual version (
1.16.2-do.0
right now) and not
latest
.
My guess is that the same replacement problem will also happen if I (want to) upgrade the cluster to the latest patch release: a new cluster will be created instead of upgrading the existing one.
w
There is a resource option
ignoreChanges
which can be used for this.
g
Thx, I will give it a try