cdktf-tf-module-stack
A drop-in replacement for cdktf.TerraformStack that let's you define Terraform modules as construct.
Setup
Node.js
Run yarn add cdktf-tf-module-stack (or npm install --save cdktf-tf-module-stack) to install the package.
Python
Run pip install cdktf-tf-module-stack to install the package.
Usage
import { App } from "cdktf";
import { TFModuleStack, TFModuleVariable } from "cdktf-tf-module-stack";
import { NullProvider, Resource } from "@cdktf/provider-null";
class MyAwesomeModule extends TFModuleStack {
constructor(scope: Construct, id: string) {
super(scope, id);
new NullProvider(this, "null");
new Resource(this, "resource");
new TFModuleVariable(this, "my_var", {
type: "string",
description: "A variable",
default: "default",
});
}
}
const app = new App();
new MyAwesomeModule(app, "my-awesome-module");
app.synth();
This will synthesize a Terraform JSON file that looks like this:
{
"resource": {
"null_resource": {
"resource": {}
}
},
"terraform": {
"required_providers": {
"null": {
"source": "null",
"version": "~> 2.0"
}
},
"variable": {
"my_var": {
"default": "default",
"description": "A variable",
"type": "string"
}
}
}
}
Please 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.
Metadata
Release files for cdktf-tf-module-stack 0.0.29
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cdktf-tf-module-stack-0.0.29.tar.gz | 21.7 kB | Without provenance | Details for cdktf-tf-module-stack-0.0.29.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cdktf_tf_module_stack-0.0.29-py3-none-any.whl | Python 3 | none | any | Details for cdktf_tf_module_stack-0.0.29-py3-none-any.whl |
Total release size: 42.9 kB
Release files / cdktf-tf-module-stack-0.0.29.tar.gz
| Download URL | cdktf-tf-module-stack-0.0.29.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0fc89117e687ce13bf49f5c9a40af180d081d40692bf88d79f8a357f4bafa2b
|
|
BLAKE2b-256 checksum How to use checksums |
f6c7a5563bf83b79f106f779e6f324eca2bf4d2896a65d02b8f3f718cfe524a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / cdktf_tf_module_stack-0.0.29-py3-none-any.whl
| Download URL | cdktf_tf_module_stack-0.0.29-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13a0d60bb4bfca5666ad147970e8a7e5b2e04b5f2ff823be6a06f4e1cc53df5a
|
|
BLAKE2b-256 checksum How to use checksums |
701201548f5afba3ed8c159833b58aa360622ae42b933c77e694f4e62caa5f06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Security for cdktf-tf-module-stack 0.0.29
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.