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

Output handling or integration recommendations? #802

Closed
matschaffer opened this issue Jun 29, 2021 · 4 comments
Closed

Output handling or integration recommendations? #802

matschaffer opened this issue Jun 29, 2021 · 4 comments
Labels
question Further information is requested

Comments

@matschaffer
Copy link

matschaffer commented Jun 29, 2021

I'm using cdktf to stand up a few cloud assets (elastic cloud clusters) and I'd like to do work against them after the cdktf deploy completes.

So what I've done is to make a bunch of TerraformOutputs then I can run terraform output -json > outputs.json and read things like endpoints and passwords from there.

But this prompted a few questions:

  1. Is there an easier way to integrate the applied stack with followup scripts? They'd all be in package.json scripts. I looked to see if there was some sort of afterSynthesize similar to TerraformAsset.onSynthesize but couldn't find anything.
  2. If not, is there a way cdktf can send outputs to a file on its own?
  3. Sensitive outputs seem to get displayed by cdktf unmasked. Is this expected? This isn't a big deal for my purposes, but maybe I should open this as a separate bug issue?

Thanks in advance for the recommendations!

@skorfmann
Copy link
Contributor

Is there an easier way to integrate the applied stack with followup scripts? They'd all be in package.json scripts. I looked to see if there was some sort of afterSynthesize similar to TerraformAsset.onSynthesize but couldn't find anything.

No, there's not - but that's something on our radar - see #682 - Would this address your use-case?

If not, is there a way cdktf can send outputs to a file on its own?

No, but that would be a great option which would probably be part of this #227

Sensitive outputs seem to get displayed by cdktf unmasked. Is this expected? This isn't a big deal for my purposes, but maybe I should open this as a separate bug issue?

You mean when the outputs are rendered as part of deploy? That's a good point, and I think we should respect that. Would be great if you could create a bug.

A general question: Which language are you using for cdktf - Typescript or something else?

@skorfmann skorfmann added the question Further information is requested label Jun 29, 2021
@matschaffer
Copy link
Author

No, there's not - but that's something on our radar - see #682 - Would this address your use-case?

Nice. That looks like the ticket. I've commented there. Thanks!

No, but that would be a great option which would probably be part of this #227

Indeed. I commented there too with the workaround I have in place at the moment.

You mean when the outputs are rendered as part of deploy? That's a good point, and I think we should respect that. Would be great if you could create a bug.

Sweet. I'll do that today. Just want to get a small reproduction case first.

A general question: Which language are you using for cdktf - Typescript or something else?

Yep. Typescript. I'm using it to help drive performance analysis for elasticsearch and kibana. Since kibana dev is all typescript, I think this will be a nice way to get terraform more into that space.

@matschaffer
Copy link
Author

Opened #809 to follow up on the unmasked outputs. Thanks for the info!

@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
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants