fix(runners): fix type mismatch in pool role conditional#5156
Merged
Conversation
The conditional for the runner role in pool.tf returned inconsistent types: the true branch produced an object with a single 'arn' attribute while the false branch returned the full aws_iam_role resource (16 attributes). Terraform requires both branches to have consistent types. Move the conditional inside the object so both branches produce a string for the 'arn' key. Fixes type error introduced in #4875. Signed-off-by: Brend Smits <brend.smits@philips.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Brend-Smits
added a commit
to philips-forks/terraform-aws-github-runner
that referenced
this pull request
Jun 11, 2026
The conditional for the runner role in pool.tf returned inconsistent types: the true branch produced an object with a single 'arn' attribute while the false branch returned the full aws_iam_role resource (16 attributes). Terraform requires both branches to have consistent types. Move the conditional inside the object so both branches produce a string for the 'arn' key. Fixes type error introduced in github-aws-runners#4875. Upstream-PR: github-aws-runners#5156
edersonbrilhante
approved these changes
Jun 11, 2026
edersonbrilhante
pushed a commit
that referenced
this pull request
Jun 11, 2026
🤖 I have created a release *beep* *boop* --- ## [7.7.1](v7.7.0...v7.7.1) (2026-06-11) ### Bug Fixes * **runners:** fix type mismatch in pool role conditional ([#5156](#5156)) ([60de50f](60de50f)) --- 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: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The conditional for the runner role in
modules/runners/pool.tf(introduced in #4875) returns inconsistent types:{ arn = "..." }(1 attribute)aws_iam_role.runner[0](16 attributes includingassume_role_policy,name, etc.)Terraform requires both branches of a conditional to have consistent types. This causes a type error at plan time when
override_runner_role = false(the default).Fix
Move the conditional inside the object so both branches produce a string:
This is consistent with how
scale-up.tf(line 123) already handles the same conditional.Testing
terraform plansucceeds withoverride_runner_role = false(default)object({ arn = string }), so only the.arnattribute is needed