Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lambda-promtail): Add asterisk to log group ARN to allow writing to log streams #11095

Closed
wants to merge 1 commit into from

Conversation

gmeligio
Copy link

@gmeligio gmeligio commented Oct 31, 2023

What this PR does / why we need it:
The current ARN format in aws_iam_policy_document.lambda_cloudwatch which is aws_cloudwatch_log_group.this.arn doesn't allow to write logs because it's missing permissions for logs streams. Instead, an * should be appended to fix this permission like in "${aws_cloudwatch_log_group.this.arn}:*"

Which issue(s) this PR fixes:
No issue created.

Special notes for your reviewer:
Tested with

module "lambda_promtail" {
  source = "github.com/gmeligio/loki//tools/lambda-promtail?ref=promtail-loggroup-arn"

  bucket_names          = local.bucket_names
  lambda_promtail_image = "my-image"
  write_address         = var.write_address
  username              = var.username
  password              = var.password
}

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@gmeligio gmeligio requested a review from a team as a code owner October 31, 2023 16:05
@CLAassistant
Copy link

CLAassistant commented Oct 31, 2023

CLA assistant check
All committers have signed the CLA.

@gmeligio gmeligio force-pushed the promtail-loggroup-arn branch from 27f4bb2 to 24af78f Compare November 13, 2023 08:55
@gmeligio
Copy link
Author

Couldn't find the issue posted before. Found the existing #10908 that will be solved by #10909, with very similar changes to this PR. That PR will be enough, so it's better to close this one.

@gmeligio gmeligio closed this Nov 13, 2023
@gmeligio gmeligio deleted the promtail-loggroup-arn branch November 16, 2023 15:49
@gmeligio gmeligio restored the promtail-loggroup-arn branch November 16, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants