Skip to content

Commit 616ef09

Browse files
jnfclaude
andcommitted
fix(static-app): derive log group name statically
Using aws_lambda_function.oidc.logging_config[0].log_group as a for_each key fails at plan time because it's an apply-time attribute. Lambda always creates the log group at /aws/lambda/<function_name>, so we can construct the path from local.prefix instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 678e1a9 commit 616ef09

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tofu/modules/static-app/local.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ locals {
99
file_dir = "${path.module}/files"
1010
fqdn = "${var.subdomain}.${var.domain}"
1111
lambda_dir = "${path.module}/lambda"
12-
log_groups = [
13-
aws_lambda_function.oidc.logging_config[0].log_group
14-
]
12+
log_groups = toset(["/aws/lambda/${local.prefix}-oidc"])
1513
project = "cfa-static-apps"
1614
prefix = join("-", [local.project, var.environment])
1715
protected_prefixes = keys(local.apps)

0 commit comments

Comments
 (0)