{"id":14958002,"url":"https://github.com/cdktf/cdktf-tf-module-stack","last_synced_at":"2025-06-27T15:08:14.722Z","repository":{"id":38162168,"uuid":"471346807","full_name":"cdktf/cdktf-tf-module-stack","owner":"cdktf","description":"A drop-in replacement for cdktf.TerraformStack that lets you define Terraform modules as constructs","archived":false,"fork":false,"pushed_at":"2025-06-09T00:18:20.000Z","size":2250,"stargazers_count":20,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-09T10:47:09.366Z","etag":null,"topics":["cdktf","constructs","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/cdktf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-18T11:46:38.000Z","updated_at":"2025-06-09T00:15:45.000Z","dependencies_parsed_at":"2023-10-16T14:33:14.099Z","dependency_job_id":"1d6a155d-5d17-4395-b6b9-666f2cbe0433","html_url":"https://github.com/cdktf/cdktf-tf-module-stack","commit_stats":{"total_commits":354,"total_committers":7,"mean_commits":50.57142857142857,"dds":"0.40960451977401124","last_synced_commit":"ec6098deda79d93acab4e17dd4776cb96afc341e"},"previous_names":["danielmschmidt/cdktf-tf-module-stack"],"tags_count":301,"template":false,"template_full_name":null,"purl":"pkg:github/cdktf/cdktf-tf-module-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdktf%2Fcdktf-tf-module-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdktf%2Fcdktf-tf-module-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdktf%2Fcdktf-tf-module-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdktf%2Fcdktf-tf-module-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdktf","download_url":"https://codeload.github.com/cdktf/cdktf-tf-module-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdktf%2Fcdktf-tf-module-stack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260961570,"owners_count":23089243,"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","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":["cdktf","constructs","terraform","terraform-module"],"created_at":"2024-09-24T13:15:57.881Z","updated_at":"2025-06-27T15:08:14.712Z","avatar_url":"https://github.com/cdktf.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cdktf-tf-module-stack\n\n![Status: Tech Preview](https://img.shields.io/badge/status-experimental-EAAA32) [![Releases](https://img.shields.io/github/release/cdktf/cdktf-tf-module-stack.svg)](https://github.com/cdktf/cdktf-tf-module-stack/releases)\n[![LICENSE](https://img.shields.io/github/license/cdktf/cdktf-tf-module-stack.svg)](https://github.com/cdktf/cdktf-tf-module-stack/blob/main/LICENSE)\n[![build](https://github.com/cdktf/cdktf-tf-module-stack/actions/workflows/build.yml/badge.svg)](https://github.com/cdktf/cdktf-tf-module-stack/actions/workflows/build.yml)\n\nA drop-in replacement for cdktf.TerraformStack that lets you define Terraform modules as constructs.\n\n_cdktf-tf-module-stack_ is in technical preview, which means it's a community supported project. It still requires extensive testing and polishing to mature into a HashiCorp officially supported project. Please [file issues](https://github.com/cdktf/cdktf-tf-module-stack/issues/new/choose) generously and detail your experience while using the library. We welcome your feedback.\n\nBy using the software in this repository, you acknowledge that:\n\n* _cdktf-tf-module-stack_ is still in development, may change, and has not been released as a commercial product by HashiCorp and is not currently supported in any way by HashiCorp.\n* _cdktf-tf-module-stack_ is provided on an \"as-is\" basis, and may include bugs, errors, or other issues.\n* _cdktf-tf-module-stack_ is NOT INTENDED FOR PRODUCTION USE, use of the Software may result in unexpected results, loss of data, or other unexpected results, and HashiCorp disclaims any and all liability resulting from use of _cdktf-tf-module-stack_.\n* HashiCorp reserves all rights to make all decisions about the features, functionality and commercial release (or non-release) of _cdktf-tf-module-stack_, at any time and without any obligation or liability whatsoever.\n\n## Compatibility\n\n* `cdktf` \u003e= 0.21.0\n* `constructs` \u003e= 10.4.2\n\n## Available Packages\n\n### NPM\n\nThe npm package is available at [https://www.npmjs.com/package/@cdktf/tf-module-stack](https://www.npmjs.com/package/@cdktf/tf-module-stack).\n\n`npm install @cdktf/tf-module-stack`\n\nNOTE: Originally, this package was named `cdktf-tf-module-stack`, and the legacy versions (\u003c= 0.2.0) can be found on npm [here](https://www.npmjs.com/package/cdktf-tf-module-stack).\n\n### PyPI\n\nThe PyPI package is available at [https://pypi.org/project/cdktf-tf-module-stack](https://pypi.org/project/cdktf-tf-module-stack).\n\n`pipenv install cdktf-tf-module-stack`\n\n### Nuget\n\nThe Nuget package is available at [https://www.nuget.org/packages/HashiCorp.Cdktf.TfModuleStack](https://www.nuget.org/packages/HashiCorp.Cdktf.TfModuleStack).\n\n`dotnet add package HashiCorp.Cdktf.TfModuleStack`\n\n### Maven\n\nThe Maven package is available at [https://mvnrepository.com/artifact/com.hashicorp/cdktf-tf-module-stack](https://mvnrepository.com/artifact/com.hashicorp/cdktf-tf-module-stack).\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.hashicorp\u003c/groupId\u003e\n    \u003cartifactId\u003ecdktf-tf-module-stack\u003c/artifactId\u003e\n    \u003cversion\u003e[REPLACE WITH DESIRED VERSION]\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Go\n\nThe go package is generated into the [`github.com/cdktf/cdktf-tf-module-stack-go`](https://github.com/cdktf/cdktf-tf-module-stack-go) package.\n\n`go get github.com/cdktf/cdktf-tf-module-stack-go/tfmodulestack`\n\n## Usage\n\n### Typescript\n\n```ts\nimport { App } from \"cdktf\";\nimport {\n  TFModuleStack,\n  TFModuleVariable,\n  TFModuleOutput,\n  ProviderRequirement,\n} from \"@cdktf/tf-module-stack\";\nimport { Resource } from '@cdktf/provider-null/lib/resource';\n\nclass MyAwesomeModule extends TFModuleStack {\n  constructor(scope: Construct, id: string) {\n    super(scope, id);\n\n    new ProviderRequirement(this, \"null\", \"~\u003e 2.0\");\n    const resource = new Resource(this, \"resource\");\n\n    new TFModuleVariable(this, \"my_var\", {\n      type: \"string\",\n      description: \"A variable\",\n      default: \"default\",\n    });\n\n    new TFModuleOutput(this, \"my_output\", {\n      value: resource.id,\n    });\n  }\n}\n\nconst app = new App();\nnew MyAwesomeModule(app, \"my-awesome-module\");\napp.synth();\n```\n\n### Python\n\n```python\nfrom constructs import Construct\nfrom cdktf import App, TerraformStack\nfrom imports.null.resource import Resource\nfrom cdktf_tf_module_stack import TFModuleStack, TFModuleVariable, TFModuleOutput, ProviderRequirement\n\n\nclass MyAwesomeModule(TFModuleStack):\n    def __init__(self, scope: Construct, ns: str):\n        super().__init__(scope, ns)\n\n        ProviderRequirement(self, \"null\", provider_version_constraint=\"~\u003e 2.0\")\n\n        TFModuleVariable(self, \"my_var\", type=\"string\", description=\"A variable\", default=\"default\")\n\n        resource = Resource(self, \"resource\")\n\n        TFModuleOutput(self, \"my_output\", value=resource.id)\n\n\napp = App()\nMyAwesomeModule(app, \"my-awesome-module\")\napp.synth()\n```\n\nThis will synthesize a Terraform JSON file that looks like this:\n\n```json\n{\n  \"output\": {\n    \"my_output\": [\n      {\n        \"value\": \"${null_resource.resource.id}\"\n      }\n    ]\n  },\n  \"resource\": {\n    \"null_resource\": {\n      \"resource\": {}\n    }\n  },\n  \"terraform\": {\n    \"required_providers\": {\n      \"null\": {\n        \"source\": \"null\",\n        \"version\": \"~\u003e 2.0\"\n      }\n    },\n    \"variable\": {\n      \"my_var\": {\n        \"default\": \"default\",\n        \"description\": \"A variable\",\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n```\n\nPlease note that the provider section is missing, so that the Terraform Workspace using the generated module can be used with any provider matching the version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdktf%2Fcdktf-tf-module-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdktf%2Fcdktf-tf-module-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdktf%2Fcdktf-tf-module-stack/lists"}