Skip to content

feat(logging): add log_class parameter to runner log files configuration#5036

Open
Brend-Smits wants to merge 2 commits intomainfrom
feat/specify-log-classes
Open

feat(logging): add log_class parameter to runner log files configuration#5036
Brend-Smits wants to merge 2 commits intomainfrom
feat/specify-log-classes

Conversation

@Brend-Smits
Copy link
Contributor

This pull request updates the logging configuration by introducing support for the log_class property, allowing log groups to be created with either the STANDARD or INFREQUENT_ACCESS class. The change is applied throughout the configuration to ensure log groups and log files can specify their class, defaulting to STANDARD if not set.

Logging configuration enhancements:

  • Added a log_class property (defaulting to "STANDARD") to the runner_log_files and multi_runner_config variables in variables.tf, modules/runners/variables.tf, and modules/multi-runner/variables.tf to allow specifying the log group class. [1] [2] [3]
  • Updated the local log file definitions in modules/runners/logging.tf to include the log_class property for each log file, defaulting to "STANDARD".
  • Modified the CloudWatch log group resource in modules/runners/logging.tf to use the specified log_class when creating log groups, and refactored the logic to group log files by both name and class.

Documentation improvements:

  • Enhanced the description of the runner_log_files variable to document the new log_class property and its valid values.

@Brend-Smits Brend-Smits requested review from a team as code owners February 16, 2026 10:44
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@npalm
Copy link
Member

npalm commented Mar 3, 2026

@Brend-Smits did you run a quick check on the multi-runner as well default example?

Please can you also update all other log groups managed by the module? See https://github.com/github-aws-runners/terraform-aws-github-runner/search?q=repo%3Agithub-aws-runners%2Fterraform-aws-github-runner%20path%3A*.tf%20resource%20%22aws_cloudwatch_log_group%22&type=code

@Brend-Smits
Copy link
Contributor Author

@Brend-Smits did you run a quick check on the multi-runner as well default example?

Please can you also update all other log groups managed by the module? See github-aws-runners/terraform-aws-github-runner/search?type=code (repo:github-aws-runners/terraform-aws-github-runner path:*.tf resource "aws_cloudwatch_log_group")

Yes I tested this with the multi runner example and it works as advertised. As expected, when you change the log class for existing log groups, it forces a replacement on the whole group.

I also updated it for all the other modules.

@Brend-Smits Brend-Smits force-pushed the feat/specify-log-classes branch from bc49180 to c70da8b Compare March 6, 2026 12:50
Extends the log_class parameter to all CloudWatch log groups managed by
the module, allowing users to set INFREQUENT_ACCESS class to reduce costs.

Log groups updated:
- runner-binaries-syncer (syncer)
- ami-housekeeper
- runners (scale-down, scale-up, ssm-housekeeper)
- runners/pool
- webhook/direct
- webhook/eventbridge (webhook, dispatcher)
- lambda module (shared)
- termination-watcher
- multi-runner (passthrough to all submodules)

Defaults to STANDARD for backward compatibility.
@Brend-Smits Brend-Smits force-pushed the feat/specify-log-classes branch from c70da8b to 5820b11 Compare March 6, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants