question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass in "Extra" Values

See original GitHub issue

Feature Request

I’d like to be able to pass in values for additional properties to the MODULE types.

Example for a module named ACME::FOO::LogGroup::MODULE:

Parameters:
  FunctionName:
    Type: String

Resources:
  LogGroup:
    Type: AWS::Logs::LogGroup
    Properties:
      LogGroupName: !Sub /aws/lambda/${FunctionName}

Example use case of a default property as defined by CloudFormation/API:

LogGroup:
    Type: ACME::FOO::LogGroup::MODULE
    Properties:
      FunctionName: !Ref SomeLambdaFunction
      RetentionInDays: 3 << "Default" Property.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
taylorbartleycommented, Jun 5, 2021

@benbridts I really appreciate the extra info you included. To be clear, I do understand this was a very niche ask, and is probably outside the philosophical scope of modules in general. I mainly asked out of curiosity to see how far we could extend them. I’m satisfied with the dialog. Whoever’s in charge, please feel free to close or resolve this issue thank you!

1reaction
benbridtscommented, May 26, 2021

I understand the use case (it is very tempting to use modules to set your own defaults), but I personally would recommend against doing this.

  • It makes it significantly harder to know the configuration of what will be deployed because you need to look at both the AWS documentation and the module documentation (or even source code).
  • The ACME::FOO::LogGroup::MODULE might not be used in other modules you’re writing, and that’s hard to see form the top-level
  • ACME::FOO::LogGroup::MODULE will definitely not be used in modules that are shared as Open Source projects
  • Other Companies are running into this issue too

If you want more background on that, here are some links for possibly diving deeper

Read more comments on GitHub >

github_iconTop Results From Across the Web

Passing Extra Parameters - MATLAB & Simulink - MathWorks
The following sections show how to provide the additional parameters a, b, and c. The solutions are for parameter values a = 4,...
Read more >
Pass an extra argument to a callback function - Stack Overflow
I want to pass the function processMagic as an argument to callWithMagic , but I also want to pass 42 as the second...
Read more >
How to pass extra variables to an Ansible playbook - Red Hat
To pass a value to nodes, use the --extra-vars or -e option while running the Ansible playbook, as seen below. # ansible-playbook myplaybook.yaml ......
Read more >
Function calls should not pass extra arguments
You can easily call a JavaScript function with more arguments than the function needs, but the extra arguments will be just ignored by...
Read more >
Pass extra values from a ComboBox - Ext-amples - Google Sites
If there is a need to post multiple values from a ComboBox, it can be done using the extra parameters of the control...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found