Skip to content

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

Closed

Description

@bpmct

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

Activity

  1. bpmct commented on Apr 19, 2022

    @bpmct
    MemberAuthor

    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# 
  2. added this to the V2 Beta milestone on May 4, 2022
  3. spikecurtis commented on May 5, 2022

    @spikecurtis
    Collaborator

    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
    
  4. bpmct commented on May 5, 2022

    @bpmct
    MemberAuthor

    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

  5. spikecurtis commented on May 5, 2022

    @spikecurtis
    Collaborator

    @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.

  6. removed this from the Community MVP milestone on Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions