https://github.com/xanthous-tech/serverless-cdktf
A Serverless plugin that deploys AWS Serverless stack via Terraform, using CDKTF.
https://github.com/xanthous-tech/serverless-cdktf
cdktf cloudformation plugin serverless terraform
Last synced: 8 months ago
JSON representation
A Serverless plugin that deploys AWS Serverless stack via Terraform, using CDKTF.
- Host: GitHub
- URL: https://github.com/xanthous-tech/serverless-cdktf
- Owner: xanthous-tech
- License: mit
- Created: 2020-07-30T08:37:03.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-02T04:52:50.000Z (about 5 years ago)
- Last Synced: 2025-01-03T23:16:41.853Z (9 months ago)
- Topics: cdktf, cloudformation, plugin, serverless, terraform
- Language: TypeScript
- Homepage:
- Size: 939 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# serverless-cdktf
A [serverless](https://serverless.com) plugin that deploys AWS serverless stack via Terraform, using [CDKTF](https://github.com/hashicorp/terraform-cdk).
# Usage
```shell
yarn add serverless-cdktf --dev
```just add the plugin into the `plugins` field in `serverless.yml` and it will do the rest.
# variables
the plugin looks for the following configuration values in `serverless.yml`'s `custom` section:
```yaml
custom:
# accountId is more or less global, and we would need that to override the `AWS:AccountId` variable in CloudFormation
accountId: ""
# optional, this variable is only needed when you use a monorepo setup and the dependency is hoisted
binPath: ../node_modules/.bin
cdktf:
deploymentBucketName: ""
s3Backend:
region: ""
profile: "" # optional, this looks for credential profile under ~/.aws/credentials, by default it uses the same profile defined in the serverless stack
accessKey: "" # alternatively, provide the keys directly
secretKey: ""
bucket: ""
key: ""
remoteState:
region: "" # optional
profile: "" # optional, this looks for credential profile under ~/.aws/credentials, by default it uses the same profile defined in the serverless stack
accessKey: "" # alternatively, provide the keys directly
secretKey: ""
bucket: ""
key: ""
```# Terraform and Provider Support
Currently we are developing using Terraform v0.12 and AWS Provider v2.70.0. Any other version combinations are likely to work, but it would require building this package yourself for now, since the CDK definitions are generated based on the versions you have at build time.
# Resources Supported
- [x] S3 Bucket
- [X] S3 Bucket Policy
- [X] Lambda Functions
- [X] IAM Roles and Policy Documents
- [X] API Gateway
- [X] CloudFront Distribution# License
[MIT](./LICENSE).