-
Notifications
You must be signed in to change notification settings - Fork 262
modules,steps: enable existing vpc #3231
Conversation
This commit enables the existing VPC functionality that was already built into the installer by fixing several bugs related to the processing of AWS private zone IDs.
| } | ||
|
|
||
| resource "aws_route53_zone" "tectonic_int" { | ||
| count = "0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this resource was never used :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we're not doing split horizon anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still have split horizon, it was just moved somewhere else and this was never cleaned up: https://github.com/coreos/tectonic-installer/blob/master/steps/topology/aws/main.tf#L22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Makes sense then. All cool!
| # TNC | ||
| output "private_zone_id" { | ||
| value = "${aws_route53_zone.tectonic_int.id}" | ||
| value = "${join("", aws_route53_zone.tectonic_int.*.zone_id)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if you considered to use a ternary here to return either tectonic_aws_external_private_zone or aws_route53_zone.tectonic_int.*.zone_id then it would be transparent for consumers steps, so the private_zone_id input wouldn't need to do the check and could keep just private_zone_id = "${data.terraform_remote_state.topology.private_zone_id}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I did, but I decided against it for consistency and clarity. Otherwise, I foresee a near future where someone forgets that this variable is already the result of a ternary and adds another ternary on top. It wouldn't hurt the output but it is muddy.
|
Nice! Thanks for putting this back. LGTM once is green. |
|
I just tested this and deploying into an existing VPC worked except that my ELBs and masters have public IPs despite being in private subnets (autoassign public IP is off). The cluster seemed healthy (all instances |
|
@dcondomitti yes please do; that is a separate issue |
trawler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The last consumer of these variables was removed by 4360905 (modulus,steps: enable existing vpc, 2018-05-16, coreos/tectonic-installer#3231). Now the route53 module only creates aws_route53_record resources, and they don't support tags [1]. [1]: https://www.terraform.io/docs/providers/aws/r/route53_record.html
This commit enables the existing VPC functionality that was already
built into the installer by fixing several bugs related to the
processing of AWS private zone IDs.
Thanks to @yifan-gu's recent changes in #3219.
I tested with ~10 clusters and was able to bring up clusters in existing VPC each time.
cc @yifan-gu @enxebre