Skip to content

Commit 6b50a95

Browse files
terraform workflow (#1)
* terraform workflow * add CODEOWNERS * fix fmt
1 parent 5a7db30 commit 6b50a95

File tree

3 files changed

+44
-9
lines changed

3 files changed

+44
-9
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* ForsakenHarmony

.github/workflows/terraform.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: terraform-config
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches: ["main"]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
linting:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v3
18+
19+
- name: setup terraform
20+
uses: hashicorp/setup-terraform@v1
21+
22+
- name: terraform init
23+
run: terraform init
24+
25+
- name: terraform validate
26+
run: terraform validate
27+
28+
- name: terraform format check
29+
id: fmt
30+
run: terraform fmt -check -recursive -diff
31+
32+
- name: teraform lint
33+
id: tflint
34+
uses: devops-infra/[email protected]

modules/vm/variables.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
variable "node" {
2-
type = string
2+
type = string
33
description = "the proxmox node the VM should run on"
44
}
55

66
variable "pool" {
7-
type = string
8-
default = null
7+
type = string
8+
default = null
99
description = "the proxmox pool the VM should be assigned to"
1010
}
1111

1212
variable "name" {
13-
type = string
13+
type = string
1414
description = "the name of the vm"
1515
}
1616

1717
variable "cores" {
18-
type = number
18+
type = number
1919
description = "how many cores the VM should have"
2020
}
2121

2222
variable "memory" {
23-
type = number
23+
type = number
2424
description = "how much memory should be available to the VM"
2525
}
2626

2727
variable "disk" {
2828
type = object({
29-
size = string
29+
size = string
3030
storage = string
3131
})
3232
description = "the disk size and storage"
@@ -40,7 +40,7 @@ variable "network" {
4040
}
4141

4242
variable "qemu_agent" {
43-
type = bool
44-
default = false
43+
type = bool
44+
default = false
4545
description = "whether to enable the QEMU agent (needs support from the guest)"
4646
}

0 commit comments

Comments
 (0)