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(query): allow for string interpolation in lambda_iam_invokefunction_miscongifured regex #7335

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

owenjonesuob
Copy link

The current regex implies that we should have something like:

data "aws_iam_policy_document" "example" {
  statement {
    actions = ["lambda:InvokeFunction"]
    resources = [
      aws_lambda_function.example.arn,
      aws_lambda_function.example.arn:*   # <-- this is not legal syntax
    ]
  }
}

In fact we would need something like this instead, using Terraform's string interpolation syntax:

data "aws_iam_policy_document" "example" {
  statement {
    actions = ["lambda:InvokeFunction"]
    resources = [
      aws_lambda_function.example.arn,
      "${aws_lambda_function.example.arn}:*"
    ]
  }
}

I've amended the regex to match the corrected example.


I submit this contribution under the Apache-2.0 license.

@owenjonesuob owenjonesuob requested a review from a team as a code owner February 12, 2025 17:40
@github-actions github-actions bot added community Community contribution terraform Terraform query aws PR related with AWS Cloud labels Feb 12, 2025
@owenjonesuob owenjonesuob changed the title Allow for string interpolation in lambda_iam_invokefunction_miscongifured regex fix(query): allow for string interpolation in lambda_iam_invokefunction_miscongifured regex Feb 12, 2025
@github-actions github-actions bot added the query New query feature label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws PR related with AWS Cloud community Community contribution query New query feature terraform Terraform query
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant