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

Nonscalar resolver and hook arguments #140

Closed
sftrabbit opened this issue Jun 10, 2017 · 3 comments
Closed

Nonscalar resolver and hook arguments #140

sftrabbit opened this issue Jun 10, 2017 · 3 comments

Comments

@sftrabbit
Copy link
Contributor

YAML's tag syntax supports nonscalar tag arguments, such as lists or mappings (or even other tags). For example:

!sometag
  foo: bar
  baz: 123

However, Sceptre doesn't allow this for the arguments of resolvers and hooks. The resolver and hook constructors added to the YAML loader assume a scalar argument when calling loader.construct_scalar(node) (for both resolvers and hooks).

It would be useful to support nonscalar arguments for both resolvers and hooks for more configurable cases such as something like this:

!s3_upload
  path: some/file/path
  s3_bucket: !stack_output another_stack::BucketName
  s3_object_key: some_key

(Note the nested resolver! That's a bonus!)

There's a few ways to work around this at the moment, such as by passing things through sceptre_user_data or by passing strings that you parse into multiple arguments, but they typically result in some shenanigans involving using sceptre internals. Nonscalar arguments would be very neat and tidy!

PR incoming...

@cbosss
Copy link
Contributor

cbosss commented Nov 1, 2017

@theseanything any thoughts on this feature? Anything I can help implement?

@ngfgrant
Copy link
Contributor

Hi @sftrabbit - great issue and nice PR. Unfortunately, Sceptre has changed quite a bit. If this is still something you would like to see then you may need to redo the implementation of this 🙏

ngfgrant pushed a commit that referenced this issue Dec 8, 2018
* Reorder Resolver and ResolvableProperty

* Add support for nonscalar arguments to resolvers and hooks

* add a test to ensure nested stack_output gives a dependency properly
@ngfgrant
Copy link
Contributor

ngfgrant commented Dec 9, 2018

Resolved by #473

@ngfgrant ngfgrant closed this as completed Dec 9, 2018
ngfgrant pushed a commit that referenced this issue May 9, 2019
* Reorder Resolver and ResolvableProperty

* Add support for nonscalar arguments to resolvers and hooks

* add a test to ensure nested stack_output gives a dependency properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants