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

Cannot use functions with "with" elements #628

Open
ibaraki-douji opened this issue Dec 13, 2024 · 0 comments
Open

Cannot use functions with "with" elements #628

ibaraki-douji opened this issue Dec 13, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ibaraki-douji
Copy link

Describe the bug
I cannot use any functions from the HCL when using a with element

Error: failed to load workspace: Internal Error: Failed to decode mod: local.table.dashboard_only_aws_anonymous_table_1 has invalid parameter config: unexpected runtime dependency expression type

Powerpipe version (powerpipe -v)
Example: v1.0.1

To reproduce

table {
        title = "test2"

        sql = "select $1"
        args = [length(with.test.rows)] # using "with.test.rows[*].value" is the same
    }

    

    with "test" {
        sql = "select $1::text[] as value"
        args = [
            []
        ]
    }

Run the above .pp

Expected behavior
It should work, and returns a value (in this case 0 as there is 0 rows)

Additional context
I tried length([]) and this works.

And i think the self.input.xxx also is not working with functions

@ibaraki-douji ibaraki-douji added the bug Something isn't working label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants