Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug: coder templates create inside non-terraform directory just hangs #918

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

Closed
Tracked by #635 ...
bpmct opened this issue Apr 7, 2022 · 4 comments
Closed
Tracked by #635 ...

Comments

@bpmct
Copy link
Member

bpmct commented Apr 7, 2022

OS Information

  • OS: Ubuntu 20.04

  • Architecture: x64

  • coder --version:

    root@coder-v2:~/coder# coder --version
    Coder v0.4.0+fe23dcd Wed Apr  6 18:12:37 UTC 2022
    https:/github.com/coder/coder/commit/fe23dcd3fcb344efaaccf8b4917e29304392a202
    

Steps to Reproduce

mkdir test
cd test
coder templates create

Expected

Some type of error stating there is no main.tf in the current directory and potentially pointing the user to coder templates init

Actual

root@coder-v2:~/coder# coder templates create
✔ Queued [-11ms]
⧗  Running 

hangs for a long time

@bpmct bpmct added the bug 🐛 label Apr 7, 2022
@bpmct
Copy link
Member Author

bpmct commented Apr 19, 2022

Seeing this as well in large directories:

root@coder-v2:~/coder# coder template create
> Create and upload "~/coder"? (yes/no) yes
Archive too big. Must be <= 1048576 bytes
root@coder-v2:~/coder# 

@ammario ammario added this to the V2 Beta milestone May 4, 2022
@misskniss misskniss modified the milestones: V2 Beta, Community MVP May 5, 2022
@spikecurtis
Copy link
Contributor

I'm not repro'ing this on Coder v0.5.2-devel+568574c Wed May 4 22:42:58 UTC 2022

coder@dogfood-general:/tmp/test/test2$ coder2 templates create --url https://trusting-archimedes4.try.coder.app
> Create and upload "/tmp/test/test2"? (yes/no) yes
✔ Queued [150ms]
✔ Setting up [1ms]
✔ Parse parameters [2ms]
⧗  Detecting persistent resources 
  Terraform 1.1.9
  Error: No configuration files
  Plan requires configuration to be present. Planning without a configuration would mark everything for destruction, which is normally not what is desired. If you would like to destroy everything, run plan with the -destroy option. Otherwise, create a Terraform configuration file (.tf file) and try again.
✘ Detecting persistent resources [230ms]
template import provision for start: recv import provision: plan terraform: exit status 1

@bpmct
Copy link
Member Author

bpmct commented May 5, 2022

I'm not repro'ing this on Coder v0.5.2-devel+568574c Wed May 4 22:42:58 UTC 2022

coder@dogfood-general:/tmp/test/test2$ coder2 templates create --url https://trusting-archimedes4.try.coder.app
> Create and upload "/tmp/test/test2"? (yes/no) yes
✔ Queued [150ms]
✔ Setting up [1ms]
✔ Parse parameters [2ms]
⧗  Detecting persistent resources 
  Terraform 1.1.9
  Error: No configuration files
  Plan requires configuration to be present. Planning without a configuration would mark everything for destruction, which is normally not what is desired. If you would like to destroy everything, run plan with the -destroy option. Otherwise, create a Terraform configuration file (.tf file) and try again.
✘ Detecting persistent resources [230ms]
template import provision for start: recv import provision: plan terraform: exit status 1

I am seeing this too, I imagine this has been fixed

@spikecurtis
Copy link
Contributor

@bpmct closing. I think large directories are a separate issue, and require some discussion about what is acceptable for a template upload. Please raise a separate ticket if we want to track that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants