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

Terraform Output doesn't handle Optional Types #83

Closed
skorfmann opened this issue May 13, 2020 · 1 comment
Closed

Terraform Output doesn't handle Optional Types #83

skorfmann opened this issue May 13, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@skorfmann
Copy link
Contributor

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

cdktf & Language Versions

  • All

Affected Resource(s)

  • TerraformOutput
const instance = new Instance(this, 'hello', {
  ami: 'ami-abcde123',
  instanceType: 't2.micro'
});

new TerraformOutput(this, 'instance_tags', {
    value: instance.tags
});

Expected Behavior

It assigns the instance tags as value for the TerraformOutput

Actual Behavior

Type '{ [key: string]: string; } | undefined' is not assignable to type 'string | number | boolean | any[] | { [key: string]: any; }'.
  Type 'undefined' is not assignable to type 'string | number | boolean | any[] | { [key: string]: any; }'.ts(2322)

References

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 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 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants