Skip to content

Instantly share code, notes, and snippets.

@cnunciato
Created January 4, 2024 23:08
Show Gist options
  • Save cnunciato/0089ec88bb01aa455bad96c94f15fe32 to your computer and use it in GitHub Desktop.
Save cnunciato/0089ec88bb01aa455bad96c94f15fe32 to your computer and use it in GitHub Desktop.
pulumi new helper
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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment