{"id":31677247,"url":"https://github.com/tf-libsonnet/libgenerator","last_synced_at":"2025-10-08T05:07:36.794Z","repository":{"id":64874536,"uuid":"578778902","full_name":"tf-libsonnet/libgenerator","owner":"tf-libsonnet","description":"Code generator for Jsonnet Terraform libraries.","archived":false,"fork":false,"pushed_at":"2025-10-02T22:29:21.000Z","size":255,"stargazers_count":10,"open_issues_count":22,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-03T00:22:44.681Z","etag":null,"topics":["jsonnet","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tf-libsonnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-15T21:31:51.000Z","updated_at":"2025-08-19T11:15:53.000Z","dependencies_parsed_at":"2023-02-17T02:16:33.164Z","dependency_job_id":"39f156ab-738b-4856-81af-f9448ca69eb8","html_url":"https://github.com/tf-libsonnet/libgenerator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tf-libsonnet/libgenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tf-libsonnet%2Flibgenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tf-libsonnet%2Flibgenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tf-libsonnet%2Flibgenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tf-libsonnet%2Flibgenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tf-libsonnet","download_url":"https://codeload.github.com/tf-libsonnet/libgenerator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tf-libsonnet%2Flibgenerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278891753,"owners_count":26063858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jsonnet","terraform"],"created_at":"2025-10-08T05:02:22.541Z","updated_at":"2025-10-08T05:07:36.788Z","avatar_url":"https://github.com/tf-libsonnet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003etf-libsonnet Generator\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tf-libsonnet/libgenerator/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"LICENSE\" src=\"https://img.shields.io/github/license/tf-libsonnet/libgenerator?style=for-the-badge\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/tf-libsonnet/libgenerator/actions/workflows/lint-test-and-generate.yml?query=branch%3Amain\"\u003e\n    \u003cimg alt=\"main branch CI\" src=\"https://img.shields.io/github/actions/workflow/status/tf-libsonnet/libgenerator/lint-test-and-generate.yml?branch=main\u0026logo=github\u0026label=CI\u0026style=for-the-badge\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/tf-libsonnet/libgenerator/releases/latest\"\u003e\n    \u003cimg alt=\"latest release\" src=\"https://img.shields.io/github/v/release/tf-libsonnet/libgenerator?style=for-the-badge\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n`tf-libsonnet/libgenerator` is a code generator for Jsonnet Terraform libraries.\n\nThis binary generates the library source code using the schema definitions for resources and data sources provided by\nthe provider binaries (from the `terraform providers schema` command).\n\nThe list of supported providers as well as the destination repositories can be found in the\n[cfg/managed.json](./cfg/managed.json) config file.\n\nLearn more about `tf.libsonnet` at [docs.tflibsonnet.com](https://docs.tflibsonnet.com/docs).\n\n## Usage\n\n### Running the standalone binary\n\nIf you are managing a new custom provider, or would like to tweak the generated output, you can run the binary directly\nto generate the libsonnet files on your local filesystem.\n\nCompiled binaries for various platforms are available in [the releases\npage](https://github.com/tf-libsonnet/libgenerator/releases). Make sure to put it somewhere on your `PATH`, such as\n`/usr/local/bin`.\n\nYou can also compile from source using `go install` if you have [Go 1.19+](https://tip.golang.org/) installed. E.g., to\nget the latest version:\n\n```\ngo install github.com/tf-libsonnet/libgenerator/cmd/libgenerator@latest\n```\n\nOnce you have installed the binary, you can generate the libsonnet for a provider by passing in the desired provider\nparameters with the `--provider` flag. For example, if you want to generate the libsonnet for the [Doppler\nprovider](https://registry.terraform.io/providers/DopplerHQ/doppler/latest/docs):\n\n```\nlibgenerator gen --provider 'src=DopplerHQ/doppler\u0026version=~\u003e1.0'\n```\n\nThis will generate the libsonnet files in the `out` directory of the current working directory. You can then copy the\nresults into a repo you maintain, or as a vendored file in your main infrastructure repo where you are generating\nTerraform code (e.g., `infrastructure-live`).\n\n### Adding a new managed provider\n\nDue to limited bandwidth, we do not default to generating and maintaining a library for all providers. However, we are\nopen to supporting any providers that will get active usage from the community.\n\nYou can request a new provider to be managed by the `tf.libsonnet` org by opening a pull request with the provider added\nto the [cfg/managed.json config](./cfg/managed.json). During the PR process, we will allocate a new repository to house\nthe generated code and run the generator through the CI job to generate the new library. From there, you can test the\ngenerated code to verify the changes.\n\n\n## Status of provider support\n\nWhile the generator is capable of generating libsonnet code for arbitrary providers, it is difficult to maintain and test\ncompatibility for all of them over time. This means that we can't guarantee that the generated code will work for all\nproduction environments and use cases, nor that all functions on resources and data sources work as intended. However,\ncertain providers see active production usage from the community, and these providers are generally considered to be\nstable.\n\nWe define the following stability levels for the generated provider libraries:\n\n- **Stable**: Actively used in production workloads. The target repository contains regression tests to maintain\n  compatibility across versions and releases. Issues relating to these providers have the highest priority.\n- **Beta**: Actively used in production workloads, but there is no regression testing. Issues relating to these\n  providers will be prioritized.\n- **Alpha**: While automated releases are configured, there is no known active production usage. Issues relating to\n  these providers are addressed on a best effort basis.\n\nThe following table clarifies the current status of the providers according to the aforementioned stability levels:\n\n| Provider                                                               | Status |\n|------------------------------------------------------------------------|--------|\n| [azurerm](https://github.com/tf-libsonnet/hashicorp-azurerm)           | Beta   |\n| [azuread](https://github.com/tf-libsonnet/hashicorp-azuread)           | Beta   |\n| [hcp](https://github.com/tf-libsonnet/hashicorp-hcp)                   | Beta   |\n| [null](https://github.com/tf-libsonnet/hashicorp-null)                 | Beta   |\n| [DopplerHQ/doppler](https://github.com/tf-libsonnet/dopplerhq-doppler) | Beta   |\n| [aws](https://github.com/tf-libsonnet/hashicorp-aws)                   | Alpha  |\n| [google](https://github.com/tf-libsonnet/hashicorp-google)             | Alpha  |\n| [google-beta](https://github.com/tf-libsonnet/hashicorp-google-beta)   | Alpha  |\n\nNote that the stability levels within a provider library will vary across resources and data sources. That is, some\nresources within a provider may be considered **Alpha** level, while others may be **Stable**. In general, a **Stable**\nprovider has a large enough community of users such that most resources and data sources are covered.\n\n\n## Support\n\nIf you have any questions about how to use the `tf.libsonnet` libraries, ask in the [Organization GitHub\nDiscussion](https://github.com/orgs/tf-libsonnet/discussions).\n\n\n## Contributing\n\nRefer to the [CONTRIBUTING.md](/CONTRIBUTING.md) document for information on how to contribute to `tf.libsonnet`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftf-libsonnet%2Flibgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftf-libsonnet%2Flibgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftf-libsonnet%2Flibgenerator/lists"}