Skip to content

Delete resources older than X days #81

Open
@FlorentClarret

Description

Hello and thanks for this useful tool!

My goal is to drop resources that are older than X days, following this part of the docs.

I tested with VirtualMachine and it does not work. I'm not familiar with this repo but I think that's because TimeCreated is not mapped here:

resources = append(resources, &VirtualMachine{
BaseResource: &BaseResource{
Region: g.Location,
ResourceGroup: &opts.ResourceGroup,
SubscriptionID: &opts.SubscriptionID,
},
client: client,
Name: g.Name,
Tags: g.Tags,
})

I had a quick look at the azure SDK and I'm not even sure they expose this field, I only saw it for the Disk resource.

Would it be possible to add this feature? I'd be happy to help if needed!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions