From 60b153bc1ab3460eaf87511a0e2990e2318f52f1 Mon Sep 17 00:00:00 2001 From: Alison Burgess Date: Mon, 28 Oct 2024 15:39:52 -0700 Subject: [PATCH] creation date --- production-vms/process_json.go | 2 +- production-vms/resources.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/production-vms/process_json.go b/production-vms/process_json.go index 7d8afff982e..3e1602ff18d 100644 --- a/production-vms/process_json.go +++ b/production-vms/process_json.go @@ -14,7 +14,7 @@ type VHD struct { ImageArch string } -// takes the json from vhd-publishing-info in order to get the VM information that we want +// takes the json from x in order to get the VM information that we want func extractVHDInformation(jsonDir *string) ([]VHD, error) { var vhdData []VHD diff --git a/production-vms/resources.go b/production-vms/resources.go index 19ce2b2dd38..fa2e63ac3ee 100644 --- a/production-vms/resources.go +++ b/production-vms/resources.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "production-vms/config" + "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" @@ -27,10 +28,12 @@ func createProductionVM(ctx context.Context, vhd VHD, subnetID string) error { return fmt.Errorf("cannot create NIC: %v", err) } + currentDate := time.Now().Format("2006-01-02") vmParameters := armcompute.VirtualMachine{ Location: to.Ptr(config.Config.Location), Tags: map[string]*string{ "SkipLinuxAzSecPack": to.Ptr("false"), + "CreationDate": to.Ptr(currentDate), }, Properties: &armcompute.VirtualMachineProperties{ HardwareProfile: &armcompute.HardwareProfile{