CDKTF Provider: null
raw JSON → 11.0.1 verified Fri May 01 auth: no python
Prebuilt Terraform CDK (CDKTF) provider for the null resource. Allows provisioning of resources that do nothing, useful for implementing triggers or placeholders. Version 11.0.1 supports CDKTF 0.20+ and Terraform Provider null 3.x. Released monthly alongside CDKTF provider releases.
pip install cdktf-cdktf-provider-null Common errors
error ModuleNotFoundError: No module named 'cdktf_cdktf_provider_null' ↓
cause Package not installed or installed in wrong environment.
fix
Run 'pip install cdktf-cdktf-provider-null' in your Python environment.
error AttributeError: module 'cdktf_cdktf_provider_null' has no attribute 'NullResource' ↓
cause Import from wrong path. NullResource is not directly on the package root.
fix
Use 'from cdktf_cdktf_provider_null.null_resource import NullResource'.
error jsii.errors.JSIIError: Unknown constructor: NullProvider ↓
cause Provider needs to be imported correctly and instantiated with proper scope and id.
fix
Ensure you import NullProvider from cdktf_cdktf_provider_null and pass a Construct scope and string id.
Warnings
breaking Major version jumps: upgrade from 10.x to 11.x requires CDKTF 0.20+ and Terraform Provider null 3.x. Check provider version compatibility. ↓
fix Update cdktf to >=0.20 and refer to Terraform null provider docs for v3 changes.
gotcha The 'triggers' attribute of NullResource is used for replacement logic. Modifying triggers forces resource recreation; this is expected but can cause data loss if used carelessly. ↓
fix Ensure triggers map keys/values are stable or expect replacements.
deprecated Some older classes (like 'null.DataSource' in legacy versions) have been removed. Use the current submodule paths. ↓
fix Refer to import paths in this registry entry for correct symbols.
Imports
- NullProvider wrong
from cdktf_cdktf_provider_null.provider import NullProvidercorrectfrom cdktf_cdktf_provider_null import NullProvider - DataNullDataSource wrong
from cdktf_cdktf_provider_null import DataNullDataSourcecorrectfrom cdktf_cdktf_provider_null.data_null_data_source import DataNullDataSource - NullResource wrong
from cdktf_cdktf_provider_null.resource import NullResourcecorrectfrom cdktf_cdktf_provider_null.null_resource import NullResource
Quickstart
from cdktf import App, TerraformStack
from cdktf_cdktf_provider_null import NullProvider, NullResource
class MyStack(TerraformStack):
def __init__(self, scope, id):
super().__init__(scope, id)
NullProvider(self, 'null', alias='myprovider')
NullResource(self, 'example', triggers={'key': 'value'})
app = App()
MyStack(app, 'quickstart')
app.synth()