pepperize.cdk-terraform-state-backend


Namepepperize.cdk-terraform-state-backend JSON
Version 0.1.109 PyPI version JSON
download
home_pagehttps://github.com/pepperize/cdk-terraform-state-backend.git
SummaryThis project provides a CDK construct bootstrapping an AWS account with a S3 Bucket and a DynamoDB table as terraform state backend.
upload_time2022-06-30 06:44:59
maintainer
docs_urlNone
authorPatrick Florek<patrick.florek@gmail.com>
requires_python~=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![GitHub](https://img.shields.io/github/license/pepperize/cdk-terraform-state-backend?style=flat-square)](https://github.com/pepperize/cdk-terraform-state-backend/blob/main/LICENSE)
[![npm (scoped)](https://img.shields.io/npm/v/@pepperize/cdk-terraform-state-backend?style=flat-square)](https://www.npmjs.com/package/@pepperize/cdk-terraform-state-backend)
[![PyPI](https://img.shields.io/pypi/v/pepperize.cdk-terraform-state-backend?style=flat-square)](https://pypi.org/project/pepperize.cdk-terraform-state-backend/)
[![Nuget](https://img.shields.io/nuget/v/Pepperize.CDK.TerraformStateBackend?style=flat-square)](https://www.nuget.org/packages/Pepperize.CDK.TerraformStateBackend/)
[![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/com.pepperize/cdk-terraform-state-backend?server=https%3A%2F%2Fs01.oss.sonatype.org%2F&style=flat-square)](https://s01.oss.sonatype.org/content/repositories/releases/com/pepperize/cdk-terraform-state-backend/)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/pepperize/cdk-terraform-state-backend/release/main?label=release&style=flat-square)](https://github.com/pepperize/cdk-terraform-state-backend/actions/workflows/release.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/pepperize/cdk-terraform-state-backend?sort=semver&style=flat-square)](https://github.com/pepperize/cdk-terraform-state-backend/releases)

# AWS CDK Terraform state backend

This project provides a CDK construct bootstrapping an AWS account with a S3 Bucket and a DynamoDB table as [Terraform state backend](https://www.terraform.io/docs/language/settings/backends/s3.html).

Terraform doesn't come shipped with a cli command bootstrapping the account for [State Storage and Locking](https://www.terraform.io/docs/language/state/backends.html)
like [AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/cli.html#cli-bootstrap) provides with `cdk bootstrap`.
While bootstrapping the AWS Organization and Accounts this construct may be used to create:

* S3 Bucket with blocked public access, versioned, encrypted by SSE-S3
* DynamoDB Table with pay per request, continuous backups using point-in-time recovery, encrypted by AWS owned key
* IAM Policy with read/write access to the created S3 Bucket and DynamoDB Table

See [API.md](https://github.com/pepperize/cdk-terraform-state-backend/blob/main/API.md)

## Install

### TypeScript

```shell
npm install @pepperize/cdk-terraform-state-backend
```

or

```shell
yarn add @pepperize/cdk-terraform-state-backend
```

### Python

```shell
pip install pepperize.cdk-terraform-state-backend
```

### C# / .Net

```
dotnet add package Pepperize.CDK.TerraformStateBackend
```

### Java

```xml
<dependency>
  <groupId>com.pepperize</groupId>
  <artifactId>cdk-terraform-state-backend</artifactId>
  <version>${cdkTerraformStateBackend.version}</version>
</dependency>
```

## Example

```typescript
import { App, Stack } from "@aws-cdk/core";
import { TerraformStateBackend } from "@pepperize/cdk-terraform-state-backend";

const app = new App();
const stack = new Stack(app, "stack", {
  env: {
    account: "123456789012",
    region: "us-east-1",
  },
});

// When
new TerraformStateBackend(stack, "TerraformStateBackend", {
  bucketName: "terraform-state-backend",
  tableName: "terraform-state-backend",
});
```

```hcl
terraform {
  backend "s3" {
    bucket = "terraform-state-backend-123456789012-us-east-1"
    dynamodb_table = "terraform-state-backend-123456789012"
    key = "path/to/my/key"
    region = "us-east-1"
  }
}
```

See [Terraform S3 Example Configuration](https://www.terraform.io/docs/language/settings/backends/s3.html#example-configuration)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pepperize/cdk-terraform-state-backend.git",
    "name": "pepperize.cdk-terraform-state-backend",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "~=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Patrick Florek<patrick.florek@gmail.com>",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/fe/b0/477bcaaab7c59dbe4d7cab869241cd71b553a4c4b372ae40a4ccb749a959/pepperize.cdk-terraform-state-backend-0.1.109.tar.gz",
    "platform": null,
    "description": "[![GitHub](https://img.shields.io/github/license/pepperize/cdk-terraform-state-backend?style=flat-square)](https://github.com/pepperize/cdk-terraform-state-backend/blob/main/LICENSE)\n[![npm (scoped)](https://img.shields.io/npm/v/@pepperize/cdk-terraform-state-backend?style=flat-square)](https://www.npmjs.com/package/@pepperize/cdk-terraform-state-backend)\n[![PyPI](https://img.shields.io/pypi/v/pepperize.cdk-terraform-state-backend?style=flat-square)](https://pypi.org/project/pepperize.cdk-terraform-state-backend/)\n[![Nuget](https://img.shields.io/nuget/v/Pepperize.CDK.TerraformStateBackend?style=flat-square)](https://www.nuget.org/packages/Pepperize.CDK.TerraformStateBackend/)\n[![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/com.pepperize/cdk-terraform-state-backend?server=https%3A%2F%2Fs01.oss.sonatype.org%2F&style=flat-square)](https://s01.oss.sonatype.org/content/repositories/releases/com/pepperize/cdk-terraform-state-backend/)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/pepperize/cdk-terraform-state-backend/release/main?label=release&style=flat-square)](https://github.com/pepperize/cdk-terraform-state-backend/actions/workflows/release.yml)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/pepperize/cdk-terraform-state-backend?sort=semver&style=flat-square)](https://github.com/pepperize/cdk-terraform-state-backend/releases)\n\n# AWS CDK Terraform state backend\n\nThis project provides a CDK construct bootstrapping an AWS account with a S3 Bucket and a DynamoDB table as [Terraform state backend](https://www.terraform.io/docs/language/settings/backends/s3.html).\n\nTerraform doesn't come shipped with a cli command bootstrapping the account for [State Storage and Locking](https://www.terraform.io/docs/language/state/backends.html)\nlike [AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/cli.html#cli-bootstrap) provides with `cdk bootstrap`.\nWhile bootstrapping the AWS Organization and Accounts this construct may be used to create:\n\n* S3 Bucket with blocked public access, versioned, encrypted by SSE-S3\n* DynamoDB Table with pay per request, continuous backups using point-in-time recovery, encrypted by AWS owned key\n* IAM Policy with read/write access to the created S3 Bucket and DynamoDB Table\n\nSee [API.md](https://github.com/pepperize/cdk-terraform-state-backend/blob/main/API.md)\n\n## Install\n\n### TypeScript\n\n```shell\nnpm install @pepperize/cdk-terraform-state-backend\n```\n\nor\n\n```shell\nyarn add @pepperize/cdk-terraform-state-backend\n```\n\n### Python\n\n```shell\npip install pepperize.cdk-terraform-state-backend\n```\n\n### C# / .Net\n\n```\ndotnet add package Pepperize.CDK.TerraformStateBackend\n```\n\n### Java\n\n```xml\n<dependency>\n  <groupId>com.pepperize</groupId>\n  <artifactId>cdk-terraform-state-backend</artifactId>\n  <version>${cdkTerraformStateBackend.version}</version>\n</dependency>\n```\n\n## Example\n\n```typescript\nimport { App, Stack } from \"@aws-cdk/core\";\nimport { TerraformStateBackend } from \"@pepperize/cdk-terraform-state-backend\";\n\nconst app = new App();\nconst stack = new Stack(app, \"stack\", {\n  env: {\n    account: \"123456789012\",\n    region: \"us-east-1\",\n  },\n});\n\n// When\nnew TerraformStateBackend(stack, \"TerraformStateBackend\", {\n  bucketName: \"terraform-state-backend\",\n  tableName: \"terraform-state-backend\",\n});\n```\n\n```hcl\nterraform {\n  backend \"s3\" {\n    bucket = \"terraform-state-backend-123456789012-us-east-1\"\n    dynamodb_table = \"terraform-state-backend-123456789012\"\n    key = \"path/to/my/key\"\n    region = \"us-east-1\"\n  }\n}\n```\n\nSee [Terraform S3 Example Configuration](https://www.terraform.io/docs/language/settings/backends/s3.html#example-configuration)\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This project provides a CDK construct bootstrapping an AWS account with a S3 Bucket and a DynamoDB table as terraform state backend.",
    "version": "0.1.109",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "5e7c1a9992420e0e1eca67dbd8bf1275",
                "sha256": "28a50e217f678b3c822e4f41cfb78aaac6ac9692d730dda7ddcacd306373b310"
            },
            "downloads": -1,
            "filename": "pepperize.cdk_terraform_state_backend-0.1.109-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e7c1a9992420e0e1eca67dbd8bf1275",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.7",
            "size": 22427,
            "upload_time": "2022-06-30T06:44:57",
            "upload_time_iso_8601": "2022-06-30T06:44:57.995957Z",
            "url": "https://files.pythonhosted.org/packages/68/d1/b4061495cd84e450969521e1e0e0ccff5984f22c7fb8a85ec9da9750fba4/pepperize.cdk_terraform_state_backend-0.1.109-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "371661a438ff50b6400660e76f322b63",
                "sha256": "73a9f5eb4b1128a44c212b13da688969a34ceb46b8132d4bd91f4ae6d4eee1ec"
            },
            "downloads": -1,
            "filename": "pepperize.cdk-terraform-state-backend-0.1.109.tar.gz",
            "has_sig": false,
            "md5_digest": "371661a438ff50b6400660e76f322b63",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.7",
            "size": 21401,
            "upload_time": "2022-06-30T06:44:59",
            "upload_time_iso_8601": "2022-06-30T06:44:59.952500Z",
            "url": "https://files.pythonhosted.org/packages/fe/b0/477bcaaab7c59dbe4d7cab869241cd71b553a4c4b372ae40a4ccb749a959/pepperize.cdk-terraform-state-backend-0.1.109.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-06-30 06:44:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pepperize",
    "github_project": "cdk-terraform-state-backend.git",
    "lcname": "pepperize.cdk-terraform-state-backend"
}
        
Elapsed time: 0.57609s