Describe the bug
When using module version 6.9.0, Terraform planning fails with an invalid count argument error in the webhook module.
Error Message
Error: Invalid count argument
on .terraform/modules/github_runners_v4.github_runner/modules/webhook/webhook.tf line 41, in resource "aws_ssm_parameter" "runner_matcher_config":
41: count = local.total_chunks
The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use the -target argument to first apply only the resources that the count depends on.
Configuration
Using the module with standard configuration:
module "github_runner" {
source = "github-aws-runners/github-runner/aws"
version = "6.9.0"
# Standard configuration
aws_region = "us-east-1"
vpc_id = "vpc-xxx"
subnet_ids = ["subnet-xxx"]
github_app = {
key_base64 = "..."
id = "..."
client_id = "..."
client_secret = "..."
}
enable_organization_runners = true
runners_maximum_count = 400
# Using default matcher_config_parameter_store_tier = "Standard"
}
Environment
- Terraform Cloud (remote execution)
- Module version: 6.9.0
- AWS Provider: 5.77.0
Context
This appears related to PR #4792 which added support for multiple SSM parameters for large runner matcher configs. The PR description mentions fixing a for_each error, but the count issue in aws_ssm_parameter.runner_matcher_config still exists.
The local.total_chunks calculation depends on runtime values, making it impossible for Terraform to determine the count during plan phase.
Workaround
The suggested -target workaround doesn't work with Terraform Cloud's remote execution model.
Expected behavior
The module should be able to plan successfully without requiring staged applies. Either:
- Make
local.total_chunks computable at plan time
- Provide a variable to set a fixed chunk count
- Use a different approach that doesn't require dynamic count
Additional notes
This issue doesn't occur in v6.8.5 (before PR #4792). The multi-SSM parameter feature is useful for large configs, but breaks standard deployments.
Describe the bug
When using module version 6.9.0, Terraform planning fails with an invalid count argument error in the webhook module.
Error Message
Configuration
Using the module with standard configuration:
Environment
Context
This appears related to PR #4792 which added support for multiple SSM parameters for large runner matcher configs. The PR description mentions fixing a
for_eacherror, but thecountissue inaws_ssm_parameter.runner_matcher_configstill exists.The
local.total_chunkscalculation depends on runtime values, making it impossible for Terraform to determine the count during plan phase.Workaround
The suggested
-targetworkaround doesn't work with Terraform Cloud's remote execution model.Expected behavior
The module should be able to plan successfully without requiring staged applies. Either:
local.total_chunkscomputable at plan timeAdditional notes
This issue doesn't occur in v6.8.5 (before PR #4792). The multi-SSM parameter feature is useful for large configs, but breaks standard deployments.