Commit Graph

29 Commits

Author SHA1 Message Date
Peter Rifel aadff94bc8
Use EC2's tag-on-create for various resources
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.
2020-07-08 15:26:50 -05:00
Peter Rifel 04a5ead08e Add cty field tags to Terraform structs 2020-04-05 21:18:02 -05:00
yuxiaobo 3b4cd437ed Correct spelling mistakes
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-11-13 17:28:28 +08:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Justin SB 3e33ac7682
Change code from glog to klog
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.
2019-05-06 12:54:51 -04:00
Justin Santa Barbara 1c3949bdfe Don't assume that we only have one subnet per AZ
I made a mistaken assumption in
dde2100a19 that we only had one subnet
per AZ, but as demonstrated in #5587 this was not the case.

What I was trying to achieve was not to include the cluster name, so
for the case of subnets this commit just uses the subnet name from the
cluster spec, which should be unique and stable.  That is hopefully at
least as meaningful.

Thankfully we hadn't released a version with the erroneous naming.

Fix #5587
2018-08-13 13:15:03 -04:00
Justin Santa Barbara dde2100a19 Update terraform output variables to be more stable
Try to explicitly build the output with the meaningful information; we
have it now in the tags.
2018-06-04 10:42:56 -07:00
Chris Snell 7df8736e25 Export outputs to aid with VPC peering in Terraform 2018-04-18 11:45:38 -05:00
Justin Santa Barbara dfb62a56ec Misc task code cleanups 2018-03-12 02:39:23 -04:00
Justin Santa Barbara a7f82a6380 Fix shared subnet/vpc tags
* Stop setting the Name tag on a shared subnet/vpc

* Stop setting the legacy KubernetesCluster tag on a shared subnet/vpc
that is new enough (>=1.6); we rely on the shared tags instead

* Set tags on shared subnets; i.e. we _do_ set the shared tag on a
shared subnet; that is important for ELBs

* Set tags on shared VPCs; i.e. we _do_ set the shared tag on a shared
VPC; that is not used but consistent with subnets.

* Add tests for shared subnet
2017-10-23 11:30:25 -04:00
Justin Santa Barbara 64f0920c8b Add integration tests for shared subnet & VPC 2017-07-24 10:37:07 -04:00
Justin Santa Barbara 3dfe48e5ae Wiring up lifecycle 2017-07-15 22:03:54 -04:00
Justin Santa Barbara 3e1ce4f950 Add Lifecycle 2017-07-15 22:01:03 -04:00
Justin Santa Barbara 383c2bf5ed Use explicit tag management in network tasks
This lets us use the new shared cluster tags, for shared networking
objects - in particular subnets.

We continue to add the existing tags also, for compatability. When we
add direct management of shared networks, we will likely address that.
2017-05-01 22:55:27 -04:00
Justin Santa Barbara 4abb58b0a6 Provide richer error messages for subnet CIDR validation
We just hit this in the real-world again, where a richer error message
would have been helpful.

Fix #1067
2017-04-19 23:27:38 -04:00
Justin Santa Barbara bf2edddb8d Merge pull request #1935 from justinsb/terraform_variable_output
Output variables from terraform, for reuse in a module
2017-02-24 09:06:20 -05:00
Justin Santa Barbara 2a34e6d00e Output variables from terraform, for reuse in a module
Issue #1026
2017-02-17 11:05:06 -05:00
Justin Santa Barbara 7d68f744f6 Initial support for cloudformation output 2017-02-17 10:59:16 -05:00
Justin Santa Barbara 3b9e90ba8d Ignore changes in subnet, security group ordering in ELB
Issue #1525
2017-01-20 11:08:30 -05:00
Justin Santa Barbara 8cdd8bb7da Discover existing ElasticIP & NatGateway without tagging
This should allow for round-tripping with terraform (which can't
practically do remote-resource tagging)
2017-01-08 01:52:15 -05:00
chrislovecnm 8fa2aac99f fixing more headers 2016-10-15 19:20:56 -06:00
Justin Santa Barbara bb01cf6ddd Make AWSCloud an interface, mock it out in tests
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
2016-09-24 15:52:52 -04:00
Yissachar Radcliffe 5217bd432d Add support for shared subnets 2016-09-16 12:17:44 -04:00
Justin Santa Barbara d427858477 Rename to kops
The upup tool is now called kops, and we have moved repos
2016-06-30 09:25:25 -04:00
Justin Santa Barbara b147091e5c upup: fix dryrun when adding a subnet
When adding a subnet in --dryrun, the ID might not be set during a Find
2016-06-15 14:03:19 -04:00
Justin Santa Barbara 6e7c4209de upup: Simple tag fixes to avoid comparison failures
We populate the actual expected tags in-place now
2016-06-10 11:33:33 -04:00
Justin Santa Barbara c826f46a60 upup: support for terraform on AWS
All seems good except for a bug with volume tagging
2016-06-08 12:19:15 -04:00
Justin Santa Barbara c72593fcf7 Use generators in tasks 2016-05-30 17:46:36 -04:00
Justin Santa Barbara caccb8953f UpUp: AWS support
Adds AWS support for both cloudup & nodeup.
Also cleaning up things found along the way!
2016-05-09 13:08:27 -04:00