Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(provisioner/terraform/tfparse): add support for built-in Terraform functions#16183

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 3 commits intomainfromcj/tfparse-funcs
Jan 20, 2025

Conversation

johnstcn
Copy link
Member

@johnstcnjohnstcn commentedJan 17, 2025
edited
Loading

Relates to#15977

Adds support for some functions intfparse (only functions that do not reference local files).
NOTE: for now, I'm importing trivy-iac. If we prefer to avoid a little dependency, I can do a little copying instead.

@johnstcnjohnstcn self-assigned thisJan 17, 2025
@johnstcnjohnstcn changed the titlefeat(tfparse): add support for built-in Terraform functionsfeat(provisioner/terraform/tfparse): add support for built-in Terraform functionsJan 17, 2025
Copy link
Contributor

@dannykoppingdannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM modulo a confusing comment

@johnstcnjohnstcn merged commit4ba0b39 intomainJan 20, 2025
31 checks passed
@johnstcnjohnstcn deleted the cj/tfparse-funcs branchJanuary 20, 2025 11:04
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 20, 2025
// We cannot support all available functions here, as the result of reading a file will be different
// depending on the execution environment.
safeFunctions = map[string]function.Function{
"abs": stdlib.AbsoluteFunc,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Post-merge thought: how do we align Terraform versions?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

From what I could tell it doesn't look like these functions change all that often.

However, f Terraform adds a new function in future, we'll need to add support for it ourselves. Then again, so willaquasec/trivy-iac. This is an unfortunate consequence of Terraform having made the bulk of their internal functions un-importable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Cool, I think we're fine here and we can just update the lib.
My only concern is if they change thesemantics of the functions between versions, but I doubt they'd do that.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@dannykoppingdannykoppingdannykopping approved these changes

@EmyrkEmyrkEmyrk approved these changes

Assignees

@johnstcnjohnstcn

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@johnstcn@dannykopping@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp