adamant-leather-41068
03/22/2023, 12:01 AMgcp.compute.AttachedDisk
say:
Note: When usingHow do I do this? ie, where does this go?you must usegcp.compute.AttachedDisk
on thelifecycle.ignore_changes = ["attached_disk"]
resource that has the disks attached. Otherwise the two resources will fight for control of the attached disk block.gcp.compute.Instance
orange-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.