Skip to content

Commit

Permalink
fix(terraform): evaluate resource with double underscore (#6642)
Browse files Browse the repository at this point in the history
* .

* .

* We are operating under the assumption that the function name will start and end with "__", ensuring that I have at least two of them

* We are operating under the assumption that the function name will start and end with "__", ensuring that I have at least two of them
  • Loading branch information
lirshindalman authored Aug 12, 2024
1 parent 6ab61dd commit 2a9f6aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@ def terraform_try(*args: Any) -> Any:


def evaluate(input_str: str) -> Any:
if "__" in input_str:
count_underscores = input_str.count("__")
# We are operating under the assumption that the function name will start and end with "__", ensuring that we have at least two of them
if count_underscores >= 2:
logging.debug(f"got a substring with double underscore, which is not allowed. origin string: {input_str}")
return input_str
if input_str == "...":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pass:
fail:
- "aws_sqs_queue.sqs"

0 comments on commit 2a9f6aa

Please sign in to comment.