We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog. That
will happen when we update to k8s 1.13.
This commit fixes the result from `go vet k8s.io/kops/upup/pkg/fi/cloudup/awstasks`:
upup/pkg/fi/cloudup/awstasks/iamrole.go:80: Errorf format %q has arg e.Name of wrong type *string
upup/pkg/fi/cloudup/awstasks/iamrole.go:88: Errorf format %q has arg e.Name of wrong type *string
upup/pkg/fi/cloudup/awstasks/iamrole.go:93: Errorf format %q has arg e.Name of wrong type *string
upup/pkg/fi/cloudup/awstasks/iamrole.go:98: Errorf format %q has arg e.Name of wrong type *string
upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go:78: Errorf format %q has arg e.Name of wrong type *string
upup/pkg/fi/cloudup/awstasks/load_balancer.go:115: Warningf format %q has arg lb.LoadBalancerName of wrong type *string
upup/pkg/fi/cloudup/awstasks/load_balancer.go:328: Verbose.Info call has possible formatting directive %+v
upup/pkg/fi/cloudup/awstasks/load_balancer.go:382: Verbose.Infof format %q has arg actual.LoadBalancerName of wrong type *string
upup/pkg/fi/cloudup/awstasks/natgateway.go:189: Errorf format %q has arg id of wrong type *string
upup/pkg/fi/cloudup/awstasks/natgateway.go:193: Verbose.Infof format %q has arg id of wrong type *string
upup/pkg/fi/cloudup/awstasks/natgateway.go:197: Errorf format %q has arg id of wrong type *string
upup/pkg/fi/cloudup/awstasks/natgateway.go:283: Errorf format %q has arg e.Name of wrong type *string
This uses an explicit deletion approach, where we set the policy to
empty, and use that to signal that the policy should be deleted. This
is acceptable because IAM policies can't be empty anyway.
We probably should use a tag-based "garbage-collection" approach, but
IAM objects can't be tagged, so we're pretty much always going to be
doing something name based.
Fix#1642
Beginnings of a mock for the AWSCloud, so that hopefully we aren't
calling out to AWS at all in the tests. We will likely start mocking
the actual EC2 APIs in future, but this seems a good starting point.
Fix#425