sparse-intern-71089
03/22/2023, 12:01 AMorange-policeman-59119
03/24/2023, 10:28 AMlifecycle.ignore_changes
with gcp.compute.AttachedDisk
and gcp.compute.Instance
, you need to add the ignoreChanges
option to the instance resource in your Pulumi program. Here's an example in TypeScript:
typescript
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const instance = new gcp.compute.Instance("my-instance", {
// other instance configuration options...
attachedDisks: [
// attached disk configuration...
],
}, {
ignoreChanges: ["attachedDisks"],
});
This will ensure that any changes to the attached disks will not cause Pulumi to try to update the instance resource, avoiding the fight for control of the attached disk block.