jckuester / awsweeper

A tool for cleaning your AWS account
Mozilla Public License 2.0
469 stars 45 forks source link

panic: interface conversion: interface {} is *string, not *time.Time #31

Closed KasteM34 closed 5 years ago

KasteM34 commented 5 years ago

Hello,

I'm running awsweeper (macOS Mojave 10.14.1) with a config.yml with inside :

aws_ami:

i got an error :

---

panic: interface conversion: interface {} is *string, not *time.Time

goroutine 1 [running]:
github.com/cloudetc/awsweeper/resource.DeletableResources(0xc000618958, 0x7, 0x32e4280, 0xc0005bf100, 0xc0005bf100, 0x0, 0x0, 0xc00071ae80, 0xc000a5d400)
    /home/janck/git/github.com/cloudetc/awsweeper/resource/resource.go:37 +0x71a
github.com/cloudetc/awsweeper/command.(*Wipe).Run(0xc000a892c0, 0xc00028c2d0, 0x1, 0x1, 0xc000a89230)
    /home/janck/git/github.com/cloudetc/awsweeper/command/wipe.go:65 +0x1ea
github.com/mitchellh/cli.(*CLI).Run(0xc00028e8c0, 0xc000a89200, 0x3d13023, 0x4)
    /home/janck/go/pkg/mod/github.com/mitchellh/cli@v0.0.0-20180117155440-518dc677a1e1/cli.go:255 +0x207
github.com/cloudetc/awsweeper/command.WrappedMain(0xc00003a0b8)
    /home/janck/git/github.com/cloudetc/awsweeper/command/wrapped_main.go:92 +0x753
main.main()
    /home/janck/git/github.com/cloudetc/awsweeper/main.go:14 +0x22

other supported resources works fine.

jckuester commented 5 years ago

I see, the AWS API is inconsistent here. The creation date of an AMI is returned as string and not as *time.Time (which I expected). It seems to be the only case for this resource type. Will do a fix.

jckuester commented 5 years ago

Fixed in: https://github.com/cloudetc/awsweeper/releases/tag/v0.3.2