{"id":28038,"library":"pepperize-cdk-terraform-state-backend","title":"pepperize CDK Terraform State Backend","description":"Provides an AWS CDK construct to bootstrap an AWS account with an S3 bucket and DynamoDB table for use as a Terraform state backend. Version 0.1.1205, frequent releases.","status":"active","version":"0.1.1205","language":"python","source_language":"en","source_url":"https://github.com/pepperize/cdk-terraform-state-backend.git","tags":["aws-cdk","terraform","state-backend","infrastructure","construct"],"install":[{"cmd":"pip install pepperize-cdk-terraform-state-backend","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required constructs and core CDK classes.","package":"aws-cdk-lib","optional":false},{"reason":"Base construct class.","package":"constructs","optional":false}],"imports":[{"note":"Incorrect import path; the correct module is the package __init__.","wrong":"from pepperize_cdk_terraform_state_backend.terraform_state_backend import TerraformStateBackend","symbol":"TerraformStateBackend","correct":"from pepperize_cdk_terraform_state_backend import TerraformStateBackend"}],"quickstart":{"code":"from constructs import Construct\nfrom aws_cdk import App, Stack\nfrom pepperize_cdk_terraform_state_backend import TerraformStateBackend\n\nclass MyStack(Stack):\n    def __init__(self, scope: Construct, id: str, **kwargs):\n        super().__init__(scope, id, **kwargs)\n        TerraformStateBackend(self, \"Backend\",\n            bucket_name=\"my-terraform-state\",\n            table_name=\"my-terraform-lock\"\n        )\n\napp = App()\nMyStack(app, \"MyStack\")\napp.synth()","lang":"python","description":"Deploys an S3 bucket and DynamoDB table for Terraform state."},"warnings":[{"fix":"Set removal_policy on the construct props to RETAIN.","message":"The construct creates resources with default removal policy (DESTROY) unless overridden. Be cautious with production state.","severity":"gotcha","affected_versions":"*"},{"fix":"Use unique identifiers or suffix with account ID/region.","message":"Bucket name and table name must be globally unique across all AWS accounts. Duplicating names leads to deployment errors.","severity":"gotcha","affected_versions":"*"},{"fix":"Use 'from pepperize_cdk_terraform_state_backend import TerraformStateBackend'.","message":"Version 0.1.0 changed the import path; older versions used a different module structure.","severity":"breaking","affected_versions":"<0.1.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run 'pip install pepperize-cdk-terraform-state-backend' in the correct environment.","cause":"Package not installed or wrong Python environment.","error":"ModuleNotFoundError: No module named 'pepperize_cdk_terraform_state_backend'"},{"fix":"Upgrade aws-cdk-lib to version 2.x or later.","cause":"Incompatible CDK version (requires aws-cdk-lib >=2).","error":"jsii.errors.JSIIError: ..."},{"fix":"Change bucket_name to a unique string, e.g., '{}-{}'.format(account_id, bucket_name).","cause":"S3 bucket name conflict (global namespace).","error":"Resource handler returned message: \"Bucket with the same name already exists\""}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}