Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runner_sg_id should return the correct SG ID for docker-autoscaler #1241

Closed
jonmcewen opened this issue Feb 10, 2025 · 4 comments · Fixed by #1249 or #1247
Closed

runner_sg_id should return the correct SG ID for docker-autoscaler #1241

jonmcewen opened this issue Feb 10, 2025 · 4 comments · Fixed by #1249 or #1247

Comments

@jonmcewen
Copy link
Contributor

Describe the bug

The output runner_sg_id returns the docker-machine worker SG ID or null. If runner_worker.type is set to "docker-autoscaler", the SG of the docker-autoscaler workers should be returned instead.

@jonmcewen
Copy link
Contributor Author

@kayman-mk hello. Is this an easy fix while you are refactoring in preparation for the removal of docker-machine?

@jonmcewen
Copy link
Contributor Author

For our use we could eventually switch to using runner_worker_egress_rules (a197e4f), but the output should still be fixed. Maybe something like this:

output "runner_sg_id" {
  description = "ID of the security group attached to the runner workers."
  value       = var.runner_worker.type == "docker-autoscaler" ? aws_security_group.docker_autoscaler[0].id : length(aws_security_group.docker_machine) > 0 ? aws_security_group.docker_machine[0].id : null
}

@kayman-mk
Copy link
Collaborator

Yes, it's a bug.

kayman-mk added a commit that referenced this issue Feb 20, 2025
…#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
kayman-mk pushed a commit that referenced this issue Feb 20, 2025
🤖 I have created a release *beep* *boop*
---


##
[9.0.2](9.0.1...9.0.2)
(2025-02-20)


### Bug Fixes

* allow changes to "runner_worker.max_jobs" for Docker Autoscaler
([#1221](#1221))
([0624391](0624391))
* always encrypt EBS volumes if the KMS key is given
([#1248](#1248))
([76ae944](76ae944)),
closes
[#1242](#1242)
* return security group id for docker-autoscaler in `runner_sg_id`
([#1249](#1249))
([9c573b6](9c573b6)),
closes
[#1241](#1241)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: cattle-ops-releaser-2[bot] <134548870+cattle-ops-releaser-2[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@jonmcewen
Copy link
Contributor Author

Yes, it's a bug.

Thanks for fixing @kayman-mk !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants