Skip to content
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

terraform workflow #1

Merged
merged 3 commits into from
Jun 23, 2023
Merged
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
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)"
}