Creating a New Project

Step 1 — Create a Directory

Each Pulumi project lives in its own directory. Create one now and change into it:

mkdir prop-testing
cd prop-testing

Pulumi will use the directory name as your project name by default. To create an independent project, simply name the directory differently.

Step 2 — Initialize Your Project

A Pulumi project is just a directory with some files in it. It’s possible for you to create a new one by hand. The pulumi new command, however, automates the process:

pulumi new aws-typescript -y

This will print output similar to the following with a bit more information and status as it goes:

Created project 'prop-testing'
Created stack 'dev'
Saved config
Installing dependencies...
Finished installing dependencies

Your new project is ready to go!

This command has created all the files we need, initialized a new stack named dev (an instance of our project), and installed the needed package dependencies from NPM.

Step 3 — Setting AWS Region

Configure the AWS region you would like to deploy to:

pulumi config set aws:region us-west-2

Feel free to choose any AWS region.

Step 4 — Create Pulumi Policy Project

mkdir tests
cd tests

Now we can scaffold a Pulumi policy project:

pulumi policy new aws-typescript

This will print output similar to the following:

Finished installing dependencies

Your new Policy Pack is ready to go! ✨

Once you're done editing your Policy Pack:

   * To run the Policy Pack against a Pulumi program, in the directory of the Pulumi program run `pulumi up --policy-pack /code/prop-testing/tests`
   * To publish the Policy Pack, run `pulumi policy publish [org-name]`