Skip to content

Commit

Permalink
terraform workflow (#1)
Browse files Browse the repository at this point in the history
* terraform workflow

* add CODEOWNERS

* fix fmt
  • Loading branch information
ForsakenHarmony authored Jun 23, 2023
1 parent 5a7db30 commit 6b50a95
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* ForsakenHarmony
34 changes: 34 additions & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: terraform-config

on:
pull_request: {}
push:
branches: ["main"]

permissions:
contents: read

jobs:
linting:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3

- name: setup terraform
uses: hashicorp/setup-terraform@v1

- name: terraform init
run: terraform init

- name: terraform validate
run: terraform validate

- name: terraform format check
id: fmt
run: terraform fmt -check -recursive -diff

- name: teraform lint
id: tflint
uses: devops-infra/[email protected]
18 changes: 9 additions & 9 deletions modules/vm/variables.tf
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
variable "node" {
type = string
type = string
description = "the proxmox node the VM should run on"
}

variable "pool" {
type = string
default = null
type = string
default = null
description = "the proxmox pool the VM should be assigned to"
}

variable "name" {
type = string
type = string
description = "the name of the vm"
}

variable "cores" {
type = number
type = number
description = "how many cores the VM should have"
}

variable "memory" {
type = number
type = number
description = "how much memory should be available to the VM"
}

variable "disk" {
type = object({
size = string
size = string
storage = string
})
description = "the disk size and storage"
Expand All @@ -40,7 +40,7 @@ variable "network" {
}

variable "qemu_agent" {
type = bool
default = false
type = bool
default = false
description = "whether to enable the QEMU agent (needs support from the guest)"
}

0 comments on commit 6b50a95

Please sign in to comment.