Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modules/aws/vpc/vpc-public: Tag new EIPs with tectonicClusterID
The tags I'm adding lack Name and kubernetes.io/cluster/${var.cluster_name}, which are part of the tagging for most other resources created in this module. But Chance, pointed out that Kubernetes doesn't manage EIPs, so we don't need to set the kubernetes.io tags at all. And naming EIPs doesn't add much information; after setup completes you can get all the naming information you need from the associated NAT gateway. Setting the cluster ID makes it easier for us to reap leaked resources after tearing down a cluster (for example, if a test which creates and deletes a cluster is evicted before completing deletion). And passing extra_tags through allows us to set expiration dates and such for our new resources, which will also help with cleanup. Not related to this commit, but for future reference Chance elaborated on the use of 'shared' for VPC-related resource. Those are from e4cd883a (modules/aws/vpc: set shared rather than owned for VPC/Subnets, 2017-05-03, coreos/tectonic-installer#469), and Chance's use-case is: 1. User creates a new cluster with the installer, not thinking about VPC reuse. 2. User creates a second cluster sharing the same VPC and subnets. Ideally those users would create the VPCs and subnets externally with shared tags and pass them through to the installer by ID. Then it would be clear that the installer did not create them, and you could safely delete either cluster without affecting the shared resources. But for users without the foresight to create shared VPCs, having terraform create "shared" VPCs directly gives you similar results (as long as you don't delete the first cluster and break everything ;).
- Loading branch information