Commit 0326c6d
committed
fix(logging): preserve count-based log groups to avoid breaking change
BREAKING CHANGE AVOIDED: The previous implementation changed
aws_cloudwatch_log_group.gh_runners from count to for_each, which would
cause Terraform to destroy and recreate all existing CloudWatch log
groups on upgrade. This could result in loss of log data.
This commit reverts to the count-based approach using parallel
loggroups_names and loggroups_classes lists, preserving the existing
Terraform state addresses (e.g. aws_cloudwatch_log_group.gh_runners[0])
while still supporting the new log_class parameter.
Changes:
- logging.tf: Use loggroups_names + loggroups_classes parallel lists
instead of a for_each on objects, keeping count-based resource indexing
- logging.tf: Remove redundant try() around l.log_class since the
variable type already defaults it to "STANDARD"
- job-retry.tf: Add missing log_class propagation to job-retry config
- variables.tf: Update runner_log_files description to document log_class
- examples/multi-runner: Add log_class parameter to example
Signed-off-by: Brend Smits <brend.smits@philips.com>1 parent e622a04 commit 0326c6d
File tree
4 files changed
+18
-6
lines changed- examples/multi-runner
- modules/runners
4 files changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
| |||
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
59 | | - | |
60 | | - | |
| 67 | + | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | | - | |
| 71 | + | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
| 499 | + | |
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
| |||
0 commit comments