diff --git a/src/Cake.Terraform.Tests/TerraformApplyTests.cs b/src/Cake.Terraform.Tests/TerraformApplyTests.cs index 3c24f7f..52fe2f5 100644 --- a/src/Cake.Terraform.Tests/TerraformApplyTests.cs +++ b/src/Cake.Terraform.Tests/TerraformApplyTests.cs @@ -142,6 +142,22 @@ public void Should_Append_Auto_Approve_When_AutoApprove_Is_True() Assert.Contains("-auto-approve", result.Args); } + [Fact] + public void Should_Append_Destroy_When_AutoApprove_Is_True() + { + var fixture = new Fixture + { + Settings = new TerraformApplySettings + { + Destroy = true + } + }; + + var result = fixture.Run(); + + Assert.Contains("-destroy", result.Args); + } + [Fact] public void Should_set_plan_path() { diff --git a/src/Cake.Terraform/Apply/TerraformApplySettings.cs b/src/Cake.Terraform/Apply/TerraformApplySettings.cs index f199faa..e65317a 100644 --- a/src/Cake.Terraform/Apply/TerraformApplySettings.cs +++ b/src/Cake.Terraform/Apply/TerraformApplySettings.cs @@ -27,7 +27,8 @@ public class TerraformApplySettings : TerraformSettings public bool AutoApprove { get; set; } /// - /// Does destory + /// Using the apply for destroying the terraform resources + /// https://developer.hashicorp.com/terraform/cli/commands/destroy /// public bool Destroy { get; set; } }