Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ResourceGroups lastUpdated time format #599

Merged
merged 8 commits into from
Nov 3, 2021

Conversation

dmurray-lacework
Copy link
Collaborator

Summary

The resourceGroups last updated type is now of type lacework.Epoch.
The cli table output for resource group show <id> lastUpdated is now RFC3339
The cli output for resource group show <id> --json & resource group list --json now shows lastUpdated as RFC3339

How did you test this change?

Manually run:
resource group show <id>
resource group show <id> --json
resource group list --json

Issue

https://lacework.atlassian.net/browse/ALLY-659

Usage:

Before

❯ lacework rg show <ID> --json
{
  "resource_group": {
  ...
      ],
      "lastUpdated": 1635519644365,
      "updatedBy": "[email protected]"
    }


❯ lacework rg show <ID>
                        RESOURCE ID                          TYPE               NAME                STATE    DEFAULT  
-----------------------------------------------------------+------+------------------------------+---------+----------
...
                RESOURCE GROUP PROPS                
----------------------------------------------------
    DESCRIPTION                                     
    UPDATED BY     [email protected]    
    LAST UPDATED   1635519644365                    
    ACCOUNT IDS    *         

After

❯ lacework rg show <ID> --json
{
  "resource_group": {
  ...
      ],
      "lastUpdated": "2021-10-29T15:00:44Z",
      "updatedBy": "[email protected]"
    },


❯ lacework rg show <ID>       
                        RESOURCE ID                          TYPE               NAME                STATE    DEFAULT  
-----------------------------------------------------------+------+------------------------------+---------+----------
  ...
                RESOURCE GROUP PROPS                
----------------------------------------------------
    DESCRIPTION                                     
    UPDATED BY     [email protected]    
    LAST UPDATED   2021-10-29T15:00:44Z             
    ACCOUNT IDS    *    

@dmurray-lacework dmurray-lacework requested a review from a team November 2, 2021 15:00
Copy link
Contributor

@afiune afiune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments but the code looks good and runs pretty nice!

tenor-34429494

api/resource_groups.go Outdated Show resolved Hide resolved
api/resource_groups_aws.go Show resolved Hide resolved
lwtime/epoch.go Show resolved Hide resolved
@dmurray-lacework dmurray-lacework merged commit 506954f into main Nov 3, 2021
@dmurray-lacework dmurray-lacework deleted the dmurray-lacework/ALLY-659 branch November 3, 2021 19:58
@lacework-releng lacework-releng mentioned this pull request Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants