Skip to content

Commit

Permalink
Add delete_compute_snapshot pipeline (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
misraved authored May 15, 2024
1 parent 847346c commit 5fe0786
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions pipelines/compute/delete_compute_snapshot.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
pipeline "delete_compute_snapshot" {
title = "Delete Compute Snapshot"
description = "Delete a compute snapshot."

param "cred" {
type = string
description = local.cred_param_description
default = "default"
}

param "subscription_id" {
type = string
description = local.subscription_id_param_description
}

param "resource_group" {
type = string
description = local.resource_group_param_description
}

param "snapshot_name" {
type = string
description = "The name of the compute snapshot that is being deleted."
}

step "container" "delete_compute_snapshot" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["snapshot", "delete", "--yes", "-g", param.resource_group, "-n", param.snapshot_name, "--subscription", param.subscription_id]

env = credential.azure[param.cred].env
}

output "snapshot" {
description = "The deleted compute snapshot details."
value = jsondecode(step.container.delete_compute_snapshot.stdout)
}
}

0 comments on commit 5fe0786

Please sign in to comment.