
Google Cloud Delete
CertifiedDelete a Compute Engine instance
Google Cloud Delete
Delete a Compute Engine instance
Deletes a Compute Engine instance and, by default, waits for the deletion to complete. Boot disks created with the instance are removed along with it; additional disks attached separately are kept unless they were created with auto-delete enabled.
type: io.kestra.plugin.gcp.compute.DeleteExamples
Delete an instance when a flow completes.
id: compute_engine_cleanup
namespace: company.team
triggers:
- id: on_flow_completion
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatusCondition
in:
- SUCCESS
- FAILED
tasks:
- id: delete_instance
type: io.kestra.plugin.gcp.compute.Delete
serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT_KEY') }}"
projectId: "{{ secret('GCP_PROJECT_ID') }}"
zone: "us-central1-a"
instanceName: "kestra-job-{{ trigger.executionId }}"
waitUntilDeleted: "true"
Properties
instanceName *Requiredstring
The name of the Compute Engine instance
zone *Requiredstring
The zone where the instance is located
e.g. us-central1-a.
impersonatedServiceAccount string
The GCP service account to impersonate
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
projectId string
The GCP project ID
scopes array
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used
serviceAccount string
The GCP service account
timeout string
PT10MThe maximum duration to wait for the operation to complete
Default: PT10M. Hitting this timeout fails the task but does not cancel the in-flight GCP operation.
waitUntilDeleted booleanstring
trueWhether to wait for the instance to be fully deleted before completing the task
Default: true.
Outputs
instanceId string
The unique GCP instance ID of the deleted instance, if it could be resolved before deletion
instanceName string
The name of the deleted instance
status string
The instance status after the operation
DELETED if the deletion completed, PENDING_DELETE if waitUntilDeleted is false.