Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack Configuration & Parameter List processing Enhancements #671

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

njsnx
Copy link

@njsnx njsnx commented Apr 9, 2019

This PR provides additional functionality and an enhancement to how Lists are processed when provided as a parameter value.

  • Added stack_configuration as an optional argument to accept for sceptre_handler(). This allows templates written in python to get additional information about the stack being built to enhance the capabilities of the Python code generating the template.

  • Enhanced list processing when a list of values is provided to a Parameter. If the value provided to a parameter was from a variable which was a list of values, it would treat the list as a single item where as now it will form 1 string from all values in the list. This allows for a combination of variable values from files and static values to be used.

Example

Subnets: {{ var.subnets }} # Wouldn't work before, if var.subnets was itself a list
Subnets: # Wouldn't work before, the string would become [subnet-1234,subnet,1234],subnet-123
  - {{ var.subnets }}
  - subnet-123 

PR Checklist

  • Wrote a good commit message & description [see guide below].
  • Used the same coding conventions as the rest of the project.
  • The new code passes flake8 (make lint) checks.
  • Commit message starts with [Resolve #issue-number].
  • Added/Updated unit tests.
  • Added/Updated integration tests (if applicable).
  • All unit tests (make test) are passing.
  • The PR relates to only one subject with a clear title.
    and description in grammatically correct, complete sentences.

Approver/Reviewer Checklist

  • Before merge squash related commits.

Other Information

Guide to writing a good commit

Neil Stewart added 4 commits April 9, 2019 08:44
* Provide Formatted Parameters into stack_configuration for sceptre python processing
* Added better processing to List values in Parameters to allow variation of multiple  variable files and static values
@njsnx
Copy link
Author

njsnx commented Apr 9, 2019

@ngfgrant Appreciate this may not follow some of the parts in the commit check list but wanted to get this up to at least figure out how best to place it.

I was unsure how to split out my commit so that I could submit the list processing enhancement into it's own thing and the way that I am doing the new feature to allow stack_configuration to work.

I can raise 2 Issues to discuss each part of this if that is preferred.

@njsnx
Copy link
Author

njsnx commented Apr 23, 2019

@ngfgrant Looking for input on this PR too. How do we get this into an appropriately tested, "good" commit in your view on what I'm setting out to achieve with this PR. that being, the ability to get the processed stack configuration, in full, into sceptre_handler() as an optional argument (to not break backwards compatibility)

@ngfgrant
Copy link
Contributor

Thanks @nmyster will give this a look too soon.

@euanmaxwell
Copy link

+1

Is there any update on this issue @ngfgrant ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants