This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tokens=( | |
aws:lambda/function:Function | |
aws:s3/bucket:Bucket | |
aws:iam/role:Role | |
aws:ec2/instance:Instance | |
aws:rds/instance:Instance | |
aws:ec2/securityGroup:SecurityGroup | |
aws:ec2/vpc:Vpc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pnew() { | |
local project_template="$1" | |
local project_home="${HOME}/Projects/dev/pulumi" | |
local project_name="${1}-$(head -n 4096 /dev/urandom | openssl sha1 | awk "{print \$2}" | cut -c1-7)" | |
local project_dir="${project_home}/${project_name}" | |
mkdir -p "$project_dir" && cd "$project_dir" | |
pulumi new "$project_template" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ${PROJECT} | |
description: ${DESCRIPTION} | |
runtime: | |
name: nodejs | |
options: | |
typescript: false | |
template: | |
description: A minimal AWS JavaScript Pulumi program | |
important: true | |
config: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2" | |
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ depth . | |
. | |
├ fmt | |
├ github.com/pulumi/pulumi-azure-native-sdk/resources | |
├ context | |
├ fmt | |
├ os | |
├ reflect | |
├ regexp | |
├ strconv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure project names and descriptions with values obtained from `pulumi new`. | |
name: ${PROJECT} | |
description: ${DESCRIPTION} | |
runtime: yaml | |
# Define the template's configuration settings. | |
template: | |
description: A simple static website on Amazon S3 | |
config: | |
aws:region: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as aws from "@pulumi/aws"; | |
import * as cloudflare from "@pulumi/cloudflare"; | |
const domain = "pulumibook.info"; | |
const subdomain = "my-awesome-website"; | |
// Make a bucket. | |
const bucket = new aws.s3.Bucket("my-bucket", { | |
bucket: `${subdomain}.${domain}`, | |
acl: aws.s3.CannedAcl.PublicRead, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as aws from "@pulumi/aws"; | |
const lambda = new aws.lambda.CallbackFunction("my-function", { | |
callback: () => { | |
console.log("Hello, world!"); | |
}, | |
}); | |
export const { id } = lambda; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from "@pulumi/pulumi"; | |
import * as aws from "@pulumi/aws"; | |
interface StaticWebsiteArgs { | |
domainName: string; | |
defaultDocument?: string; | |
} | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from "@pulumi/pulumi"; | |
import * as aws from "@pulumi/aws"; | |
/** | |
* The StaticWebsite class provisions a cloud storage bucket | |
* and a content-delivery network for it, exposing the name of | |
* the storage bucket and the CDN URL for later use. | |
*/ | |
export class StaticWebsite { | |
private bucket: aws.s3.Bucket; |
NewerOlder