From efddeb7bbefa47e853b4b14caa563c3d6e083910 Mon Sep 17 00:00:00 2001 From: piroux-sg Date: Mon, 11 Mar 2024 20:06:53 +0100 Subject: [PATCH] Fix typos and Clean comments --- internal/provider/api_object.go | 9 --------- internal/provider/secret_object.go | 2 -- internal/provider/secret_object_test.go | 3 --- 3 files changed, 14 deletions(-) diff --git a/internal/provider/api_object.go b/internal/provider/api_object.go index e7f6212..c3dadf8 100644 --- a/internal/provider/api_object.go +++ b/internal/provider/api_object.go @@ -307,15 +307,6 @@ func (obj *api_object) read_object_from_listall() error { return err } - /* - TODO: - - Unmarshal - - Find data msg key - - Iterate over array of Secrets - - Create internal limited secret struct if it finds the ResourceName -- needed if no update ? - - No update of the state - */ - type secretListAllResponse struct { Msg []struct { ResourceName string `json:"ResourceName"` diff --git a/internal/provider/secret_object.go b/internal/provider/secret_object.go index bdf590b..b338e50 100644 --- a/internal/provider/secret_object.go +++ b/internal/provider/secret_object.go @@ -9,7 +9,6 @@ import ( ) func resourceStackGuardianSecretAPI() *schema.Resource { - // Consider data sensitive if env variables is set to true. is_data_sensitive := true return &schema.Resource{ @@ -199,7 +198,6 @@ func make_api_object_secret(d *schema.ResourceData, meta interface{}) (*api_obje } func buildApiObjectSecretOpts(d *schema.ResourceData) (*apiObjectOpts, error) { - // resultPath := "/wfgrps/" + d.Get("wfgrp").(string) + "/stacks/" resultPath := "/secrets/" opts := &apiObjectOpts{ diff --git a/internal/provider/secret_object_test.go b/internal/provider/secret_object_test.go index 631658d..be6f31a 100644 --- a/internal/provider/secret_object_test.go +++ b/internal/provider/secret_object_test.go @@ -16,7 +16,6 @@ resource "stackguardian_secret" "TPS-Test-Secret-Name" { ` func TestAcc_ResourceSgSecret(t *testing.T) { - //t.Skipf("TODO: Fix DELETE: deletion of Secret resource is not possible with API Key") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -30,8 +29,6 @@ func TestAcc_ResourceSgSecret(t *testing.T) { "TPS-Test-Secret-Name", ), ), - //Destroy: true, - //PreventPostDestroyRefresh: true, }, }, })