Skip to content

Commit a4de308

Browse files
authored
Add CreationTime details in access_keys column in table azure_storage_account closes #964 (#965)
1 parent c408fce commit a4de308

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

azure/table_azure_storage_account.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package azure
33
import (
44
"context"
55
"strings"
6+
"time"
67

78
"github.com/Azure/azure-sdk-for-go/profiles/latest/storage/mgmt/storage"
89
"github.com/Azure/azure-sdk-for-go/profiles/preview/preview/monitor/mgmt/insights"
@@ -791,7 +792,7 @@ func getAzureStorageAccountTableProperties(ctx context.Context, d *plugin.QueryD
791792
if accountData.Account.Sku.Tier == "Premium" && accountData.Account.PrimaryEndpoints.Table == nil {
792793
return nil, nil
793794
}
794-
795+
795796
// Blob is not supported for the account if storage type is FileStorage
796797
if accountData.Account.Kind == "FileStorage" {
797798
return nil, nil
@@ -919,6 +920,9 @@ func listAzureStorageAccountAccessKeys(ctx context.Context, d *plugin.QueryData,
919920
if key.Permissions != "" {
920921
keyMap["Permissions"] = key.Permissions
921922
}
923+
if key.CreationTime != nil {
924+
keyMap["CreationTime"] = key.CreationTime.ToTime().Format(time.RFC3339)
925+
}
922926
keysMap = append(keysMap, keyMap)
923927
}
924928
}

0 commit comments

Comments
 (0)