Skip to content

Commit 9c573b6

Browse files
authored
fix: return security group id for docker-autoscaler in runner_sg_id (#1249)
## Description For the `docker-autoscaler` workers the security group id was not returned, which is added by this PR. According to the description of the variable, we can expect it for every worker type creating separate instances. Fixes #1241
1 parent 76ae944 commit 9c573b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

outputs.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ output "runner_agent_sg_id" {
3939
}
4040

4141
output "runner_sg_id" {
42-
description = "ID of the security group attached to the docker machine runners."
43-
value = length(aws_security_group.docker_machine) > 0 ? aws_security_group.docker_machine[0].id : null
42+
description = "ID of the security group attached to the worker instances (docker machine/autoscaler runners)."
43+
value = var.runner_worker.type == "docker-autoscaler" ? aws_security_group.docker_autoscaler[0].id : (var.runner_worker.type == "docker+machine" ? aws_security_group.docker_machine[0].id : null)
4444
}
4545

4646
output "runner_eip" {

0 commit comments

Comments
 (0)