This file contains hidden or 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
| [ | |
| "all", | |
| "the", | |
| "names" | |
| ].sort(() => Math.random() > .5 ? -1 : 1).slice(0, 3); |
This file contains hidden or 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 pulumi | |
| from pulumi_gcp import cloudrun | |
| # Create a Cloud Run service. | |
| service = cloudrun.Service("my-app", | |
| location="us-central1", | |
| template={ | |
| "spec": { | |
| "containers": [{ | |
| "image": "us-docker.pkg.dev/cloudrun/container/hello", |
This file contains hidden or 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"; | |
| import * as apigateway from "@pulumi/aws-apigateway"; | |
| import * as fs from "fs"; | |
| const fn = new aws.lambda.CallbackFunction("fn", { | |
| callback: async (ev, ctx) => { | |
| return { | |
| statusCode: 200, | |
| body: new Date().toISOString(), |
This file contains hidden or 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
| use_hugo() { | |
| local VERSION="$1" | |
| local TARFILE="hugo_${VERSION}_darwin-universal.tar.gz" | |
| local TEMP_DIR="${HOME}/Downloads/hugo_temp" | |
| local DESTFILE="${TEMP_DIR}/$TARFILE" | |
| mkdir -p "$TEMP_DIR" | |
| curl -L -o "$DESTFILE" "https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${TARFILE}" && \ | |
| tar -xzvf "$DESTFILE" -C "$TEMP_DIR" && \ | |
| sudo mv "${TEMP_DIR}/hugo" "/usr/local/bin/" && \ |
This file contains hidden or 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
| from some_module import make_bucket | |
| # Call a function to make a bucket. | |
| make_bucket() |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
NewerOlder