From 2497e64efc454e984763c4d48a35e1b1ceb3dd26 Mon Sep 17 00:00:00 2001 From: wesleymccollam Date: Thu, 27 Mar 2025 14:49:29 -0400 Subject: [PATCH] remove platform export generation date in export files --- internal/connector/common/common_utils.go | 9 +-------- internal/connector/templates/hcl_import_header.template | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/connector/common/common_utils.go b/internal/connector/common/common_utils.go index 68570da7..8190ac98 100644 --- a/internal/connector/common/common_utils.go +++ b/internal/connector/common/common_utils.go @@ -9,7 +9,6 @@ import ( "slices" "strings" "text/template" - "time" "github.com/pingidentity/pingcli/internal/connector" "github.com/pingidentity/pingcli/internal/customtypes" @@ -91,15 +90,9 @@ func writeHeader(format, outputFilePath string, outputFile *os.File) error { return fmt.Errorf("failed to parse HCL import header template. err: %s", err.Error()) } - header := struct { - DateTime string - }{ - DateTime: time.Now().Format(time.RFC1123), - } - switch format { case customtypes.ENUM_EXPORT_FORMAT_HCL: - err := hclImportHeaderTemplate.Execute(outputFile, header) + err := hclImportHeaderTemplate.Execute(outputFile, nil) if err != nil { return fmt.Errorf("failed to write import template to file %q. err: %s", outputFilePath, err.Error()) } diff --git a/internal/connector/templates/hcl_import_header.template b/internal/connector/templates/hcl_import_header.template index 32ffaf9d..868a9028 100644 --- a/internal/connector/templates/hcl_import_header.template +++ b/internal/connector/templates/hcl_import_header.template @@ -1,6 +1,6 @@ ####################################################################################################################### # -# Generated by Ping CLI: {{.DateTime}} +# Generated by Ping CLI: # https://github.com/pingidentity/pingcli # # Using the Terraform import blocks generated in this file, Terraform HCL can be generated and resource