Skip to content

Webhook depreciation warning #5159

Description

@lionslair

I just wanted to give some feedback. Since version 7.6.0 I started receiving this warning on terraform apply

╷
│ Warning: Deprecated value used
│ 
│   on .terraform/modules/github-runner/modules/webhook/direct/outputs.tf line 10, in output "webhook":
│   10:     role      = aws_iam_role.webhook_lambda
│ 
│   The deprecation originates from module.github-runner.module.webhook.module.direct[0].aws_iam_role.webhook_lambda.inline_policy
│ 
│ inline_policy is deprecated. Use the aws_iam_role_policy resource instead. If Terraform should exclusively manage all inline policy associations (the current behavior of this
│ argument), use the aws_iam_role_policies_exclusive resource as well.
│ 
│ (and one more similar warning elsewhere)

From what I can work out it is related to what is in the generated .terraform/github-runner/modules/webhook/outputs.tf

output "role" {
  value = !var.eventbridge.enable ? module.direct[0].webhook.role : module.eventbridge[0].webhook.role
}

to

role = {
  arn  = aws_iam_role.main.arn
  name = aws_iam_role.main.name
  id   = aws_iam_role.main.id
}

Not sure about making changes to the generated file though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions