Skip to content

Commit f68d65b

Browse files
committed
Merge branch 'release/v0.8.1' into master
2 parents 64ec531 + 5868af4 commit f68d65b

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.8.1] - 2020-12-08
11+
### Changed
12+
- Policy is missing for streaming logs to cloudwatch #388
13+
1014
## [0.8.0] - 2020-12-08
1115

1216
### Changed
17+
1318
- Examples upgraded to Terraform 13 (#372)
1419
### Added
20+
1521
- Streaming runner logs to cloudwatch #375
1622

1723
## [0.7.0] - 2020-12-04
24+
1825
### Changed
26+
1927
- Small clarifications in the README #368 @lrytz
2028

2129
### Added
30+
2231
- Allow operator to pass in a list of managed IAM policy ARNs for the runner role #361 @jpalomaki
2332
- expand options for sourcing lambda to include S3 #292 @eky5006
2433

@@ -96,7 +105,8 @@ terraform import module.runners.module.webhook.aws_cloudwatch_log_group.webhook
96105

97106
- First release.
98107

99-
[unreleased]: https://github.com/philips-labs/terraform-aws-github-runner/compare/v0.8.0..HEAD
108+
[unreleased]: https://github.com/philips-labs/terraform-aws-github-runner/compare/v0.8.1..HEAD
109+
[0.8.1]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.8.0..v0.8.1
100110
[0.8.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.7.0..v0.8.0
101111
[0.7.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.6.0..v0.7.0
102112
[0.6.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.5.0..v0.6.0

modules/runners/logging.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,14 @@ resource "aws_cloudwatch_log_group" "runners" {
1818
retention_in_days = var.logging_retention_in_days
1919
tags = local.tags
2020
}
21+
22+
resource "aws_iam_role_policy" "cloudwatch" {
23+
count = var.enable_ssm_on_runners ? 1 : 0
24+
name = "CloudWatchLogginAndMetrics"
25+
role = aws_iam_role.runner.name
26+
policy = templatefile("${path.module}/policies/instance-cloudwatch-policy.json",
27+
{
28+
ssm_parameter_arn = aws_ssm_parameter.cloudwatch_agent_config_runner[0].arn
29+
}
30+
)
31+
}

modules/runners/policies-runner.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ resource "aws_iam_role_policy_attachment" "managed_policies" {
4545
role = aws_iam_role.runner.name
4646
policy_arn = element(var.runner_iam_role_managed_policy_arns, count.index)
4747
}
48+
49+
// see also logging.tf for logging and metrics policies
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Effect": "Allow",
6+
"Action": [
7+
"cloudwatch:PutMetricData",
8+
"ec2:DescribeVolumes",
9+
"ec2:DescribeTags",
10+
"logs:PutLogEvents",
11+
"logs:DescribeLogStreams",
12+
"logs:DescribeLogGroups",
13+
"logs:CreateLogStream"
14+
],
15+
"Resource": "*"
16+
},
17+
{
18+
"Effect": "Allow",
19+
"Action": [
20+
"ssm:GetParameter"
21+
],
22+
"Resource": "${ssm_parameter_arn}/*"
23+
}
24+
]
25+
}

0 commit comments

Comments
 (0)