Skip to content

Commit

Permalink
creation date
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisonB319 committed Oct 28, 2024
1 parent 8b368dd commit 60b153b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion production-vms/process_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions production-vms/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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{
Expand Down

0 comments on commit 60b153b

Please sign in to comment.