This updates DHCP Options, EBS Volumes, InternetGateways, SecurityGroups, Subnets, and VPCs to specify tags at creation-time rather than calling ec2.CreateTags after the resource was created.
I didn't update NATGateway because it adds additional legacy tags that should be evaluated for whether or not they're needed.
I also didn't update SSHKey because it currently isn't tagged at all but it would be good for us to tag down the road.
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 PR adds the base tags to DHCP Options, IGW, and Route Tables.
These components are not tagged correctly, and this can cause issues
with deletion. Name tags are not added to shared resources, as we allow
shared resources to have maintained names. A owned/shared tags with the
syntax "kubernetes.io/cluster/$CLUSTERNAME" = "owned" is added to the
resources as well. We are maintaining the Name tag value for private
route tables, as these resources do not use the standard value.
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
We currently don't do discovery of existing resources when running with
Terraform output, but when using a shared VPC this is wrong - we need to
reuse the existing gateway.
Directly discover the existing gateway. We might need to do full
discovery later, but for now this is sufficient.
Fix#181
By reusing the subnet & security groups, we are able to skip the ELB
steps of the upgrade procedure. The new cluster also has the same
identity as the old cluster for security groups, so we don't need to
reconfigure ELB etc.
Fixes#175Fixes#174
A lot of work that had to happen here:
* Better reuse of config
* Ability to mark VPC & InternetGateway as shared
* Find models relative to the executable, to run from a dir-per-cluster
Fixes#95