{"id":13719017,"url":"https://github.com/SCRT-HQ/VaporShell","last_synced_at":"2025-05-07T11:30:45.023Z","repository":{"id":45132005,"uuid":"91840432","full_name":"SCRT-HQ/VaporShell","owner":"SCRT-HQ","description":"A PowerShell module for building, packaging and deploying AWS CloudFormation templates","archived":true,"fork":false,"pushed_at":"2022-01-05T16:39:15.000Z","size":28211,"stargazers_count":48,"open_issues_count":4,"forks_count":9,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-11-02T16:03:58.412Z","etag":null,"topics":["aws","cfn","cfndsl","cloudformation","cloudformation-template","dsl","json","linux","macos","powershell","serverless","ubuntu"],"latest_commit_sha":null,"homepage":"https://vaporshell.io","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SCRT-HQ.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"scrthq","patreon":"scrthq","open_collective":null,"ko_fi":"scrthq","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"paypal.me/SCRTHQ"}},"created_at":"2017-05-19T19:50:18.000Z","updated_at":"2023-10-21T04:50:15.000Z","dependencies_parsed_at":"2022-08-25T23:12:12.531Z","dependency_job_id":null,"html_url":"https://github.com/SCRT-HQ/VaporShell","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCRT-HQ%2FVaporShell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCRT-HQ%2FVaporShell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCRT-HQ%2FVaporShell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCRT-HQ%2FVaporShell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SCRT-HQ","download_url":"https://codeload.github.com/SCRT-HQ/VaporShell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224592380,"owners_count":17337079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cfn","cfndsl","cloudformation","cloudformation-template","dsl","json","linux","macos","powershell","serverless","ubuntu"],"created_at":"2024-08-03T01:00:41.049Z","updated_at":"2024-11-14T08:31:08.803Z","avatar_url":"https://github.com/SCRT-HQ.png","language":"PowerShell","funding_links":["https://github.com/sponsors/scrthq","https://patreon.com/scrthq","https://ko-fi.com/scrthq","paypal.me/SCRTHQ"],"categories":["Code Generation"],"sub_categories":["Hooks"],"readme":"\u003ccenter\u003e\u003cimg src=\"https://vaporshell.io/images/VAPORSHELL-VARIATION2-B.png\" alt=\"VaporShell\" style=\"height: 200px;\" align=\"center\"/\u003e\u003c/center\u003e\n\n***\n\u003c/br\u003e\u003c/br\u003e\n\n\u003cdiv align=\"center\"\u003e\n  :pencil: \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; :package: \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; :rocket:\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003eBuild | Package | Deploy\u003c/strong\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  A PowerShell module for building, packaging and deploying AWS CloudFormation templates :cloud:\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Azure Pipelines --\u003e\n  \u003ca href=\"https://dev.azure.com/scrthq/SCRT%20HQ/_build/latest?definitionId=3\"\u003e\n    \u003cimg src=\"https://dev.azure.com/scrthq/SCRT%20HQ/_apis/build/status/VaporShell-CI\"\n      alt=\"Azure Pipelines\" title=\"Azure Pipelines\" /\u003e\n  \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003c!-- PS Gallery --\u003e\n  \u003ca href=\"https://www.PowerShellGallery.com/packages/VaporShell\"\u003e\n    \u003cimg src=\"https://img.shields.io/powershellgallery/dt/Vaporshell.svg?style=flat\u0026logo=powershell\"\n      alt=\"PowerShell Gallery - Install VaporShell\" title=\"PowerShell Gallery - Install VaporShell\" /\u003e\n  \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003c!-- Discord --\u003e\n  \u003ca href=\"https://discord.gg/G66zVG7\"\u003e\n    \u003cimg src=\"https://img.shields.io/discord/235574673155293194.svg?label=Discord\u0026logo=discord\"\n      alt=\"Discord - Chat\" title=\"Discord - Chat\" /\u003e\n  \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003c!-- Slack Invite --\u003e\n  \u003ca href=\"https://scrthq-slack-invite.herokuapp.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/chat-on%20slack-orange.svg?style=flat\u0026logo=slack\"\n      alt=\"Slack - Chat\" title=\"Slack - Chat\" /\u003e\n  \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003c!-- Slack Status\n  \u003ca href=\"https://scrthq-slack-invite.herokuapp.com/\"\u003e\n    \u003cimg src=\"https://scrthq-slack-invite.herokuapp.com/badge.svg\"\n      alt=\"Slack - Status\" title=\"Slack - Status\" /\u003e\n  \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; --\u003e\n  \u003c!-- Gitter --\u003e\n  \u003ca href=\"https://gitter.im/VaporShell/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\u003e\n    \u003cimg src=\"https://img.shields.io/gitter/room/scrthq/VaporShell.svg?logo=gitter\u0026style=plastic\"\n      alt=\"Gitter - Chat\" title=\"Gitter - Chat\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e\n    \u003ca href=\"https://vaporshell.io\"\u003e\n      Website\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://vaporshell.io/docs/\"\u003e\n      Docs\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://vaporshell.io/docs/examples\"\u003e\n      Examples\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\u003c!--\n    \u003ca href=\"https://github.com/scrthq/VaporShell/blob/master/GitHub/CONTRIBUTING.md\"\u003e\n      Contributing\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e --\u003e\n    \u003ca href=\"https://gitter.im/VaporShell/Lobby\"\u003e\n      Chat\n    \u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt with ❤︎ by \u003ca href=\"https://twitter.com/scrthq\"\u003eNate Ferrell\u003c/a\u003e. Looking for contributors!\n\u003c/div\u003e\n\n\n## Table of Contents\n* [Table of Contents](#table-of-contents)\n* [Features](#features)\n* [Prerequisites](#prerequisites)\n* [Installation](#installation)\n* [Tips](#tips)\n  * [Working with Credentials](#working-with-credentials)\n  * [Bare Necessities](#bare-necessities)\n* [Examples](#examples)\n* [In Action](#in-action)\n* [License](#license)\n* [Changelog](#changelog)\n\n## Features\n\n- __built from AWS's [CloudFormation spec sheet](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html):__ 100% coverage of all available resource and property types\n- __runs on any OS:__ developed and tested in Windows, Ubuntu, and macOS on PowerShell v3-6\n- __validates everything:__ built to make resulting templates reliable by leveraging parameter validation built into PowerShell\n- __goes turbo:__ package and deploy your templates **fast** with one command: `vsl vaporize`\n\n\n## Prerequisites\n\n- PowerShell 3+\n  - On Linux or macOS? [Grab PowerShell 6 here!](https://github.com/powershell/powershell#get-powershell)\n- .NET 4.5.0+ OR .netstandard 1.3+\n  - if you have PowerShell 4 or greater, you're covered!\n\n**Recommended:** [ AWS Labs `cfn-flip`](https://github.com/awslabs/aws-cfn-template-flip)\n\u003e If you are working with YAML templates, you need to install `cfn-flip`. VaporShell uses `cfn-flip` under the hood to work with YAML templates, as PowerShell does not natively support YAML at this time. If you are only working in JSON, then `cfn-flip` isn't necessary.\n\n\n## Installation\n\n**[Preferred]** On PowerShell 5+ or [have PowerShellGet installed](https://www.microsoft.com/en-us/download/details.aspx?id=51451)? Install directly from the PowerShell Gallery:\n\n```powershell\nInstall-Module VaporShell -Scope CurrentUser\n```\n\n**[Alternative]** Not on PowerShell 5+, can't install PowerShellGet, or policies blocking installation from remote sources? You're covered as well:\n\n1. Head to the [Releases](https://github.com/SCRT-HQ/VaporShell/releases) section in the repo\n2. Download the *VaporShell.zip* file attached to the latest release.\n3. **If on Windows**: Right-click the downloaded zip, select Properties, then unblock the file.\n    \u003e _This is to prevent having to unblock each file individually after unzipping._\n4. Unzip the archive.\n5. (Optional) Place the module folder somewhere in your `PSModulePath`.\n    \u003e _You can view the paths listed by running the environment variable `$env:PSModulePath`_\n6. Import the module, using the full path to the PSD1 file in place of `VaporShell` if the unzipped module folder is not in your `PSModulePath`:\n    ```powershell\n    # In $env:PSModulePath\n    Import-Module VaporShell\n\n    # Otherwise, provide the path to the manifest file:\n    Import-Module -Path C:\\MyPSModules\\VaporShell\\2.6.2\\VaporShell.psd1\n    ```\n\n## Tips\n\n### Working with Credentials\n\nIf you are planning on packaging or deploying to CloudFormation, you will need to setup credentials in your local Shared Credentials file. _If you are using the AWS command-line interface (CLI) and already have setup credentials, then you should be ready to go._\n\nYou can update or add a credential profile with `Set-VSCredential`:\n\n```powershell\nSet-VSCredential -AccessKey $accessKey -SecretKey $secretKey -Region USWest1 -ProfileName DevAccount\n```\n\n### Bare Necessities\n\nWhen building templates with VaporShell, there are typically a few items that you'll want to include in your build script:\n\n1. Create a template object by calling one of these into a variable\n    - `$template = Initialize-VaporShell`\n        - Use when starting from scratch\n    - `$template = Import-VaporShell -Path .\\template.json`\n        - Use when importing from an existing template to build off of\n2. Build out your template by using the object's ScriptMethods:\n    - `$template.AddResource()`\n    - `$template.AddParameter()`\n    - `$template.AddOutput()`\n    - etc....\n3. Export your template to local file or `stdout` (useful for piping directly into `New-VSStack` or other functions that support TemplateBody as pipeline input)\n    - `Export-VaporShell -VaporshellTemplate $template -Path .\\template.json`\n        - This will output the template as `template.json` in your working directory\n    - `Export-VaporShell -VaporshellTemplate $template`\n        - This will output the template to `stdout` as a single string\n    - `$template.ToJSON()`\n        - This script method on the template object performs the same function as `Export-VaporShell -VaporshellTemplate $template` and outputs the string template as JSON to `stdout`\n    - `$template.ToYAML()`\n        - This does the same thing as the `ToJSON()` script method, but outputs to YAML (`cfn-flip` required)\n\n\n## Examples\n\n```powershell\n#1 Initialize a VaporShell object\n$vsl = Initialize-VaporShell -Description \"A function triggered on a timer.\"\n\n#2 Add a Serverless function with local code as the CodeUri and a schedule of 5 minutes (split into multiple lines for readability)\n$samFunction = New-SAMFunction `\n    -LogicalId \"ScheduledFunction\" `\n    -Handler \"index.handler\" `\n    -Runtime \"nodejs6.10\" `\n    -CodeUri \".\\code\" `\n    -Events (Add-SAMScheduleEventSource -LogicalId Timer -Schedule \"rate(5 minutes)\")\n$vsl.AddResource($samFunction)\n$TemplateFile = \".\\sched-func.yaml\"\n\n#3 Save the template as YAML using the VaporShell object's ToYAML() method (uses cfn-flip to convert to/from YAML)\n$vsl.ToYAML($TemplateFile)\n\n\u003c#4 Package and deploy (vsl vaporize) the template file (--tf $TemplateFile) as a change set with parameters:\n    - stack name (--sn) 'sched-func'\n    - S3 bucket also named 'sched-func' (defaults to the stack name if --s3 is not passed)\n    - capabilities: CAPABILITY_IAM (--caps iam)\n    - Verbose (--v) enabled\n    - Force (--f) enabled (make sure that the bucket is created and objects are uploaded)\n    - Watch (--w) the stack events in colorized output after executing the change\n#\u003e\nvsl vaporize --tf $TemplateFile --sn sched-func --caps iam --v --f --w\n\n```\nCheck out the [Examples page](https://vaporshell.io/docs/examples) for more.\n\n\n## In Action\n\nThis is a deployment being watched via `Watch-Stack $stackName` to show stack creation and deletion mid-deploy:\n![Watch-Stack in action](https://vaporshell.io/images/Watch-Stacks.gif)\n\n## License\n[Apache 2.0](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))\n\n## Changelog\n\n[Changelog](https://github.com/scrthq/VaporShell/blob/main/CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSCRT-HQ%2FVaporShell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSCRT-HQ%2FVaporShell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSCRT-HQ%2FVaporShell/lists"}