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

Clarify correct use of module outputs in documentation #583

Closed
alexjmoore opened this issue Feb 27, 2021 · 2 comments
Closed

Clarify correct use of module outputs in documentation #583

alexjmoore opened this issue Feb 27, 2021 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@alexjmoore
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

I might have missed it, but I can't find any clear docs around how to reference module outputs, to the point where I almost submitted a bug as I was simply referencing parameters set in a module and I could see it was synthing a string rather than a reference (and so causing me dependency issues - or lack of).

However, now my understanding is that you would do something like (in python):

modulevarname.paramname_output

i.e. add _output to the parameter name that the module is outputting? a) is that correct? (as I think it is from testing and digging around the generated module python code) and b) could some guidance on this point be added to the [using-providers-and-modules.md](https://github.com/hashicorp/terraform-cdk/blob/main/docs/working-with-cdk-for-terraform/using-providers-and-modules.md)

If I am completely doing it wrong, it would be also good to know :-)

Thanks!

@alexjmoore alexjmoore added the enhancement New feature or request label Feb 27, 2021
@jsteinich
Copy link
Collaborator

i.e. add _output to the parameter name that the module is outputting?

This is correct for python. For other languages it is

`${toCamelCase(output.name)}Output`

@danieldreier danieldreier added the documentation Improvements or additions to documentation label Apr 20, 2021
@danieldreier danieldreier added this to the 0.5 milestone Jun 25, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2022

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants