Coder Social home page Coder Social logo

pulumi-ts-vpc-abstraction's Introduction

ts-vpc-abstraction

Example of a minimal VPC abstraction across AWS, Azure, and GCP.

Getting Started

  1. Open a terminal, git clone this repo, and change directory to where index.ts resides.

  2. Change the import at the top of index.ts to change cloud provider.

    import {MyVpc} from "./vpc-aws";
    // import {MyVpc} from "./vpc-azure";
    // import {MyVpc} from "./vpc-gcp";
    
  3. Run the appropriate AWS or GCP command below if you chose AWS or GCP as your cloud provider.

    pulumi config set aws:region <region>
    pulumi config set gcp:region <region>
    
  4. Run pulumi up.

    $ pulumi up
    Previewing update (dev):
    
        Type                 Name                    Plan
    +   pulumi:pulumi:Stack  ts-vpc-abstraction-dev  create
    +   ├─ custom:aws:Vpc    main                    create
    +   │  └─ aws:ec2:Vpc    main                    create
    +   ├─ aws:ec2:Subnet    main-1                  create
    +   └─ aws:ec2:Subnet    main-0                  create
    
    Resources:
        + 5 to create
    
    Do you want to perform this update? yes
    Updating (dev):
    
        Type                 Name                    Status
    +   pulumi:pulumi:Stack  ts-vpc-abstraction-dev  created
    +   ├─ custom:aws:Vpc    main                    created
    +   │  └─ aws:ec2:Vpc    main                    created
    +   ├─ aws:ec2:Subnet    main-0                  created
    +   └─ aws:ec2:Subnet    main-1                  created
    
    Outputs:
        subnetIds: [
            [0]: "subnet-03019da431112da21"
            [1]: "subnet-0e128ddf1cd4889a8"
        ]
        vpcId    : "vpc-0d7d822c4753ed3de"
    
    Resources:
        + 5 created
    
    Duration: 14s
    
    Permalink: https://app.pulumi.com/clstokes/ts-vpc-abstraction/dev/updates/15
    
  5. Run pulumi destroy to clean up resources.

pulumi-ts-vpc-abstraction's People

Contributors

clstokes avatar

Watchers

 avatar  avatar

Forkers

pierskarsenbarg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.