
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Create CloudFormation templates using ruby DSL and launch them with a CLI.
Add this line to your application's Gemfile:
gem 'stackr'
And then execute:
$ bundle
Or install it yourself as:
$ gem install stackr
You must configure your AWS credentials to use stackr. Refer to the ruby aws-sdk.
Commands:
stackr create-project PROJECT_NAME # create stackr project
stackr create-stack TEMPLATE # create a stack from TEMPLATE
stackr create-template TEMPLATE # create a new template generator
stackr delete-stack STACK # delete the stack named STACK
stackr generate-template TEMPLATE # write the template json file
stackr help [COMMAND] # Describe available commands
stackr list-stacks # list all stacks
stackr update-stack TEMPLATE # update the stack created from TEMPLATE
stackr validate-template TEMPLATE # Verify template and parameters
stackr version # show version
stackr create-project myproject
cd myproject
cp .env.example .env
and edit .env
source .env
stackr create-template mytemplate
templates/mytemplate.rb
adding parameters, resources, outputs, etc. See cloudformation-ruby-dsl for tipsstackr generate-template mytemplate
and review the json document created at templates/mytemplate.json
stackr create-stack mytemplate
stackr list-stacks
stackr delete-stack mytemplate
Many times you want to include secrets as stack parameters. These secrets do not belong in your source code. So we hand them in as environment variables.
You can set up a mapping between stack parameters and environment variables using the template parameter_map method.
This example tells stackr to fill in the "Environment" stack parameter with the contents of $ENVIRONMENT when creating or updating the stack.
t.parameter_map = {
'Environment' => 'ENVIRONMENT'
}
You can use a .env
file for your environment variables. It's included in the project .gitignore file.
You may want to use the same template to launch stacks in different environments (e.g. 'dev', 'prd', 'test'). You can edit includes/environment_map.rb
to configure your different environments. This is useful when you are creating resources in different VPCs or Regions for different environments.
In order to support mappings with greater than 64 attributes, we no longer add a mapping for includes/environment_map.rb
directly in the template. Instead, we load the environment map into a lookup table and find_in_env
simply returns the value it finds in that table. This greatly reduces the size if templates with very large environment maps.
If you want to use the old 1.x deprecated behavior be sure to include this line in the body of your template script and use find_in_env_map()
instead of find_in_env()
mapping 'EnvironmentMap', File.join(t.includes_path, 'environment_map.rb')
Bug reports and pull requests are welcome on GitHub at https://github.com/LeafSoftware/stackr.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that stackr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.