terraform-dcos
                                
                                 terraform-dcos copied to clipboard
                                
                                    terraform-dcos copied to clipboard
                            
                            
                            
                        Multi-AZ AWS setup
The number of AZ used is based on the number of master nodes, which is quite opinionated. I'm definitively open to feedback.
I think the assumption is pretty okay.
there is a bug for private/public agents subnets, it should check the masters count but it check agents ones
master and agents .tf files need to use element in subnet_id as per subnet_id = "${element(aws_subnet.public.*.id,count.index)}" and those two merge conflicts resolved then PR is good to be merged
Hey, thanks for the feedback. I’m pushing a fix later today.
also can you make it optional please, thanks and master are not recommend to be spread around multi-az, they need to stay in one AZ
@rimusz Based on this document, I was confident that masters could be spread around different AZ.
Do you want a "spread in AZ" optional switch that either deploy all master to a single zone masters like described here, or cross zone masters ?
Also, the smoke test is failing on TeamCity but I can't access it.
it is not really recommended to spread masters across multi-az (is more harm than good).
bootstrap and master can stay in one zone by default e.g. ${aws_subnet.public.0.id}" and the agents then can be spread across all available zones, this what exactly I have made for the custom terraform setup based on this one repo.
if masters stay in one zone, and agents are spread across multi-az then I think we do not need optional one.
I cannot access teamcity as well
please remove count = "${var.num_of_masters}" from the private-/public-agent.tf files, so agent can be spread on all available zones in the region
LGTM cc @bernadinm I have tested such setup, not sure why CI fails there
@rimusz CI fails because the CI script is not yet merged but the PR triggers are activated. We need to merge this: https://github.com/dcos/terraform-dcos/pull/47
@bernadinm can we merge this one? I been using this solution without isues