https://pulumi.com logo
#general
Title
# general
g

gray-city-50684

11/07/2019, 1:37 PM
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

white-balloon-205

11/07/2019, 3:35 PM
There is a resource option
ignoreChanges
which can be used for this.
g

gray-city-50684

11/07/2019, 3:37 PM
Thx, I will give it a try