Skip to content

Instantly share code, notes, and snippets.

@cnunciato
Created October 28, 2023 15:32
Show Gist options
  • Save cnunciato/4f372c3b7a01d6c41b9877c4db024958 to your computer and use it in GitHub Desktop.
Save cnunciato/4f372c3b7a01d6c41b9877c4db024958 to your computer and use it in GitHub Desktop.
A Pulumi program as a Gist
"use strict";
const pulumi = require("@pulumi/pulumi");
const aws = require("@pulumi/aws");
const awsx = require("@pulumi/awsx");
// Create an AWS resource (S3 Bucket)
const bucket = new aws.s3.Bucket("my-bucket");
// Export the name of the bucket
exports.bucketName = bucket.id;
{
"name": "${PROJECT}",
"main": "index.js",
"dependencies": {
"@pulumi/pulumi": "^3.0.0",
"@pulumi/aws": "^5.0.0",
"@pulumi/awsx": "^1.0.0"
}
}
name: ${PROJECT}
description: ${DESCRIPTION}
runtime:
name: nodejs
options:
typescript: false
template:
description: A minimal AWS JavaScript Pulumi program
important: true
config:
aws:region:
description: The AWS region to deploy into
default: us-east-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment