Skip to content

Adding coder template #16

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions coder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
display_name: Scratch
description: A minimal starter template for Coder
icon: ../../../site/static/emojis/1f4e6.png
maintainer_github: coder
verified: true
tags: []
---

# A minimal Scaffolding for a Coder Template

Use this starter template as a basis to create your own unique template from scratch.
26 changes: 26 additions & 0 deletions coder/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
terraform {
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"
}
}
required_version = ">= 0.13"
}

provider "openstack" {
token = var.token
auth_url = "https://identity.cloud.muni.cz/v3"
region = "brno1"
allow_reauth = false
}

resource "openstack_compute_instance_v2" "terra_ubuntu" {
name = var.instance_name
image_name = "ubuntu-focal-x86_64"
flavor_name = var.flavor
key_pair = var.ssh

network {
uuid = var.local_network_id
}
}
24 changes: 24 additions & 0 deletions coder/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
variable "instance_name" {
type = string
default = "from ondemand and coder"
}

variable "ssh" {
type = string
default = "acer win"
}

variable "local_network_id" {
type = string
default = "03b21c24-910f-4ec5-a8f3-419db219b383"
}


variable "token" {
type = string
}

variable "flavor" {
type = string
default = "standard.tiny"
}
Loading