Giter Club home page Giter Club logo

pulumi-playground's Introduction

pulumi playground

pulumi is an infrastructure-as-code tool that creates, deploys and manages cloud infrastructure

  • instead of yml or a sdl, pulumi uses existing, programming languages and their native tools, libraries, and package managers

  • pulumi up executes program and determines the desired infrastructure state for all resources declared

  • pulumi programs are written in general-purpose programming languages

  • Pulumi programs are structured as projects and stacks

    • Program a collection of files written in chosen programming language
    • Project a directory containing a program, with metadata, so Pulumi knows how to run it
    • Stack an instance of your project, each often corresponding to a different cloud environment

prerequesites

  • puliumi installed e.g. brew install pulumi
  • tf2pulumi installed e.g. brew install pulumi/tap/tf2pulumi
  • language runtime installed e.g. node, python, go
  • aws profile and credentials present at $HOME/.aws/
  • (optional) aws cli installed
  • (optional) curl cli installed

setup

pulumi gen-completion bash > /usr/local/etc/bash_completion.d/pulumi

export AWS_PROFILE=PROFILE_NAME

pulumi config set aws:profile PROFILE_NAME    # interactively auth pulumi

first steps

cd ./aws-go
export AWS_PROFILE=PROFILE_NAME

pulumi new <CLOUD>-<LANG> --name PROJECT_NAME

pulumi new aws-go --dir ./aws-go      # interactively setup project, stack and dependencies

puliumi preview

pulumi up   # evaluate program and determine resources updates to make, runs interactively

aws s3api list-buckets | jq -r '.Buckets[].Name'

pulumi stack ls

pulumi stack output bucketName      # print out the name of bucket

aws s3 ls $(pulumi stack output bucketName)

curl $(pulumi stack output bucketEndpoint)

cleanup

cd ./aws-go && pulumi destroy

# history and configuration associated with the stack are still maintained, total cleanup !
pulumi stack rm STACK_NAME

from terraform to pulumi

if existing infrastructure was provisioned with Terraform, there are a number of options that will help you adopt Pulumi

  • Coexist with resources provisioned by Terraform by referencing a .tfstate
  • Import existing resources into Pulumi in the usual way or using the tf2pulumi to adopt all resources from an existing .tfstate
  • converting HCL to Pulumi code using tf2pulumi

see also

pulumi-playground's People

Contributors

0xdnl avatar

Watchers

 avatar

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.