File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
locals {
2
- asg_tags = [" ${ null_resource. tags_as_list_of_maps . * . triggers } " ]
3
- cluster_security_group_id = " ${ var . cluster_security_group_id == " " ? aws_security_group . cluster . id : var . cluster_security_group_id } "
4
- worker_security_group_id = " ${ var . worker_security_group_id == " " ? aws_security_group . workers . id : var . worker_security_group_id } "
2
+ asg_tags = [" ${ null_resource. tags_as_list_of_maps . * . triggers } " ]
3
+
4
+ # Followed recommendation http://67bricks.com/blog/?p=85
5
+ # to workaround terraform not supporting short circut evaluation
6
+ cluster_security_group_id = " ${ coalesce (join (" " , aws_security_group. cluster . * . id ), var. cluster_security_group_id )} "
7
+
8
+ worker_security_group_id = " ${ coalesce (join (" " , aws_security_group. workers . * . id ), var. worker_security_group_id )} "
5
9
workstation_external_cidr = " ${ chomp (data. http . workstation_external_ip . body )} /32"
6
10
workstation_cidr = " ${ coalesce (var. workstation_cidr , local. workstation_external_cidr )} "
7
11
You can’t perform that action at this time.
0 commit comments