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: shorten role name for ssm housekeeper #3587

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions modules/runners/ssm-housekeeper.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,24 @@ resource "aws_lambda_permission" "ssm_housekeeper" {
}

resource "aws_iam_role" "ssm_housekeeper" {
name = "${var.prefix}-action-ssm-housekeeper-lambda-role"
name = "${var.prefix}-ssm-hk-lambda"
description = "Lambda role for SSM Housekeeper (${var.prefix})"
assume_role_policy = data.aws_iam_policy_document.lambda_assume_role_policy.json
path = local.role_path
permissions_boundary = var.role_permissions_boundary
tags = local.tags
}

resource "aws_iam_role_policy" "ssm_housekeeper" {
name = "${var.prefix}-ssm-housekeeper-policy"
name = "lambda-ssm"
role = aws_iam_role.ssm_housekeeper.name
policy = templatefile("${path.module}/policies/lambda-ssm-housekeeper.json", {
ssm_token_path = "arn:${var.aws_partition}:ssm:${var.aws_region}:${data.aws_caller_identity.current.account_id}:parameter${local.token_path}"
})
}

resource "aws_iam_role_policy" "ssm_housekeeper_logging" {
name = "${var.prefix}-lambda-logging"
name = "lambda-logging"
role = aws_iam_role.ssm_housekeeper.name
policy = templatefile("${path.module}/policies/lambda-cloudwatch.json", {
log_group_arn = aws_cloudwatch_log_group.ssm_housekeeper.arn
Expand Down
Loading