From 2527ef51fdf76c6972c750a30527f33091748324 Mon Sep 17 00:00:00 2001 From: Noah Fontes Date: Tue, 5 Sep 2023 22:56:23 -0700 Subject: [PATCH] Add support for destroy runs --- run.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run.go b/run.go index 4a40b64e..c9a19a2c 100644 --- a/run.go +++ b/run.go @@ -28,7 +28,7 @@ type runs struct { // RunStatus represents a run state. type RunStatus string -//List all available run statuses. +// List all available run statuses. const ( RunApplied RunStatus = "applied" RunApplyQueued RunStatus = "apply_queued" @@ -86,6 +86,9 @@ type RunCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,runs"` + // Whether this run is going to destroy instead of apply. + IsDestroy *bool `jsonapi:"attr,is-destroy,omitempty"` + // Specifies the configuration version to use for this run. ConfigurationVersion *ConfigurationVersion `jsonapi:"relation,configuration-version"` // Specifies the workspace where the run will be executed.