Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cdktf-injector

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdktf-injector

Dependency Injection for CDKTF(Cloud Development Kit for Terraform) powered by projen.

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
decreased by-14.51%
Maintainers
1
Weekly downloads
 
Created
Source

npm version Release License

Dependency Injection for CDKTF

cdktf-injector is a dependency injection library for CDKTF (AWS Cloud Development Kit for Terraform).

If you are not familiar with cdktf and terraform yet or haven't heard of them before, this library may not be that so useful. That's totally cool, but I recommend you to have a look what they (cdktf and terraform) are or at least what's the concept of IaC. Those are really amazing.

There are two prerequisites for cdktf-injector

  • Terraform - You need to install terraform on your dev env and it should be accessible on cli path. If you're using devcontainer you may paste following commands to your Dockerfile.

    ...
    
    # Pass terraform version as an argument
    ARG TERRAFORM_VERSION=1.1.7
    
    # Install Terraform
    RUN wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
        unzip ./terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin/ && \
        rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip
    
    ...
    
  • cdktf - A library for defining Terraform resources using programming constructs. Click here to get started. Or, simply type following lines.

    mkdir your-project-name
    cd your-project-name
    npx cdktf-cli init --template="typescript" --local
    

Features

  • No decorator
  • No need to declare custom classes
  • No need to explicitly write dependencies

Installation

Using npm

npm install cdktf-injector --save

Using yarn

yarn add cdktf-injector

Note : cdktf supports multiple languages, such as TypeScript, Python, Java, C# and Go. Howerver according to Typescript restriction of jsii, which is I originally wanted to use to power my lib and what cdktf depends on, it does not allow using Parameterized Types(aka: Generics). And as far as I know, there is no other decent way to implement dependency injection without using generic or decorator. In brief, cdktf-injector is currently availiable only in Node.js env. I'm looking forward to making this lib supports multiple languages soon.


Documentation

Keywords

FAQs

Package last updated on 07 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc