8000 Support passing `tfvars` files for terraform based provisioner workspaces · Issue #1590 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content
Support passing tfvars files for terraform based provisioner workspaces #1590
Closed as not planned
@Emyrk

Description

@Emyrk

What is your suggestion?

Terraform supports using a tfvars. It would be nice if you could do a coder workspaces create --tfvars=my.tfvars.

Currently we are aiming to support yaml/json files to answer all prompts (#1377, #1541).

Supporting tfvars gets a bit complicated. For one, ideally we do not interpret/parse the tfvars, and pass it "as is" to terraform apply/plan. One solution is to support passing a new ParameterDestination type file, which lets writing files to the directory where terraform is run. This could possibly be a security issue though, as now users can not only set all parameters, but are writing arbitrary files to the provisionerd node :(.

Options:

  • Parse the tfvars first and do some sanity checks before uploading the file. This would require us to understand the file extension type, rather than a generic "file upload param".

Why do you want this feature?

terraform apply and coder workspace create become "synonymous" for sake of testing.

Are there any workarounds to get this functionality today?

Yes, use yaml or json files instead.

Are you interested in submitting a PR for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0