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

add JsonnetNatevieFuncs #185

Merged
merged 1 commit into from
Jun 13, 2024
Merged

add JsonnetNatevieFuncs #185

merged 1 commit into from
Jun 13, 2024

Conversation

fujiwara
Copy link
Owner

provides native functions for go-jsonnet.

funcs, _ := tfstate.JsonnetNativeFuncs(ctx, "", tfstateURL)
vm := jsonnet.MakeVM()
for _, fn := range funcs {
    vm.NativeFunction(fn)
}
local tfstate = std.native("tfstate");
{
  arn: tfstate("aws_acm_certificate.main.arn"), // string
  subject_alternative_names: tfstate("aws_acm_certificate.main.subject_alternative_names"), // array
  subject_alternative_names_0: tfstate("aws_acm_certificate.main.subject_alternative_names[0]"), // string
  tags: tfstate("aws_acm_certificate.main.tags"), // object
  tags_env: tfstate("aws_acm_certificate.main.tags").env, // string
}

provides native functions for go-jsonnet.
@fujiwara fujiwara merged commit 626ddff into main Jun 13, 2024
4 checks passed
@fujiwara fujiwara deleted the jsonnet branch June 13, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant