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

Access stack_group_config in stack group config #729

Closed
cornerman opened this issue Jun 8, 2019 · 2 comments
Closed

Access stack_group_config in stack group config #729

cornerman opened this issue Jun 8, 2019 · 2 comments

Comments

@cornerman
Copy link
Contributor

Can we somehow access other stack-group-config values within a config.yaml?

Example config.yaml:

project_code: "Bla" # may be overwritten in a stack-group-config beneath this one
template_bucket_name: {{ stack_group_config.project_code }}-cloudformation-templates
@ngfgrant
Copy link
Contributor

I think this is the same request in #624 and #355 will close for now.

@et304383
Copy link

et304383 commented Oct 7, 2021

@ngfgrant this isn't the same issue. I just came across the same problem.

I want to define once a resource name prefix of project_code + stack_group_path in config.yaml rather than having to put into each stack definition.

IE - under config/dev/config.yaml I want to define:

sceptre_user_data:
  resource_name_prefix: {{ stack_group_config.project_code }}-{{ stack_group_config.stack_group_path }}

So that in every template I can now reference:

{{ sceptre_user_data.resource_name_prefix }}

Unfortunately, this only works if I put the sceptre_user_data declaration into the stack config, not the stack group config.

What is the point of having config cascading logic if you can't define a variable anywhere?

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

No branches or pull requests

3 participants