Closed
Description
If a Coder deployment intends to have many templates, an admin may want a way to share resources across/between templates.
Examples include:
- Common
aws_instance
configuration (specific VPC, security groups) - Common bash scripts or shell snippets (entire startup_script or snippets for code-server, Jupyter, dotfiles)
Terraform modules are an appealing way to consolidate configuration and can be imported into templates. While it's possible there are other ways Coder can help with this, we should document the Terraform-native approach first.
In the document:
- Recommend hosting Terraform module in a git repo
- Basic example of creating/importing a module that includes resources (specific VPC for AWS, security groups, some variables)
- Basic example of creating/importing a module that includes shell script examples via Terraform outputs (entire startup_script or snippets for code-server, Jupyter, dotfiles)
Explore/document:
- Basic docs on how to authenticate
coder server
to download modules from private GitHub repos - Basic docs on how/whether a module could include the
coder_agent
parts too - Any gotchas/known issues about importing Terraform modules in Coder