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 k8s from "@pulumi/kubernetes"; | |
import * as command from "@pulumi/command"; | |
class ServiceDeployment extends pulumi.ComponentResource { | |
internalEndpoint: pulumi.Output<string>; | |
externalEndpoint?: pulumi.Output<string>; | |
service: k8s.core.v1.Service; | |
constructor(name: string, args: { name: string, image: string, replicas?: number, env?: Record<string, pulumi.Input<string>>, ports?: { port: number }[], loadBalancer?: boolean, volumes?: { name: string, mountPath: string, secret: k8s.core.v1.Secret }[] }, opts?: pulumi.ComponentResourceOptions) { | |
super("selfhosted:ServiceDeployment", name, {}, opts); |
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 pulumi | |
import pulumi_aws as aws | |
from typing import Optional, Dict, Tuple | |
import asyncio | |
all_resources: Dict[Tuple[str, str], pulumi.Resource] = {} | |
def transform(args: pulumi.ResourceTransformationArgs) -> Optional[pulumi.ResourceTransformationResult]: | |
all_resources[(args.name, args.type_)] = args.resource | |
return None # do not actually modify the resource |
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 ( | |
"testing" | |
"github.com/stretchr/testify/assert" | |
) | |
type V func(v V) V |
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 k8s from "@pulumi/kubernetes"; | |
import * as k8sOutput from "@pulumi/kubernetes/types/output"; | |
import * as k8sapi from 'kubernetes-client'; | |
const job = new k8s.batch.v1.Job("job", { | |
spec: { | |
template: { | |
spec: { | |
containers: [{ |
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 splunk from "./splunk" | |
async function getSecretValue(): Promise<string> { | |
return "abcd" | |
} | |
getSecretValue().then(secret => { | |
splunk.setAuth(secret); | |
new splunk.SavedSearch("foo", {}); | |
}); |
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"; | |
import * as awsx from "@pulumi/awsx"; | |
import * as random from "@pulumi/random"; | |
// Construct a VPC | |
const vpc = new awsx.ec2.Vpc("vpc"); | |
// Create an Aurora Serverless MySQL database | |
const dbsubnet = new aws.rds.SubnetGroup("dbsubnet", { |
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 awsx from "@pulumi/awsx"; | |
import * as eks from "@pulumi/eks"; | |
import * as k8s from "@pulumi/kubernetes"; | |
// Create an AWS VPC and EKS cluster | |
const vpc = new awsx.Vpc("vpc", { usePrivateSubnets: false }); | |
const cluster = new eks.Cluster("cluster", { | |
vpcId: vpc.vpcId, | |
subnetIds: vpc.subnetIds, | |
}); |
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 services we want to host on our domain... | |
const api1 = new aws.apigateway.x.API("api1", { | |
routes: [ | |
{method: "GET", path: "/", eventHandler: async(ev) => { | |
return { | |
statusCode: 200, | |
body: JSON.stringify({hello: "world"}), |
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
const cloud = require("@pulumi/cloud-aws"); | |
const aws = require("@pulumi/aws"); | |
// A bucket to store videos and thumbnails. | |
const bucket = new cloud.Bucket("bucket"); | |
const bucketName = bucket.bucket.id; | |
// A task which runs a containerized FFMPEG job to extract a thumbnail image. | |
const ffmpegThumbnailTask = new cloud.Task("ffmpegThumbTask", { | |
build: "./docker-ffmpeg-thumb", |
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
const cloud = require("@pulumi/cloud-aws"); | |
const endpoint = new cloud.API("hello"); | |
endpoint.static("/", "www"); | |
endpoint.get("/source", (req, res) => res.json({name: "AWS"})); | |
exports.url = endpoint.publish().url; |
NewerOlder