Back to articles
Pulumi Has a Free API: Infrastructure as Code with Real Programming Languages

Pulumi Has a Free API: Infrastructure as Code with Real Programming Languages

via Dev.to TutorialAlex Spinov

What is Pulumi? Pulumi lets you define cloud infrastructure using real programming languages — TypeScript, Python, Go, C#, Java — instead of YAML or HCL. You get loops, conditionals, functions, type checking, and IDE autocomplete for your infrastructure. The open-source engine is completely free . Quick Start curl -fsSL https://get.pulumi.com | sh pulumi new aws-typescript pulumi up Define Infrastructure in TypeScript import * as pulumi from " @pulumi/pulumi " ; import * as aws from " @pulumi/aws " ; // S3 bucket with website hosting const bucket = new aws . s3 . Bucket ( " my-site " , { website : { indexDocument : " index.html " , errorDocument : " error.html " , }, }); // Upload files new aws . s3 . BucketObject ( " index " , { bucket : bucket . id , key : " index.html " , content : " <h1>Hello Pulumi!</h1> " , contentType : " text/html " , }); // CloudFront CDN const cdn = new aws . cloudfront . Distribution ( " cdn " , { origins : [{ domainName : bucket . websiteEndpoint , originId

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles