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

cdktf diff is not showing plan output when ran on Terraform Cloud #2234

Closed
daniel-laszlo opened this issue Oct 31, 2022 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. size/medium estimated < 1 week terraform cloud
Milestone

Comments

@daniel-laszlo
Copy link
Contributor

daniel-laszlo commented Oct 31, 2022

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

Python 3.9
CDKTF 0.13.2
Terraform Cloud

Affected Resource(s)

cdktf diff

Debug Output

$ cdktf diff STACK                 
[2022-10-31T15:31:40.275] [DEBUG] default - Initializing error reporting
[2022-10-31T15:31:40.282] [DEBUG] default - Collecting environment information for error reporting
[2022-10-31T15:31:40.299] [DEBUG] default - {
  "terraform_version": "1.3.2",
  "platform": "darwin_arm64",
  "provider_selections": {},
  "terraform_outdated": true
}

[2022-10-31T15:31:40.299] [DEBUG] default - {
  "terraform_version": "1.3.2",
  "platform": "darwin_arm64",
  "provider_selections": {},
  "terraform_outdated": true
}

[2022-10-31T15:31:40.300] [DEBUG] default - v16.16.0

[2022-10-31T15:31:40.313] [DEBUG] default - v16.16.0

[2022-10-31T15:31:40.351] [DEBUG] default - Terraform v1.3.2
on darwin_arm64

[2022-10-31T15:31:40.352] [DEBUG] default - 
Your version of Terraform is out of date! The latest version
is 1.3.3. You can update by downloading from https://www.terraform.io/downloads.html


⠇  Synthesizing
[2022-10-31T15:31:41.890] [DEBUG] default - Name: constructs

[2022-10-31T15:31:41.890] [DEBUG] default - Version: 10.1.145
Summary: A programming model for software-defined state
Home-page: https://github.com/aws/constructs
Author: Amazon Web Services
Author-email: 
License: Apache-2.0

[2022-10-31T15:31:41.891] [DEBUG] default - Location: /Users/daniel.laszlo/.local/share/virtualenvs/cdktf--05tE73m/lib/python3.9/site-packages
Requires: jsii, publication, typeguard
Required-by: cdktf, cdktf-cdktf-provider-gitlab

[2022-10-31T15:31:41.908] [DEBUG] default - Name: cdktf

[2022-10-31T15:31:41.908] [DEBUG] default - Version: 0.13.2
Summary: Cloud Development Kit for Terraform
Home-page: https://github.com/hashicorp/terraform-cdk
Author: HashiCorp

[2022-10-31T15:31:41.909] [DEBUG] default - Name: jsii
Version: 1.70.0
Summary: Python client for jsii runtime
Home-page: https://github.com/aws/jsii
Author: Amazon Web Services
Author-email: 
License: Apache-2.0
Location: /Users/daniel.laszlo/.local/share/virtualenvs/cdktf--05tE73m/lib/python3.9/site-packages
Requires: attrs, cattrs, publication, python-dateutil, typeguard, typing-extensions

[2022-10-31T15:31:41.909] [DEBUG] default - Author-email: 
License: MPL-2.0
Location: /Users/daniel.laszlo/.local/share/virtualenvs/cdktf--05tE73m/lib/python3.9/site-packages
Requires: constructs, jsii, publication, typeguard
Required-by: cdktf-cdktf-provider-gitlab


⠏  Synthesizing
[2022-10-31T15:31:41.991] [DEBUG] default - Failed to run pip --version: Error: spawn pip ENOENT

⠸  Synthesizing


STACK  Creating Terraform Cloud configuration version

STACK  Created Terraform Cloud configuration version cv-XXXXXXXXXXXXXXXX

⠧  Processing
[2022-10-31T15:31:49.203] [DEBUG] default - Could not remove .terraform folder Error: ENOENT: no such file or directory, stat 'PATH/cdktf/cdktf.out/stacks/STACK/.terraform'
    at Object.statSync (node:fs:1551:3)
    at __node_internal_ (node:internal/fs/utils:799:8)
    at Object.rmSync (node:fs:1226:13)
    at Ff.removeLocalTerraformDirectory (/usr/local/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:458:9727)
    at Ff.init (/usr/local/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:458:3256)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Ff.n.value (/usr/local/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:458:666)
    at async FM.initalizeTerraform (/usr/local/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:458:14385)
    at async /usr/local/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:458:14791
    at async FM.run (/usr/local/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:458:14465) {
  errno: -2,
  syscall: 'stat',
  code: 'ENOENT',
  path: 'PATH/cdktf/cdktf.out/stacks/STACK/.terraform'
STACK  Zipping up the directory cdktf.out/stacks/STACK

STACK  Uploading the directory to Terraform Cloud

STACK  Uploaded the directory to Terraform Cloud

STACK  Waiting for configuration version to become ready...



STACK  Creating speculative Terraform Cloud run

STACK  Created speculative Terraform Cloud run: https://app.terraform.io/app/ORGANIZATION/workspaces/WORKSPACE/runs/run-XXXXXXXXXXXXXXXX

STACK  Speculative Terraform Cloud run done

STACK  Getting plan output

⠋  Processing

$  # Command returned at this point

Expected Behavior

Show list of additions, removals, modifications - this works for cdktf deploy for some reason.

Actual Behavior

No output at all.

Steps to Reproduce

Important Factoids

References

@daniel-laszlo daniel-laszlo added bug Something isn't working new Un-triaged issue labels Oct 31, 2022
@daniel-laszlo daniel-laszlo changed the title cdktf diff is not showing plan output when ran on Terraform Cloud Agent cdktf diff is not showing plan output when ran on Terraform Cloud Oct 31, 2022
@DanielMSchmidt
Copy link
Contributor

This is not really a bug, but the expected behaviour right now. We might change the behaviour though when we switch out our current Terraform Cloud implementation by using the terraform cli.

@DanielMSchmidt DanielMSchmidt added enhancement New feature or request terraform cloud priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. size/large estimated < 1 month and removed bug Something isn't working new Un-triaged issue labels Nov 11, 2022
@DanielMSchmidt
Copy link
Contributor

Terraform CLI does show the plan, so #1955 should fix this

@DanielMSchmidt DanielMSchmidt added size/medium estimated < 1 week and removed size/large estimated < 1 month labels Nov 15, 2022
@DanielMSchmidt DanielMSchmidt added this to the 0.15 (tentative) milestone Nov 15, 2022
@DanielMSchmidt DanielMSchmidt self-assigned this Dec 15, 2022
@DanielMSchmidt
Copy link
Contributor

Fixed in #1955

@github-actions
Copy link
Contributor

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 Jan 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. size/medium estimated < 1 week terraform cloud
Projects
None yet
Development

No branches or pull requests

2 participants