diff --git a/.github/workflows/host_01_production.yml b/.github/workflows/host_01_production.yml index e5483af..8124792 100644 --- a/.github/workflows/host_01_production.yml +++ b/.github/workflows/host_01_production.yml @@ -23,25 +23,25 @@ jobs: steps: - name: Checkout πŸ”” - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - name: Map Secrets to Environment Variables πŸ—ΊοΈ - uses: oNaiPs/secrets-to-env-action@v1.5 + uses: oNaiPs/secrets-to-env-action@ec46a22bfc9b37e014b627b3208b07eb8909ea0f # v1.5 with: secrets: ${{ toJSON(secrets) }} - name: Replace Tokens πŸͺ™ - uses: cschleiden/replace-tokens@v1.3 + uses: cschleiden/replace-tokens@4d5a042c84c3568b3858b7af9394923d2d5195c9 # v1.3 with: files: '["./production/host_01/**/*"]' - name: Install NodeJS πŸ–₯️ - uses: actions/setup-node@v4 + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 with: node-version: 20 - name: Install Terraform ⛰️ - uses: hashicorp/setup-terraform@v3 + uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3 - name: Terraform Init πŸƒ id: terraformInit @@ -55,7 +55,7 @@ jobs: working-directory: ./production/host_01 - name: Cache Terraform Plan πŸ“¦ - uses: actions/cache/save@v4.0.2 + uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ./production/host_01/** key: ${{ github.sha }} @@ -71,21 +71,21 @@ jobs: steps: - name: Checkout πŸ”” - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - name: Restore Terraform Plan πŸ—ΊοΈ - uses: actions/cache/restore@v4.0.2 + uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ./production/host_01/** key: ${{ github.sha }} - name: Install NodeJS πŸ–₯️ - uses: actions/setup-node@v4 + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 with: node-version: 20 - name: Install Terraform ⛰️ - uses: hashicorp/setup-terraform@v3 + uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3 - name: Terraform Apply πŸš€ run: terraform apply ${{ github.sha }}.tfplan diff --git a/.github/workflows/host_02_production.yml b/.github/workflows/host_02_production.yml index f5dad85..b7aeb1c 100644 --- a/.github/workflows/host_02_production.yml +++ b/.github/workflows/host_02_production.yml @@ -23,25 +23,25 @@ jobs: steps: - name: Checkout πŸ”” - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - name: Map Secrets to Environment Variables πŸ—ΊοΈ - uses: oNaiPs/secrets-to-env-action@v1.5 + uses: oNaiPs/secrets-to-env-action@ec46a22bfc9b37e014b627b3208b07eb8909ea0f # v1.5 with: secrets: ${{ toJSON(secrets) }} - name: Replace Tokens πŸͺ™ - uses: cschleiden/replace-tokens@v1.3 + uses: cschleiden/replace-tokens@4d5a042c84c3568b3858b7af9394923d2d5195c9 # v1.3 with: files: '["./production/host_02/**/*"]' - name: Install NodeJS πŸ–₯️ - uses: actions/setup-node@v4 + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 with: node-version: 20 - name: Install Terraform ⛰️ - uses: hashicorp/setup-terraform@v3 + uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3 - name: Terraform Init πŸƒ id: terraformInit @@ -55,7 +55,7 @@ jobs: working-directory: ./production/host_02 - name: Cache Terraform Plan πŸ“¦ - uses: actions/cache/save@v4.0.2 + uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ./production/host_02/** key: ${{ github.sha }} @@ -71,10 +71,10 @@ jobs: steps: - name: Install Docker - uses: crazy-max/ghaction-setup-docker@v3 + uses: crazy-max/ghaction-setup-docker@78318f8be53384b971671f27d81f5e72526c102d # v3 - name: Manual Approval 🚦 - uses: trstringer/manual-approval@v1 + uses: trstringer/manual-approval@662b3ddbc7685f897992051e87e1b4b58c07dc03 # v1 with: secret: ${{ github.TOKEN }} approvers: data-tangles @@ -84,16 +84,16 @@ jobs: exclude-workflow-initiator-as-approver: false - name: Checkout πŸ”” - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - name: Restore Terraform Plan πŸ—ΊοΈ - uses: actions/cache/restore@v4.0.2 + uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ./production/host_02/** key: ${{ github.sha }} - name: Install Terraform ⛰️ - uses: hashicorp/setup-terraform@v3 + uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3 - name: Terraform Apply πŸš€ run: terraform apply ${{ github.sha }}.tfplan diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index f92b5dd..dfe7e46 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -16,14 +16,14 @@ jobs: steps: - name: Generate GitHub App Token πŸͺ™ - uses: tibdex/github-app-token@v2 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2 id: generate-token with: app_id: ${{ secrets.BRAID_BOT_APP_ID }} private_key: ${{ secrets.BRAID_BOT_PRIVATE_KEY }} - name: Checkout πŸ”” - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 with: ref: ${{ github.event.pull_request.head.ref }} token: ${{ steps.generate-token.outputs.token }} @@ -80,21 +80,21 @@ jobs: steps: - name: Generate GitHub App Token πŸͺ™ - uses: tibdex/github-app-token@v2 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2 id: generate-token with: app_id: ${{ secrets.BRAID_BOT_APP_ID }} private_key: ${{ secrets.BRAID_BOT_PRIVATE_KEY }} - name: Checkout πŸ”” - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 with: ref: ${{ github.event.pull_request.head.ref }} token: ${{ steps.generate-token.outputs.token }} - name: Conventional Changelog Action πŸ“‹ id: changelog - uses: TriPSs/conventional-changelog-action@v5 + uses: TriPSs/conventional-changelog-action@3a392e9aa44a72686b0fc13259a90d287dd0877c # v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} git-user-name: "braid-bot[bot]" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bf9babe --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +## [0.1.14](https://github.com/binary-braids/terraform-proxmox/compare/v0.1.13...v0.1.14) (2024-09-07) + + +### Bug Fixes + +* ignore github workflow path ([0d29830](https://github.com/binary-braids/terraform-proxmox/commit/0d298303a96be257d2a63ae537ccd79774ee19bb)) +* remove firewall variables ([f989f3a](https://github.com/binary-braids/terraform-proxmox/commit/f989f3a75b0ab9d9515a2141afd60176882f82bc)) + + + +## [0.1.13](https://github.com/binary-braids/terraform-proxmox/compare/8f9bb838022cec5c9525f4e2a6b29791085a3633...v0.1.13) (2024-09-07) + + +### Bug Fixes + +* correct provider reference for proxmox ([f3f7fa3](https://github.com/binary-braids/terraform-proxmox/commit/f3f7fa36038e01bc23c03f379f169a0692db7be4)) +* correct variable types ([8f9bb83](https://github.com/binary-braids/terraform-proxmox/commit/8f9bb838022cec5c9525f4e2a6b29791085a3633)) +* correct variables ([e8792b5](https://github.com/binary-braids/terraform-proxmox/commit/e8792b56e0e09ca2f1e9f97e4a4b540c1e2337b9)) +* dc02 references ([116951f](https://github.com/binary-braids/terraform-proxmox/commit/116951f721ab413528f3646edf68aaa0c14f2339)) +* fix the workflow ([3e9e7f7](https://github.com/binary-braids/terraform-proxmox/commit/3e9e7f7f1c90d43775c3761dfc413875e6d56f6e)) +* only run deploy workflows on pr to main ([bd10c48](https://github.com/binary-braids/terraform-proxmox/commit/bd10c48062bead480c99ceab167ae2e467ab437a)) + + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..39327c9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 The terraform-docs Authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index ca8e81b..97dd257 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,431 @@ -[![terraform](https://img.shields.io/badge/terraform-purple?style=for-the-badge&logo=terraform)](https://terraform.io/) -[![proxmox](https://img.shields.io/badge/proxmox-orange?style=for-the-badge&logo=proxmox)](https://terraform.io/) -[![renovate](https://img.shields.io/badge/renovate-enabled-brightgreen?style=for-the-badge&logo=renovate)](https://github.com/renovatebot/renovate) +# terraform-docs -[![HitCount](https://hits.dwyl.com/binary-braids/terraform-proxmox.svg?style=flat-square&show=unique)](http://hits.dwyl.com/binary-braids/terraform-proxmox) +[![Build Status](https://github.com/terraform-docs/terraform-docs/workflows/ci/badge.svg)](https://github.com/terraform-docs/terraform-docs/actions) [![GoDoc](https://pkg.go.dev/badge/github.com/terraform-docs/terraform-docs)](https://pkg.go.dev/github.com/terraform-docs/terraform-docs) [![Go Report Card](https://goreportcard.com/badge/github.com/terraform-docs/terraform-docs)](https://goreportcard.com/report/github.com/terraform-docs/terraform-docs) [![Codecov Report](https://codecov.io/gh/terraform-docs/terraform-docs/branch/master/graph/badge.svg)](https://codecov.io/gh/terraform-docs/terraform-docs) [![License](https://img.shields.io/github/license/terraform-docs/terraform-docs)](https://github.com/terraform-docs/terraform-docs/blob/master/LICENSE) [![Latest release](https://img.shields.io/github/v/release/terraform-docs/terraform-docs)](https://github.com/terraform-docs/terraform-docs/releases) -# Terraform Proxmox +![terraform-docs-teaser](./images/terraform-docs-teaser.png) -This repository contains various Terraform modules for building proxmox resources. This project makes use of the Telmate Proxmox Terraform provider. Setup and documentation for the provider can be found at the following link: https://github.com/Telmate/terraform-provider-proxmox +## What is terraform-docs -## πŸ“‚ Repository structure +A utility to generate documentation from Terraform modules in various output formats. -The Git repository contains the following directories: +## Installation -```sh -πŸ“ root -β”œβ”€ .github -└─ production +macOS users can install using [Homebrew]: + +```bash +brew install terraform-docs +``` + +or + +```bash +brew install terraform-docs/tap/terraform-docs +``` + +Windows users can install using [Scoop]: + +```bash +scoop bucket add terraform-docs https://github.com/terraform-docs/scoop-bucket +scoop install terraform-docs +``` + +or [Chocolatey]: + +```bash +choco install terraform-docs +``` + +Stable binaries are also available on the [releases] page. To install, download the +binary for your platform from "Assets" and place this into your `$PATH`: + +```bash +curl -Lo ./terraform-docs.tar.gz https://github.com/terraform-docs/terraform-docs/releases/download/v0.17.0/terraform-docs-v0.17.0-$(uname)-amd64.tar.gz +tar -xzf terraform-docs.tar.gz +chmod +x terraform-docs +mv terraform-docs /usr/local/bin/terraform-docs +``` + +**NOTE:** Windows releases are in `ZIP` format. + +The latest version can be installed using `go install` or `go get`: + +```bash +# go1.17+ +go install github.com/terraform-docs/terraform-docs@v0.17.0 +``` + +```bash +# go1.16 +GO111MODULE="on" go get github.com/terraform-docs/terraform-docs@v0.17.0 +``` + +**NOTE:** please use the latest Go to do this, minimum `go1.16` is required. + +This will put `terraform-docs` in `$(go env GOPATH)/bin`. If you encounter the error +`terraform-docs: command not found` after installation then you may need to either add +that directory to your `$PATH` as shown [here] or do a manual installation by cloning +the repo and run `make build` from the repository which will put `terraform-docs` in: + +```bash +$(go env GOPATH)/src/github.com/terraform-docs/terraform-docs/bin/$(uname | tr '[:upper:]' '[:lower:]')-amd64/terraform-docs +``` + +## Usage + +### Running the binary directly + +To run and generate documentation into README within a directory: + +```bash +terraform-docs markdown table --output-file README.md --output-mode inject /path/to/module +``` + +Check [`output`] configuration for more details and examples. + +### Using docker + +terraform-docs can be run as a container by mounting a directory with `.tf` +files in it and run the following command: + +```bash +docker run --rm --volume "$(pwd):/terraform-docs" -u $(id -u) quay.io/terraform-docs/terraform-docs:0.17.0 markdown /terraform-docs +``` + +If `output.file` is not enabled for this module, generated output can be redirected +back to a file: + +```bash +docker run --rm --volume "$(pwd):/terraform-docs" -u $(id -u) quay.io/terraform-docs/terraform-docs:0.17.0 markdown /terraform-docs > doc.md +``` + +**NOTE:** Docker tag `latest` refers to _latest_ stable released version and `edge` +refers to HEAD of `master` at any given point in time. + +### Using GitHub Actions + +To use terraform-docs GitHub Action, configure a YAML workflow file (e.g. +`.github/workflows/documentation.yml`) with the following: + +```yaml +name: Generate terraform docs +on: + - pull_request + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Render terraform docs and push changes back to PR + uses: terraform-docs/gh-actions@main + with: + working-dir: . + output-file: README.md + output-method: inject + git-push: "true" +``` + +Read more about [terraform-docs GitHub Action] and its configuration and +examples. + +### pre-commit hook + +With pre-commit, you can ensure your Terraform module documentation is kept +up-to-date each time you make a commit. + +First [install pre-commit] and then create or update a `.pre-commit-config.yaml` +in the root of your Git repo with at least the following content: + +```yaml +repos: + - repo: https://github.com/terraform-docs/terraform-docs + rev: "v0.17.0" + hooks: + - id: terraform-docs-go + args: ["markdown", "table", "--output-file", "README.md", "./mymodule/path"] +``` + +Then run: + +```bash +pre-commit install +pre-commit install-hooks +``` + +Further changes to your module's `.tf` files will cause an update to documentation +when you make a commit. + +## Configuration + +terraform-docs can be configured with a yaml file. The default name of this file is +`.terraform-docs.yml` and the path order for locating it is: + +1. root of module directory +1. `.config/` folder at root of module directory +1. current directory +1. `.config/` folder at current directory +1. `$HOME/.tfdocs.d/` + +```yaml +formatter: "" # this is required + +version: "" + +header-from: main.tf +footer-from: "" + +recursive: + enabled: false + path: modules + +sections: + hide: [] + show: [] + +content: "" + +output: + file: "" + mode: inject + template: |- + + {{ .Content }} + + +output-values: + enabled: false + from: "" + +sort: + enabled: true + by: name + +settings: + anchor: true + color: true + default: true + description: false + escape: true + hide-empty: false + html: true + indent: 2 + lockfile: true + read-comments: true + required: true + sensitive: true + type: true ``` -## Getting started -The main terraform modules can be utilised with your own variables to deploy Proxmox resources. +## Content Template + +Generated content can be customized further away with `content` in configuration. +If the `content` is empty the default order of sections is used. + +Compatible formatters for customized content are `asciidoc` and `markdown`. `content` +will be ignored for other formatters. + +`content` is a Go template with following additional variables: + +- `{{ .Header }}` +- `{{ .Footer }}` +- `{{ .Inputs }}` +- `{{ .Modules }}` +- `{{ .Outputs }}` +- `{{ .Providers }}` +- `{{ .Requirements }}` +- `{{ .Resources }}` + +and following functions: + +- `{{ include "relative/path/to/file" }}` + +These variables are the generated output of individual sections in the selected +formatter. For example `{{ .Inputs }}` is Markdown Table representation of _inputs_ +when formatter is set to `markdown table`. + +Note that sections visibility (i.e. `sections.show` and `sections.hide`) takes +precedence over the `content`. + +Additionally there's also one extra special variable avaialble to the `content`: + +- `{{ .Module }}` + +As opposed to the other variables mentioned above, which are generated sections +based on a selected formatter, the `{{ .Module }}` variable is just a `struct` +representing a [Terraform module]. + +````yaml +content: |- + Any arbitrary text can be placed anywhere in the content + + {{ .Header }} + + and even in between sections + + {{ .Providers }} + + and they don't even need to be in the default order + + {{ .Outputs }} + + include any relative files + + {{ include "relative/path/to/file" }} + + {{ .Inputs }} + + # Examples + + ```hcl + {{ include "examples/foo/main.tf" }} + ``` + + ## Resources + + {{ range .Module.Resources }} + - {{ .GetMode }}.{{ .Spec }} ({{ .Position.Filename }}#{{ .Position.Line }}) + {{- end }} +```` + +## Build on top of terraform-docs + +terraform-docs primary use-case is to be utilized as a standalone binary, but +some parts of it is also available publicly and can be imported in your project +as a library. + +```go +import ( + "github.com/terraform-docs/terraform-docs/format" + "github.com/terraform-docs/terraform-docs/print" + "github.com/terraform-docs/terraform-docs/terraform" +) + +// buildTerraformDocs for module root `path` and provided content `tmpl`. +func buildTerraformDocs(path string, tmpl string) (string, error) { + config := print.DefaultConfig() + config.ModuleRoot = path // module root path (can be relative or absolute) + + module, err := terraform.LoadWithOptions(config) + if err != nil { + return "", err + } + + // Generate in Markdown Table format + formatter := format.NewMarkdownTable(config) + + if err := formatter.Generate(module); err != nil { + return "", err + } + + // // Note: if you don't intend to provide additional template for the generated + // // content, or the target format doesn't provide templating (e.g. json, yaml, + // // xml, or toml) you can use `Content()` function instead of `Render()`. + // // `Content()` returns all the sections combined with predefined order. + // return formatter.Content(), nil + + return formatter.Render(tmpl) +} +``` + +## Plugin + +Generated output can be heavily customized with [`content`], but if using that +is not enough for your use-case, you can write your own plugin. + +In order to install a plugin the following steps are needed: + +- download the plugin and place it in `~/.tfdocs.d/plugins` (or `./.tfdocs.d/plugins`) +- make sure the plugin file name is `tfdocs-format-` +- modify [`formatter`] of `.terraform-docs.yml` file to be `` + +**Important notes:** + +- if the plugin file name is different than the example above, terraform-docs won't +be able to to pick it up nor register it properly +- you can only use plugin thorough `.terraform-docs.yml` file and it cannot be used +with CLI arguments + +To create a new plugin create a new repository called `tfdocs-format-` with +following `main.go`: + +```go +package main + +import ( + _ "embed" //nolint + + "github.com/terraform-docs/terraform-docs/plugin" + "github.com/terraform-docs/terraform-docs/print" + "github.com/terraform-docs/terraform-docs/template" + "github.com/terraform-docs/terraform-docs/terraform" +) + +func main() { + plugin.Serve(&plugin.ServeOpts{ + Name: "", + Version: "0.1.0", + Printer: printerFunc, + }) +} + +//go:embed sections.tmpl +var tplCustom []byte + +// printerFunc the function being executed by the plugin client. +func printerFunc(config *print.Config, module *terraform.Module) (string, error) { + tpl := template.New(config, + &template.Item{Name: "custom", Text: string(tplCustom)}, + ) + + rendered, err := tpl.Render("custom", module) + if err != nil { + return "", err + } + + return rendered, nil +} +``` + +Please refer to [tfdocs-format-template] for more details. You can create a new +repository from it by clicking on `Use this template` button. + +## Documentation + +- **Users** + - Read the [User Guide] to learn how to use terraform-docs + - Read the [Formats Guide] to learn about different output formats of terraform-docs + - Refer to [Config File Reference] for all the available configuration options +- **Developers** + - Read [Contributing Guide] before submitting a pull request + +Visit [our website] for all documentation. + +## Community + +- Discuss terraform-docs on [Slack] + +## License + +MIT License - Copyright (c) 2021 The terraform-docs Authors. + +[Chocolatey]: https://www.chocolatey.org +[Config File Reference]: https://terraform-docs.io/user-guide/configuration/ +[`content`]: https://terraform-docs.io/user-guide/configuration/content/ +[Contributing Guide]: CONTRIBUTING.md +[Formats Guide]: https://terraform-docs.io/reference/terraform-docs/ +[`formatter`]: https://terraform-docs.io/user-guide/configuration/formatter/ +[here]: https://golang.org/doc/code.html#GOPATH +[Homebrew]: https://brew.sh +[install pre-commit]: https://pre-commit.com/#install +[`output`]: https://terraform-docs.io/user-guide/configuration/output/ +[releases]: https://github.com/terraform-docs/terraform-docs/releases +[Scoop]: https://scoop.sh/ +[Slack]: https://slack.terraform-docs.io/ +[terraform-docs GitHub Action]: https://github.com/terraform-docs/gh-actions +[Terraform module]: https://pkg.go.dev/github.com/terraform-docs/terraform-docs/terraform#Module +[tfdocs-format-template]: https://github.com/terraform-docs/tfdocs-format-template +[our website]: https://terraform-docs.io/ +[User Guide]: https://terraform-docs.io/user-guide/introduction/ diff --git a/package.yaml b/package.yaml index 5573686..c493944 100644 --- a/package.yaml +++ b/package.yaml @@ -1 +1 @@ -version: 0.1.12 +version: 0.1.14 diff --git a/production/host_01/README.md b/production/host_01/README.md index 050892c..fb09c57 100644 --- a/production/host_01/README.md +++ b/production/host_01/README.md @@ -4,13 +4,13 @@ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.6.0 | -| [esxi](#requirement\_esxi) | 1.10.3 | +| [proxmox](#requirement\_proxmox) | 3.0.1-rc4 | ## Providers | Name | Version | |------|---------| -| [esxi](#provider\_esxi) | 1.10.3 | +| [proxmox](#provider\_proxmox) | 3.0.1-rc4 | ## Modules @@ -20,60 +20,61 @@ No modules. | Name | Type | |------|------| -| esxi_guest.dc01 | resource | -| esxi_guest.media | resource | -| esxi_guest.veeam | resource | -| esxi_portgroup.production | resource | -| esxi_vswitch.production | resource | +| [proxmox_vm_qemu.dc01](https://registry.terraform.io/providers/telmate/proxmox/3.0.1-rc4/docs/resources/vm_qemu) | resource | +| [proxmox_vm_qemu.media](https://registry.terraform.io/providers/telmate/proxmox/3.0.1-rc4/docs/resources/vm_qemu) | resource | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [dc01\_boot\_firmware](#input\_dc01\_boot\_firmware) | The firmware type for the guest VM | `string` | n/a | yes | -| [dc01\_disk\_store](#input\_dc01\_disk\_store) | The name of the data store where the guest VM will be created | `string` | n/a | yes | -| [dc01\_guest\_name](#input\_dc01\_guest\_name) | The name of the guest VM | `string` | n/a | yes | -| [dc01\_memsize](#input\_dc01\_memsize) | The amount of memory to allocate the guest VM in MB (1024 = 1GB) | `number` | n/a | yes | -| [dc01\_nic\_type](#input\_dc01\_nic\_type) | The type for the network interface | `string` | n/a | yes | -| [dc01\_notes](#input\_dc01\_notes) | Annotated notes to add to the guest VM | `string` | n/a | yes | -| [dc01\_numvcpus](#input\_dc01\_numvcpus) | The number of vCPUs to allocate to the guest VM | `number` | n/a | yes | -| [dc01\_power](#input\_dc01\_power) | Set the guest VM Power state | `string` | n/a | yes | -| [dc01\_resource\_pool\_name](#input\_dc01\_resource\_pool\_name) | The name of the Resource Pool for the guest VM | `string` | n/a | yes | -| [dc01\_virthwver](#input\_dc01\_virthwver) | The hardware version of the guest VM | `number` | n/a | yes | -| [dc01\_virtual\_network](#input\_dc01\_virtual\_network) | The virtual network for the network interface | `string` | n/a | yes | -| [esxi\_hostname](#input\_esxi\_hostname) | hostname for ESXI host | `string` | n/a | yes | -| [esxi\_hostport](#input\_esxi\_hostport) | SSH port for ESXI host | `string` | n/a | yes | -| [esxi\_hostssl](#input\_esxi\_hostssl) | SSL port for ESXI host | `string` | n/a | yes | -| [esxi\_password](#input\_esxi\_password) | password for ESXI host | `string` | n/a | yes | -| [esxi\_username](#input\_esxi\_username) | username for ESXI host | `string` | n/a | yes | -| [media\_boot\_firmware](#input\_media\_boot\_firmware) | The firmware type for the guest VM | `string` | n/a | yes | -| [media\_disk\_store](#input\_media\_disk\_store) | The name of the data store where the guest VM will be created | `string` | n/a | yes | -| [media\_guest\_name](#input\_media\_guest\_name) | The name of the guest VM | `string` | n/a | yes | -| [media\_memsize](#input\_media\_memsize) | The amount of memory to allocate the guest VM in MB (1024 = 1GB) | `number` | n/a | yes | -| [media\_nic\_type](#input\_media\_nic\_type) | The type for the network interface | `string` | n/a | yes | -| [media\_notes](#input\_media\_notes) | Annotated notes to add to the guest VM | `string` | n/a | yes | -| [media\_numvcpus](#input\_media\_numvcpus) | The number of vCPUs to allocate to the guest VM | `number` | n/a | yes | -| [media\_power](#input\_media\_power) | Set the guest VM Power state | `string` | n/a | yes | -| [media\_resource\_pool\_name](#input\_media\_resource\_pool\_name) | The name of the Resource Pool for the guest VM | `string` | n/a | yes | -| [media\_virthwver](#input\_media\_virthwver) | The hardware version of the guest VM | `number` | n/a | yes | -| [media\_virtual\_disk\_id](#input\_media\_virtual\_disk\_id) | The id of the virtual disk | `string` | n/a | yes | -| [media\_virtual\_disk\_slot](#input\_media\_virtual\_disk\_slot) | The slot for the virtual disk | `string` | n/a | yes | -| [media\_virtual\_network](#input\_media\_virtual\_network) | The virtual network for the network interface | `string` | n/a | yes | -| [port\_group\_name](#input\_port\_group\_name) | The name of the Port Group | `string` | n/a | yes | -| [port\_group\_vlan](#input\_port\_group\_vlan) | The VLAN ID for the Port Group | `number` | n/a | yes | -| [uplink\_name](#input\_uplink\_name) | The name of the vSwitch uplink | `string` | n/a | yes | -| [veeam\_boot\_firmware](#input\_veeam\_boot\_firmware) | The firmware type for the guest VM | `string` | n/a | yes | -| [veeam\_disk\_store](#input\_veeam\_disk\_store) | The name of the data store where the guest VM will be created | `string` | n/a | yes | -| [veeam\_guest\_name](#input\_veeam\_guest\_name) | The name of the guest VM | `string` | n/a | yes | -| [veeam\_memsize](#input\_veeam\_memsize) | The amount of memory to allocate the guest VM in MB (1024 = 1GB) | `number` | n/a | yes | -| [veeam\_nic\_type](#input\_veeam\_nic\_type) | The type for the network interface | `string` | n/a | yes | -| [veeam\_notes](#input\_veeam\_notes) | Annotated notes to add to the guest VM | `string` | n/a | yes | -| [veeam\_numvcpus](#input\_veeam\_numvcpus) | The number of vCPUs to allocate to the guest VM | `number` | n/a | yes | -| [veeam\_power](#input\_veeam\_power) | Set the guest VM Power state | `string` | n/a | yes | -| [veeam\_resource\_pool\_name](#input\_veeam\_resource\_pool\_name) | The name of the Resource Pool for the guest VM | `string` | n/a | yes | -| [veeam\_virthwver](#input\_veeam\_virthwver) | The hardware version of the guest VM | `number` | n/a | yes | -| [veeam\_virtual\_network](#input\_veeam\_virtual\_network) | The virtual network for the network interface | `string` | n/a | yes | -| [vswitch\_name](#input\_vswitch\_name) | The name of the vSwitch | `string` | n/a | yes | +| [dc01\_automatic\_reboot](#input\_dc01\_automatic\_reboot) | Automatically reboot the VM when parameter changes require this. If disabled the provider will emit a warning when the VM needs to be rebooted. | `bool` | n/a | yes | +| [dc01\_bios](#input\_dc01\_bios) | The BIOS to use, options are seabios or ovmf for UEFI | `string` | n/a | yes | +| [dc01\_boot](#input\_dc01\_boot) | The boot order for the VM. For example: order=scsi0;ide2;net0 | `string` | n/a | yes | +| [dc01\_bridge](#input\_dc01\_bridge) | Bridge to which the network device should be attached. The Proxmox VE standard bridge is called vmbr0. | `string` | n/a | yes | +| [dc01\_cores](#input\_dc01\_cores) | The number of CPU cores per CPU socket to allocate to the VM. | `number` | n/a | yes | +| [dc01\_cpu](#input\_dc01\_cpu) | The type of CPU to emulate in the Guest | `string` | n/a | yes | +| [dc01\_desc](#input\_dc01\_desc) | The description of the VM. Shows as the 'Notes' field in the Proxmox GUI | `string` | n/a | yes | +| [dc01\_disk\_size](#input\_dc01\_disk\_size) | The size of the created disk. Accepts K for kibibytes, M for mebibytes, G for gibibytes, T for tibibytes. When only a number is provided gibibytes is assumed. Required when type=disk and passthrough=false, Computed when type=disk and passthrough=true. | `string` | n/a | yes | +| [dc01\_disk\_storage](#input\_dc01\_disk\_storage) | Required when type=disk and passthrough=false. The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [dc01\_efi\_storage](#input\_dc01\_efi\_storage) | The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [dc01\_efitype](#input\_dc01\_efitype) | The type of efi disk device to add. Options: 2m, 4m | `string` | n/a | yes | +| [dc01\_force\_create](#input\_dc01\_force\_create) | If false, and a vm of the same name, on the same node exists, terraform will attempt to reconfigure that VM with these settings. Set to true to always create a new VM (note, the name of the VM must still be unique, otherwise an error will be produced.) | `bool` | n/a | yes | +| [dc01\_hotplug](#input\_dc01\_hotplug) | Comma delimited list of hotplug features to enable. Options: network, disk, cpu, memory, usb. Set to 0 to disable hotplug. | `string` | n/a | yes | +| [dc01\_memory](#input\_dc01\_memory) | The amount of memory to allocate to the VM in Megabytes. | `number` | n/a | yes | +| [dc01\_model](#input\_dc01\_model) | Network Card Model. The virtio model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use e1000. Options: e1000, e1000-82540em, e1000-82544gc, e1000-82545em, i82551, i82557b, i82559er, ne2k\_isa, ne2k\_pci, pcnet, rtl8139, virtio, vmxnet3. | `string` | n/a | yes | +| [dc01\_name](#input\_dc01\_name) | The name of the VM within Proxmox | `string` | n/a | yes | +| [dc01\_onboot](#input\_dc01\_onboot) | Whether to have the VM startup after the PVE node starts. | `bool` | n/a | yes | +| [dc01\_os\_type](#input\_dc01\_os\_type) | Which provisioning method to use, based on the OS type. Options: ubuntu, centos, cloud-init. | `string` | n/a | yes | +| [dc01\_protection](#input\_dc01\_protection) | Enable/disable the VM protection from being removed. The default value of false indicates the VM is removable. | `bool` | n/a | yes | +| [dc01\_qemu\_os](#input\_dc01\_qemu\_os) | The type of OS in the guest. Set properly to allow Proxmox to enable optimizations for the appropriate guest OS. It takes the value from the source template and ignore any changes to resource configuration parameter. | `string` | n/a | yes | +| [dc01\_scsihw](#input\_dc01\_scsihw) | The SCSI controller to emulate. Options: lsi, lsi53c810, megasas, pvscsi, virtio-scsi-pci, virtio-scsi-single. | `string` | n/a | yes | +| [dc01\_sockets](#input\_dc01\_sockets) | The number of CPU sockets to allocate to the VM. | `number` | n/a | yes | +| [dc01\_tablet](#input\_dc01\_tablet) | Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. | `bool` | n/a | yes | +| [dc01\_target\_node](#input\_dc01\_target\_node) | The name of the Proxmox Node on which to place the VM. | `string` | n/a | yes | +| [dc01\_vm\_state](#input\_dc01\_vm\_state) | The desired state of the VM, options are running, stopped and started. Do note that started will only start the vm on creation and won't fully manage the power state unlike running and stopped do. | `string` | n/a | yes | +| [media\_automatic\_reboot](#input\_media\_automatic\_reboot) | Automatically reboot the VM when parameter changes require this. If disabled the provider will emit a warning when the VM needs to be rebooted. | `bool` | n/a | yes | +| [media\_bios](#input\_media\_bios) | The BIOS to use, options are seabios or ovmf for UEFI | `string` | n/a | yes | +| [media\_boot](#input\_media\_boot) | The boot order for the VM. For example: order=scsi0;ide2;net0 | `string` | n/a | yes | +| [media\_bridge](#input\_media\_bridge) | Bridge to which the network device should be attached. The Proxmox VE standard bridge is called vmbr0. | `string` | n/a | yes | +| [media\_cores](#input\_media\_cores) | The number of CPU cores per CPU socket to allocate to the VM. | `number` | n/a | yes | +| [media\_cpu](#input\_media\_cpu) | The type of CPU to emulate in the Guest | `string` | n/a | yes | +| [media\_desc](#input\_media\_desc) | The description of the VM. Shows as the 'Notes' field in the Proxmox GUI | `string` | n/a | yes | +| [media\_disk\_size](#input\_media\_disk\_size) | The size of the created disk. Accepts K for kibibytes, M for mebibytes, G for gibibytes, T for tibibytes. When only a number is provided gibibytes is assumed. Required when type=disk and passthrough=false, Computed when type=disk and passthrough=true. | `string` | n/a | yes | +| [media\_disk\_storage](#input\_media\_disk\_storage) | Required when type=disk and passthrough=false. The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [media\_force\_create](#input\_media\_force\_create) | If false, and a vm of the same name, on the same node exists, terraform will attempt to reconfigure that VM with these settings. Set to true to always create a new VM (note, the name of the VM must still be unique, otherwise an error will be produced.) | `bool` | n/a | yes | +| [media\_hotplug](#input\_media\_hotplug) | Comma delimited list of hotplug features to enable. Options: network, disk, cpu, memory, usb. Set to 0 to disable hotplug. | `string` | n/a | yes | +| [media\_memory](#input\_media\_memory) | The amount of memory to allocate to the VM in Megabytes. | `number` | n/a | yes | +| [media\_model](#input\_media\_model) | Network Card Model. The virtio model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use e1000. Options: e1000, e1000-82540em, e1000-82544gc, e1000-82545em, i82551, i82557b, i82559er, ne2k\_isa, ne2k\_pci, pcnet, rtl8139, virtio, vmxnet3. | `string` | n/a | yes | +| [media\_name](#input\_media\_name) | The name of the VM within Proxmox | `string` | n/a | yes | +| [media\_onboot](#input\_media\_onboot) | Whether to have the VM startup after the PVE node starts. | `bool` | n/a | yes | +| [media\_os\_type](#input\_media\_os\_type) | Which provisioning method to use, based on the OS type. Options: ubuntu, centos, cloud-init. | `string` | n/a | yes | +| [media\_protection](#input\_media\_protection) | Enable/disable the VM protection from being removed. The default value of false indicates the VM is removable. | `bool` | n/a | yes | +| [media\_qemu\_os](#input\_media\_qemu\_os) | The type of OS in the guest. Set properly to allow Proxmox to enable optimizations for the appropriate guest OS. It takes the value from the source template and ignore any changes to resource configuration parameter. | `string` | n/a | yes | +| [media\_scsihw](#input\_media\_scsihw) | The SCSI controller to emulate. Options: lsi, lsi53c810, megasas, pvscsi, virtio-scsi-pci, virtio-scsi-single. | `string` | n/a | yes | +| [media\_sockets](#input\_media\_sockets) | The number of CPU sockets to allocate to the VM. | `number` | n/a | yes | +| [media\_tablet](#input\_media\_tablet) | Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. | `bool` | n/a | yes | +| [media\_target\_node](#input\_media\_target\_node) | The name of the Proxmox Node on which to place the VM. | `string` | n/a | yes | +| [media\_vm\_state](#input\_media\_vm\_state) | The desired state of the VM, options are running, stopped and started. Do note that started will only start the vm on creation and won't fully manage the power state unlike running and stopped do. | `string` | n/a | yes | ## Outputs diff --git a/production/host_01/providers.tf b/production/host_01/providers.tf index 42cc608..5392b72 100644 --- a/production/host_01/providers.tf +++ b/production/host_01/providers.tf @@ -18,7 +18,7 @@ terraform { } provider "proxmox" { - pm_api_url = "https://prod-host-01.binarybraids.com:8006/api2/json" - pm_user = "terraform@pve" + pm_api_url = "https://prod-host-01.binarybraids.com:8006/api2/json" + pm_user = "terraform@pve" pm_password = "#{PROD_01_HOST_TERRAFORM_PASSWORD}#" } \ No newline at end of file diff --git a/production/host_01/terraform.tfvars b/production/host_01/terraform.tfvars index cd99bae..27f2fbf 100644 --- a/production/host_01/terraform.tfvars +++ b/production/host_01/terraform.tfvars @@ -1,51 +1,51 @@ #Domain Controller -dc01_name = "vm-prod-dc-01" -dc01_desc = "Domain Controller" -dc01_automatic_reboot = true -dc01_bios = "ovmf" -dc01_boot = "order=sata0;sata1" -dc01_cores = 1 -dc01_sockets = 2 -dc01_cpu = "host" -dc01_force_create = false -dc01_hotplug = "disk,network,usb" -dc01_memory = 2048 -dc01_onboot = true -dc01_vm_state = "running" -dc01_os_type = "Microsoft Windows 11/2022/2025" -dc01_qemu_os = "l26" -dc01_scsihw = "lsi" -dc01_protection = false -dc01_tablet = true -dc01_target_node = "prod-host-01.binarybraids.com" -dc01_efitype = "4m" -dc01_efi_storage = "VM-240GB-SSD" -dc01_disk_size = "75G" -dc01_disk_storage = "VM-240GB-SSD" -dc01_bridge = "vmbr0" -dc01_model = "virtio" +dc01_name = "vm-prod-dc-01" +dc01_desc = "Domain Controller" +dc01_automatic_reboot = true +dc01_bios = "ovmf" +dc01_boot = "order=sata0;sata1" +dc01_cores = 1 +dc01_sockets = 2 +dc01_cpu = "host" +dc01_force_create = false +dc01_hotplug = "disk,network,usb" +dc01_memory = 2048 +dc01_onboot = true +dc01_vm_state = "running" +dc01_os_type = "Microsoft Windows 11/2022/2025" +dc01_qemu_os = "l26" +dc01_scsihw = "lsi" +dc01_protection = false +dc01_tablet = true +dc01_target_node = "prod-host-01.binarybraids.com" +dc01_efitype = "4m" +dc01_efi_storage = "VM-240GB-SSD" +dc01_disk_size = "75G" +dc01_disk_storage = "VM-240GB-SSD" +dc01_bridge = "vmbr0" +dc01_model = "virtio" # File Server -media_name = "vm-prod-fs-01" -media_desc = "File Server" -media_automatic_reboot = true -media_bios = "seabios" -media_boot = "order=sata0" -media_cores = 2 -media_sockets = 2 -media_cpu = "host" -media_force_create = false -media_hotplug = "disk,network,usb" -media_memory = 1024 -media_onboot = true -media_vm_state = "running" -media_os_type = "Linux 6.x - 2.6 Kernel" -media_qemu_os = "l26" -media_scsihw = "lsi" -media_protection = false -media_tablet = true -media_target_node = "prod-host-01.binarybraids.com" -media_disk_size = "20G" -media_disk_storage = "VM-240GB-SSD" -media_bridge = "vmbr0" -media_model = "virtio" \ No newline at end of file +media_name = "vm-prod-fs-01" +media_desc = "File Server" +media_automatic_reboot = true +media_bios = "seabios" +media_boot = "order=sata0" +media_cores = 2 +media_sockets = 2 +media_cpu = "host" +media_force_create = false +media_hotplug = "disk,network,usb" +media_memory = 1024 +media_onboot = true +media_vm_state = "running" +media_os_type = "Linux 6.x - 2.6 Kernel" +media_qemu_os = "l26" +media_scsihw = "lsi" +media_protection = false +media_tablet = true +media_target_node = "prod-host-01.binarybraids.com" +media_disk_size = "20G" +media_disk_storage = "VM-240GB-SSD" +media_bridge = "vmbr0" +media_model = "virtio" \ No newline at end of file diff --git a/production/host_01/virtual_machines.tf b/production/host_01/virtual_machines.tf index ff27f7d..23a2c53 100644 --- a/production/host_01/virtual_machines.tf +++ b/production/host_01/virtual_machines.tf @@ -2,25 +2,25 @@ ## Domain Controller resource "proxmox_vm_qemu" "dc01" { - name = var.dc01_name - desc = var.dc01_desc - automatic_reboot = var.dc01_automatic_reboot - bios = var.dc01_bios - boot = var.dc01_boot - cores = var.dc01_cores - sockets = var.dc01_sockets - cpu = var.dc01_cpu - force_create = var.dc01_force_create - hotplug = var.dc01_hotplug - memory = var.dc01_memory - onboot = var.dc01_onboot - vm_state = var.dc01_vm_state - os_type = var.dc01_os_type - qemu_os = var.dc01_qemu_os - scsihw = var.dc01_scsihw - protection = var.dc01_protection - tablet = var.dc01_tablet - target_node = var.dc01_target_node + name = var.dc01_name + desc = var.dc01_desc + automatic_reboot = var.dc01_automatic_reboot + bios = var.dc01_bios + boot = var.dc01_boot + cores = var.dc01_cores + sockets = var.dc01_sockets + cpu = var.dc01_cpu + force_create = var.dc01_force_create + hotplug = var.dc01_hotplug + memory = var.dc01_memory + onboot = var.dc01_onboot + vm_state = var.dc01_vm_state + os_type = var.dc01_os_type + qemu_os = var.dc01_qemu_os + scsihw = var.dc01_scsihw + protection = var.dc01_protection + tablet = var.dc01_tablet + target_node = var.dc01_target_node efidisk { efitype = var.dc01_efitype @@ -31,55 +31,55 @@ resource "proxmox_vm_qemu" "dc01" { sata { sata0 { disk { - size = var.dc01_disk_size - storage = var.dc01_disk_storage + size = var.dc01_disk_size + storage = var.dc01_disk_storage } } } } network { - bridge = var.dc01_bridge - model = var.dc01_model + bridge = var.dc01_bridge + model = var.dc01_model } } # Media Server resource "proxmox_vm_qemu" "media" { - name = var.media_name - desc = var.media_desc - automatic_reboot = var.media_automatic_reboot - bios = var.media_bios - boot = var.media_boot - cores = var.media_cores - sockets = var.media_sockets - cpu = var.media_cpu - force_create = var.media_force_create - hotplug = var.media_hotplug - memory = var.media_memory - onboot = var.media_onboot - vm_state = var.media_vm_state - os_type = var.media_os_type - qemu_os = var.media_qemu_os - scsihw = var.media_scsihw - protection = var.media_protection - tablet = var.media_tablet - target_node = var.media_target_node + name = var.media_name + desc = var.media_desc + automatic_reboot = var.media_automatic_reboot + bios = var.media_bios + boot = var.media_boot + cores = var.media_cores + sockets = var.media_sockets + cpu = var.media_cpu + force_create = var.media_force_create + hotplug = var.media_hotplug + memory = var.media_memory + onboot = var.media_onboot + vm_state = var.media_vm_state + os_type = var.media_os_type + qemu_os = var.media_qemu_os + scsihw = var.media_scsihw + protection = var.media_protection + tablet = var.media_tablet + target_node = var.media_target_node disks { sata { sata0 { disk { - size = var.media_disk_size - storage = var.media_disk_storage + size = var.media_disk_size + storage = var.media_disk_storage } } } } network { - bridge = var.media_bridge - model = var.media_model + bridge = var.media_bridge + model = var.media_model } } diff --git a/production/host_02/README.md b/production/host_02/README.md index 574fe33..bf0804d 100644 --- a/production/host_02/README.md +++ b/production/host_02/README.md @@ -4,13 +4,13 @@ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.6.0 | -| [esxi](#requirement\_esxi) | 1.10.3 | +| [proxmox](#requirement\_proxmox) | 3.0.1-rc4 | ## Providers | Name | Version | |------|---------| -| [esxi](#provider\_esxi) | 1.10.3 | +| [proxmox](#provider\_proxmox) | 3.0.1-rc4 | ## Modules @@ -20,71 +20,89 @@ No modules. | Name | Type | |------|------| -| esxi_guest.ansible | resource | -| esxi_guest.ca | resource | -| esxi_guest.dc02 | resource | -| esxi_guest.docker | resource | -| esxi_portgroup.production | resource | -| esxi_vswitch.production | resource | +| [proxmox_vm_qemu.dc02](https://registry.terraform.io/providers/telmate/proxmox/3.0.1-rc4/docs/resources/vm_qemu) | resource | +| [proxmox_vm_qemu.docker](https://registry.terraform.io/providers/telmate/proxmox/3.0.1-rc4/docs/resources/vm_qemu) | resource | +| [proxmox_vm_qemu.veeam](https://registry.terraform.io/providers/telmate/proxmox/3.0.1-rc4/docs/resources/vm_qemu) | resource | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [ansible\_boot\_firmware](#input\_ansible\_boot\_firmware) | The firmware type for the guest VM | `string` | n/a | yes | -| [ansible\_disk\_store](#input\_ansible\_disk\_store) | The name of the data store where the guest VM will be created | `string` | n/a | yes | -| [ansible\_guest\_name](#input\_ansible\_guest\_name) | The name of the guest VM | `string` | n/a | yes | -| [ansible\_memsize](#input\_ansible\_memsize) | The amount of memory to allocate the guest VM in MB (1024 = 1GB) | `number` | n/a | yes | -| [ansible\_nic\_type](#input\_ansible\_nic\_type) | The type for the network interface | `string` | n/a | yes | -| [ansible\_notes](#input\_ansible\_notes) | Annotated notes to add to the guest VM | `string` | n/a | yes | -| [ansible\_numvcpus](#input\_ansible\_numvcpus) | The number of vCPUs to allocate to the guest VM | `number` | n/a | yes | -| [ansible\_power](#input\_ansible\_power) | Set the guest VM Power state | `string` | n/a | yes | -| [ansible\_resource\_pool\_name](#input\_ansible\_resource\_pool\_name) | The name of the Resource Pool for the guest VM | `string` | n/a | yes | -| [ansible\_virthwver](#input\_ansible\_virthwver) | The hardware version of the guest VM | `number` | n/a | yes | -| [ansible\_virtual\_network](#input\_ansible\_virtual\_network) | The virtual network for the network interface | `string` | n/a | yes | -| [ca\_boot\_firmware](#input\_ca\_boot\_firmware) | The firmware type for the guest VM | `string` | n/a | yes | -| [ca\_disk\_store](#input\_ca\_disk\_store) | The name of the data store where the guest VM will be created | `string` | n/a | yes | -| [ca\_guest\_name](#input\_ca\_guest\_name) | The name of the guest VM | `string` | n/a | yes | -| [ca\_memsize](#input\_ca\_memsize) | The amount of memory to allocate the guest VM in MB (1024 = 1GB) | `number` | n/a | yes | -| [ca\_nic\_type](#input\_ca\_nic\_type) | The type for the network interface | `string` | n/a | yes | -| [ca\_notes](#input\_ca\_notes) | Annotated notes to add to the guest VM | `string` | n/a | yes | -| [ca\_numvcpus](#input\_ca\_numvcpus) | The number of vCPUs to allocate to the guest VM | `number` | n/a | yes | -| [ca\_power](#input\_ca\_power) | Set the guest VM Power state | `string` | n/a | yes | -| [ca\_resource\_pool\_name](#input\_ca\_resource\_pool\_name) | The name of the Resource Pool for the guest VM | `string` | n/a | yes | -| [ca\_virthwver](#input\_ca\_virthwver) | The hardware version of the guest VM | `number` | n/a | yes | -| [ca\_virtual\_network](#input\_ca\_virtual\_network) | The virtual network for the network interface | `string` | n/a | yes | -| [dc02\_boot\_firmware](#input\_dc02\_boot\_firmware) | The firmware type for the guest VM | `string` | n/a | yes | -| [dc02\_disk\_store](#input\_dc02\_disk\_store) | The name of the data store where the guest VM will be created | `string` | n/a | yes | -| [dc02\_guest\_name](#input\_dc02\_guest\_name) | The name of the guest VM | `string` | n/a | yes | -| [dc02\_memsize](#input\_dc02\_memsize) | The amount of memory to allocate the guest VM in MB (1024 = 1GB) | `number` | n/a | yes | -| [dc02\_nic\_type](#input\_dc02\_nic\_type) | The type for the network interface | `string` | n/a | yes | -| [dc02\_notes](#input\_dc02\_notes) | Annotated notes to add to the guest VM | `string` | n/a | yes | -| [dc02\_numvcpus](#input\_dc02\_numvcpus) | The number of vCPUs to allocate to the guest VM | `number` | n/a | yes | -| [dc02\_power](#input\_dc02\_power) | Set the guest VM Power state | `string` | n/a | yes | -| [dc02\_resource\_pool\_name](#input\_dc02\_resource\_pool\_name) | The name of the Resource Pool for the guest VM | `string` | n/a | yes | -| [dc02\_virthwver](#input\_dc02\_virthwver) | The hardware version of the guest VM | `number` | n/a | yes | -| [dc02\_virtual\_network](#input\_dc02\_virtual\_network) | The virtual network for the network interface | `string` | n/a | yes | -| [docker\_boot\_firmware](#input\_docker\_boot\_firmware) | The firmware type for the guest VM | `string` | n/a | yes | -| [docker\_clone\_from\_vm](#input\_docker\_clone\_from\_vm) | The source VM to clone | `string` | n/a | yes | -| [docker\_disk\_store](#input\_docker\_disk\_store) | The name of the data store where the guest VM will be created | `string` | n/a | yes | -| [docker\_guest\_name](#input\_docker\_guest\_name) | The name of the guest VM | `string` | n/a | yes | -| [docker\_memsize](#input\_docker\_memsize) | The amount of memory to allocate the guest VM in MB (1024 = 1GB) | `number` | n/a | yes | -| [docker\_nic\_type](#input\_docker\_nic\_type) | The type for the network interface | `string` | n/a | yes | -| [docker\_notes](#input\_docker\_notes) | Annotated notes to add to the guest VM | `string` | n/a | yes | -| [docker\_numvcpus](#input\_docker\_numvcpus) | The number of vCPUs to allocate to the guest VM | `number` | n/a | yes | -| [docker\_power](#input\_docker\_power) | Set the guest VM Power state | `string` | n/a | yes | -| [docker\_resource\_pool\_name](#input\_docker\_resource\_pool\_name) | The name of the Resource Pool for the guest VM | `string` | n/a | yes | -| [docker\_virthwver](#input\_docker\_virthwver) | The hardware version of the guest VM | `number` | n/a | yes | -| [docker\_virtual\_network](#input\_docker\_virtual\_network) | The virtual network for the network interface | `string` | n/a | yes | -| [esxi\_hostname](#input\_esxi\_hostname) | hostname for ESXI host | `string` | n/a | yes | -| [esxi\_hostport](#input\_esxi\_hostport) | SSH port for ESXI host | `string` | n/a | yes | -| [esxi\_hostssl](#input\_esxi\_hostssl) | SSL port for ESXI host | `string` | n/a | yes | -| [esxi\_password](#input\_esxi\_password) | password for ESXI host | `string` | n/a | yes | -| [esxi\_username](#input\_esxi\_username) | username for ESXI host | `string` | n/a | yes | -| [port\_group\_name](#input\_port\_group\_name) | The name of the Port Group | `string` | n/a | yes | -| [port\_group\_vlan](#input\_port\_group\_vlan) | The VLAN ID for the Port Group | `number` | n/a | yes | -| [uplink\_name](#input\_uplink\_name) | The name of the vSwitch uplink | `string` | n/a | yes | -| [vswitch\_name](#input\_vswitch\_name) | The name of the vSwitch | `string` | n/a | yes | +| [dc02\_automatic\_reboot](#input\_dc02\_automatic\_reboot) | Automatically reboot the VM when parameter changes require this. If disabled the provider will emit a warning when the VM needs to be rebooted. | `bool` | n/a | yes | +| [dc02\_bios](#input\_dc02\_bios) | The BIOS to use, options are seabios or ovmf for UEFI | `string` | n/a | yes | +| [dc02\_boot](#input\_dc02\_boot) | The boot order for the VM. For example: order=scsi0;ide2;net0 | `string` | n/a | yes | +| [dc02\_bridge](#input\_dc02\_bridge) | Bridge to which the network device should be attached. The Proxmox VE standard bridge is called vmbr0. | `string` | n/a | yes | +| [dc02\_cores](#input\_dc02\_cores) | The number of CPU cores per CPU socket to allocate to the VM. | `number` | n/a | yes | +| [dc02\_cpu](#input\_dc02\_cpu) | The type of CPU to emulate in the Guest | `string` | n/a | yes | +| [dc02\_desc](#input\_dc02\_desc) | The description of the VM. Shows as the 'Notes' field in the Proxmox GUI | `string` | n/a | yes | +| [dc02\_disk\_size](#input\_dc02\_disk\_size) | The size of the created disk. Accepts K for kibibytes, M for mebibytes, G for gibibytes, T for tibibytes. When only a number is provided gibibytes is assumed. Required when type=disk and passthrough=false, Computed when type=disk and passthrough=true. | `string` | n/a | yes | +| [dc02\_disk\_storage](#input\_dc02\_disk\_storage) | Required when type=disk and passthrough=false. The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [dc02\_efi\_storage](#input\_dc02\_efi\_storage) | The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [dc02\_efitype](#input\_dc02\_efitype) | The type of efi disk device to add. Options: 2m, 4m | `string` | n/a | yes | +| [dc02\_force\_create](#input\_dc02\_force\_create) | If false, and a vm of the same name, on the same node exists, terraform will attempt to reconfigure that VM with these settings. Set to true to always create a new VM (note, the name of the VM must still be unique, otherwise an error will be produced.) | `bool` | n/a | yes | +| [dc02\_hotplug](#input\_dc02\_hotplug) | Comma delimited list of hotplug features to enable. Options: network, disk, cpu, memory, usb. Set to 0 to disable hotplug. | `string` | n/a | yes | +| [dc02\_memory](#input\_dc02\_memory) | The amount of memory to allocate to the VM in Megabytes. | `number` | n/a | yes | +| [dc02\_model](#input\_dc02\_model) | Network Card Model. The virtio model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use e1000. Options: e1000, e1000-82540em, e1000-82544gc, e1000-82545em, i82551, i82557b, i82559er, ne2k\_isa, ne2k\_pci, pcnet, rtl8139, virtio, vmxnet3. | `string` | n/a | yes | +| [dc02\_name](#input\_dc02\_name) | The name of the VM within Proxmox | `string` | n/a | yes | +| [dc02\_onboot](#input\_dc02\_onboot) | Whether to have the VM startup after the PVE node starts. | `bool` | n/a | yes | +| [dc02\_os\_type](#input\_dc02\_os\_type) | Which provisioning method to use, based on the OS type. Options: ubuntu, centos, cloud-init. | `string` | n/a | yes | +| [dc02\_protection](#input\_dc02\_protection) | Enable/disable the VM protection from being removed. The default value of false indicates the VM is removable. | `bool` | n/a | yes | +| [dc02\_qemu\_os](#input\_dc02\_qemu\_os) | The type of OS in the guest. Set properly to allow Proxmox to enable optimizations for the appropriate guest OS. It takes the value from the source template and ignore any changes to resource configuration parameter. | `string` | n/a | yes | +| [dc02\_scsihw](#input\_dc02\_scsihw) | The SCSI controller to emulate. Options: lsi, lsi53c810, megasas, pvscsi, virtio-scsi-pci, virtio-scsi-single. | `string` | n/a | yes | +| [dc02\_sockets](#input\_dc02\_sockets) | The number of CPU sockets to allocate to the VM. | `number` | n/a | yes | +| [dc02\_tablet](#input\_dc02\_tablet) | Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. | `bool` | n/a | yes | +| [dc02\_target\_node](#input\_dc02\_target\_node) | The name of the Proxmox Node on which to place the VM. | `string` | n/a | yes | +| [dc02\_vm\_state](#input\_dc02\_vm\_state) | The desired state of the VM, options are running, stopped and started. Do note that started will only start the vm on creation and won't fully manage the power state unlike running and stopped do. | `string` | n/a | yes | +| [docker\_automatic\_reboot](#input\_docker\_automatic\_reboot) | Automatically reboot the VM when parameter changes require this. If disabled the provider will emit a warning when the VM needs to be rebooted. | `bool` | n/a | yes | +| [docker\_bios](#input\_docker\_bios) | The BIOS to use, options are seabios or ovmf for UEFI | `string` | n/a | yes | +| [docker\_boot](#input\_docker\_boot) | The boot order for the VM. For example: order=scsi0;ide2;net0 | `string` | n/a | yes | +| [docker\_bridge](#input\_docker\_bridge) | Bridge to which the network device should be attached. The Proxmox VE standard bridge is called vmbr0. | `string` | n/a | yes | +| [docker\_cores](#input\_docker\_cores) | The number of CPU cores per CPU socket to allocate to the VM. | `number` | n/a | yes | +| [docker\_cpu](#input\_docker\_cpu) | The type of CPU to emulate in the Guest | `string` | n/a | yes | +| [docker\_desc](#input\_docker\_desc) | The description of the VM. Shows as the 'Notes' field in the Proxmox GUI | `string` | n/a | yes | +| [docker\_disk\_size](#input\_docker\_disk\_size) | The size of the created disk. Accepts K for kibibytes, M for mebibytes, G for gibibytes, T for tibibytes. When only a number is provided gibibytes is assumed. Required when type=disk and passthrough=false, Computed when type=disk and passthrough=true. | `string` | n/a | yes | +| [docker\_disk\_storage](#input\_docker\_disk\_storage) | Required when type=disk and passthrough=false. The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [docker\_efi\_storage](#input\_docker\_efi\_storage) | The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [docker\_efitype](#input\_docker\_efitype) | The type of efi disk device to add. Options: 2m, 4m | `string` | n/a | yes | +| [docker\_force\_create](#input\_docker\_force\_create) | If false, and a vm of the same name, on the same node exists, terraform will attempt to reconfigure that VM with these settings. Set to true to always create a new VM (note, the name of the VM must still be unique, otherwise an error will be produced.) | `bool` | n/a | yes | +| [docker\_hotplug](#input\_docker\_hotplug) | Comma delimited list of hotplug features to enable. Options: network, disk, cpu, memory, usb. Set to 0 to disable hotplug. | `string` | n/a | yes | +| [docker\_memory](#input\_docker\_memory) | The amount of memory to allocate to the VM in Megabytes. | `number` | n/a | yes | +| [docker\_model](#input\_docker\_model) | Network Card Model. The virtio model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use e1000. Options: e1000, e1000-82540em, e1000-82544gc, e1000-82545em, i82551, i82557b, i82559er, ne2k\_isa, ne2k\_pci, pcnet, rtl8139, virtio, vmxnet3. | `string` | n/a | yes | +| [docker\_name](#input\_docker\_name) | The name of the VM within Proxmox | `string` | n/a | yes | +| [docker\_onboot](#input\_docker\_onboot) | Whether to have the VM startup after the PVE node starts. | `bool` | n/a | yes | +| [docker\_os\_type](#input\_docker\_os\_type) | Which provisioning method to use, based on the OS type. Options: ubuntu, centos, cloud-init. | `string` | n/a | yes | +| [docker\_protection](#input\_docker\_protection) | Enable/disable the VM protection from being removed. The default value of false indicates the VM is removable. | `bool` | n/a | yes | +| [docker\_qemu\_os](#input\_docker\_qemu\_os) | The type of OS in the guest. Set properly to allow Proxmox to enable optimizations for the appropriate guest OS. It takes the value from the source template and ignore any changes to resource configuration parameter. | `string` | n/a | yes | +| [docker\_scsihw](#input\_docker\_scsihw) | The SCSI controller to emulate. Options: lsi, lsi53c810, megasas, pvscsi, virtio-scsi-pci, virtio-scsi-single. | `string` | n/a | yes | +| [docker\_sockets](#input\_docker\_sockets) | The number of CPU sockets to allocate to the VM. | `number` | n/a | yes | +| [docker\_tablet](#input\_docker\_tablet) | Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. | `bool` | n/a | yes | +| [docker\_target\_node](#input\_docker\_target\_node) | The name of the Proxmox Node on which to place the VM. | `string` | n/a | yes | +| [docker\_vm\_state](#input\_docker\_vm\_state) | The desired state of the VM, options are running, stopped and started. Do note that started will only start the vm on creation and won't fully manage the power state unlike running and stopped do. | `string` | n/a | yes | +| [veeam\_automatic\_reboot](#input\_veeam\_automatic\_reboot) | Automatically reboot the VM when parameter changes require this. If disabled the provider will emit a warning when the VM needs to be rebooted. | `bool` | n/a | yes | +| [veeam\_bios](#input\_veeam\_bios) | The BIOS to use, options are seabios or ovmf for UEFI | `string` | n/a | yes | +| [veeam\_boot](#input\_veeam\_boot) | The boot order for the VM. For example: order=scsi0;ide2;net0 | `string` | n/a | yes | +| [veeam\_bridge](#input\_veeam\_bridge) | Bridge to which the network device should be attached. The Proxmox VE standard bridge is called vmbr0. | `string` | n/a | yes | +| [veeam\_cores](#input\_veeam\_cores) | The number of CPU cores per CPU socket to allocate to the VM. | `number` | n/a | yes | +| [veeam\_cpu](#input\_veeam\_cpu) | The type of CPU to emulate in the Guest | `string` | n/a | yes | +| [veeam\_desc](#input\_veeam\_desc) | The description of the VM. Shows as the 'Notes' field in the Proxmox GUI | `string` | n/a | yes | +| [veeam\_disk\_size](#input\_veeam\_disk\_size) | The size of the created disk. Accepts K for kibibytes, M for mebibytes, G for gibibytes, T for tibibytes. When only a number is provided gibibytes is assumed. Required when type=disk and passthrough=false, Computed when type=disk and passthrough=true. | `string` | n/a | yes | +| [veeam\_disk\_storage](#input\_veeam\_disk\_storage) | Required when type=disk and passthrough=false. The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [veeam\_efi\_storage](#input\_veeam\_efi\_storage) | The name of the storage pool on which to store the disk. | `string` | n/a | yes | +| [veeam\_efitype](#input\_veeam\_efitype) | The type of efi disk device to add. Options: 2m, 4m | `string` | n/a | yes | +| [veeam\_force\_create](#input\_veeam\_force\_create) | If false, and a vm of the same name, on the same node exists, terraform will attempt to reconfigure that VM with these settings. Set to true to always create a new VM (note, the name of the VM must still be unique, otherwise an error will be produced.) | `bool` | n/a | yes | +| [veeam\_hotplug](#input\_veeam\_hotplug) | Comma delimited list of hotplug features to enable. Options: network, disk, cpu, memory, usb. Set to 0 to disable hotplug. | `string` | n/a | yes | +| [veeam\_memory](#input\_veeam\_memory) | The amount of memory to allocate to the VM in Megabytes. | `number` | n/a | yes | +| [veeam\_model](#input\_veeam\_model) | Network Card Model. The virtio model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use e1000. Options: e1000, e1000-82540em, e1000-82544gc, e1000-82545em, i82551, i82557b, i82559er, ne2k\_isa, ne2k\_pci, pcnet, rtl8139, virtio, vmxnet3. | `string` | n/a | yes | +| [veeam\_name](#input\_veeam\_name) | The name of the VM within Proxmox | `string` | n/a | yes | +| [veeam\_onboot](#input\_veeam\_onboot) | Whether to have the VM startup after the PVE node starts. | `bool` | n/a | yes | +| [veeam\_os\_type](#input\_veeam\_os\_type) | Which provisioning method to use, based on the OS type. Options: ubuntu, centos, cloud-init. | `string` | n/a | yes | +| [veeam\_protection](#input\_veeam\_protection) | Enable/disable the VM protection from being removed. The default value of false indicates the VM is removable. | `bool` | n/a | yes | +| [veeam\_qemu\_os](#input\_veeam\_qemu\_os) | The type of OS in the guest. Set properly to allow Proxmox to enable optimizations for the appropriate guest OS. It takes the value from the source template and ignore any changes to resource configuration parameter. | `string` | n/a | yes | +| [veeam\_scsihw](#input\_veeam\_scsihw) | The SCSI controller to emulate. Options: lsi, lsi53c810, megasas, pvscsi, virtio-scsi-pci, virtio-scsi-single. | `string` | n/a | yes | +| [veeam\_sockets](#input\_veeam\_sockets) | The number of CPU sockets to allocate to the VM. | `number` | n/a | yes | +| [veeam\_tablet](#input\_veeam\_tablet) | Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. | `bool` | n/a | yes | +| [veeam\_target\_node](#input\_veeam\_target\_node) | The name of the Proxmox Node on which to place the VM. | `string` | n/a | yes | +| [veeam\_vm\_state](#input\_veeam\_vm\_state) | The desired state of the VM, options are running, stopped and started. Do note that started will only start the vm on creation and won't fully manage the power state unlike running and stopped do. | `string` | n/a | yes | ## Outputs diff --git a/production/host_02/providers.tf b/production/host_02/providers.tf index b46f5e5..ffaf8f4 100644 --- a/production/host_02/providers.tf +++ b/production/host_02/providers.tf @@ -18,7 +18,7 @@ terraform { } provider "proxmox" { - pm_api_url = "https://prod-host-02.binarybraids.com:8006/api2/json" - pm_user = "terraform@pve" + pm_api_url = "https://prod-host-02.binarybraids.com:8006/api2/json" + pm_user = "terraform@pve" pm_password = "#{PROD_02_HOST_TERRAFORM_PASSWORD}#" } \ No newline at end of file diff --git a/production/host_02/terraform.tfvars b/production/host_02/terraform.tfvars index 636b57b..f323d12 100644 --- a/production/host_02/terraform.tfvars +++ b/production/host_02/terraform.tfvars @@ -1,80 +1,80 @@ #Domain Controller -dc02_name = "vm-prod-dc-02" -dc02_desc = "Domain Controller" -dc02_automatic_reboot = true -dc02_bios = "ovmf" -dc02_boot = "order=sata0;sata1" -dc02_cores = 1 -dc02_sockets = 2 -dc02_cpu = "host" -dc02_force_create = false -dc02_hotplug = "disk,network,usb" -dc02_memory = 2048 -dc02_onboot = true -dc02_vm_state = "running" -dc02_os_type = "Microsoft Windows 11/2022/2025" -dc02_qemu_os = "l26" -dc02_scsihw = "lsi" -dc02_protection = false -dc02_tablet = true -dc02_target_node = "prod-host-02.binarybraids.com" -dc02_efitype = "4m" -dc02_efi_storage = "VM-240GB-SSD" -dc02_disk_size = "75G" -dc02_disk_storage = "VM-240GB-SSD" -dc02_bridge = "vmbr0" -dc02_model = "virtio" +dc02_name = "vm-prod-dc-02" +dc02_desc = "Domain Controller" +dc02_automatic_reboot = true +dc02_bios = "ovmf" +dc02_boot = "order=sata0;sata1" +dc02_cores = 1 +dc02_sockets = 2 +dc02_cpu = "host" +dc02_force_create = false +dc02_hotplug = "disk,network,usb" +dc02_memory = 2048 +dc02_onboot = true +dc02_vm_state = "running" +dc02_os_type = "Microsoft Windows 11/2022/2025" +dc02_qemu_os = "l26" +dc02_scsihw = "lsi" +dc02_protection = false +dc02_tablet = true +dc02_target_node = "prod-host-02.binarybraids.com" +dc02_efitype = "4m" +dc02_efi_storage = "VM-240GB-SSD" +dc02_disk_size = "75G" +dc02_disk_storage = "VM-240GB-SSD" +dc02_bridge = "vmbr0" +dc02_model = "virtio" # Docker Host -docker_name = "vm-prod-dkr-01" -docker_desc = "Docker Host" -docker_automatic_reboot = true -docker_bios = "ovmf" -docker_boot = "order=sata0;scsi0" -docker_cores = 1 -docker_sockets = 4 -docker_cpu = "host" -docker_force_create = false -docker_hotplug = "disk,network,usb" -docker_memory = 4096 -docker_onboot = true -docker_vm_state = "running" -docker_os_type = "Linux 6.x - 2.6 Kernel" -docker_qemu_os = "l26" -docker_scsihw = "lsi" -docker_protection = false -docker_tablet = true -docker_target_node = "prod-host-02.binarybraids.com" -docker_efitype = "4m" -docker_efi_storage = "VM-240GB-SSD" -docker_disk_size = "40G" -docker_disk_storage = "VM-240GB-SSD" -docker_bridge = "vmbr0" -docker_model = "virtio" +docker_name = "vm-prod-dkr-01" +docker_desc = "Docker Host" +docker_automatic_reboot = true +docker_bios = "ovmf" +docker_boot = "order=sata0;scsi0" +docker_cores = 1 +docker_sockets = 4 +docker_cpu = "host" +docker_force_create = false +docker_hotplug = "disk,network,usb" +docker_memory = 4096 +docker_onboot = true +docker_vm_state = "running" +docker_os_type = "Linux 6.x - 2.6 Kernel" +docker_qemu_os = "l26" +docker_scsihw = "lsi" +docker_protection = false +docker_tablet = true +docker_target_node = "prod-host-02.binarybraids.com" +docker_efitype = "4m" +docker_efi_storage = "VM-240GB-SSD" +docker_disk_size = "40G" +docker_disk_storage = "VM-240GB-SSD" +docker_bridge = "vmbr0" +docker_model = "virtio" #Veeam Server -veeam_name = "vm-prod-bkp-01" -veeam_desc = "Veeam Server" -veeam_automatic_reboot = true -veeam_bios = "ovmf" -veeam_boot = "order=sata0;sata1" -veeam_cores = 1 -veeam_sockets = 3 -veeam_cpu = "host" -veeam_force_create = false -veeam_hotplug = "disk,network,usb" -veeam_memory = 5120 -veeam_onboot = true -veeam_vm_state = "running" -veeam_os_type = "Microsoft Windows 11/2022/2025" -veeam_qemu_os = "l26" -veeam_scsihw = "lsi" -veeam_protection = false -veeam_tablet = true -veeam_target_node = "prod-host-02.binarybraids.com" -veeam_efitype = "4m" -veeam_efi_storage = "VM-240GB-SSD" -veeam_disk_size = "75G" -veeam_disk_storage = "VM-240GB-SSD" -veeam_bridge = "vmbr0" -veeam_model = "virtio" \ No newline at end of file +veeam_name = "vm-prod-bkp-01" +veeam_desc = "Veeam Server" +veeam_automatic_reboot = true +veeam_bios = "ovmf" +veeam_boot = "order=sata0;sata1" +veeam_cores = 1 +veeam_sockets = 3 +veeam_cpu = "host" +veeam_force_create = false +veeam_hotplug = "disk,network,usb" +veeam_memory = 5120 +veeam_onboot = true +veeam_vm_state = "running" +veeam_os_type = "Microsoft Windows 11/2022/2025" +veeam_qemu_os = "l26" +veeam_scsihw = "lsi" +veeam_protection = false +veeam_tablet = true +veeam_target_node = "prod-host-02.binarybraids.com" +veeam_efitype = "4m" +veeam_efi_storage = "VM-240GB-SSD" +veeam_disk_size = "75G" +veeam_disk_storage = "VM-240GB-SSD" +veeam_bridge = "vmbr0" +veeam_model = "virtio" \ No newline at end of file diff --git a/production/host_02/virtual_machines.tf b/production/host_02/virtual_machines.tf index e6a74df..eb4d343 100644 --- a/production/host_02/virtual_machines.tf +++ b/production/host_02/virtual_machines.tf @@ -3,26 +3,27 @@ # Virtual Machines ## Domain Controller + resource "proxmox_vm_qemu" "dc02" { - name = var.dc02_name - desc = var.dc02_desc - automatic_reboot = var.dc02_automatic_reboot - bios = var.dc02_bios - boot = var.dc02_boot - cores = var.dc02_cores - sockets = var.dc02_sockets - cpu = var.dc02_cpu - force_create = var.dc02_force_create - hotplug = var.dc02_hotplug - memory = var.dc02_memory - onboot = var.dc02_onboot - vm_state = var.dc02_vm_state - os_type = var.dc02_os_type - qemu_os = var.dc02_qemu_os - scsihw = var.dc02_scsihw - protection = var.dc02_protection - tablet = var.dc02_tablet - target_node = var.dc02_target_node + name = var.dc02_name + desc = var.dc02_desc + automatic_reboot = var.dc02_automatic_reboot + bios = var.dc02_bios + boot = var.dc02_boot + cores = var.dc02_cores + sockets = var.dc02_sockets + cpu = var.dc02_cpu + force_create = var.dc02_force_create + hotplug = var.dc02_hotplug + memory = var.dc02_memory + onboot = var.dc02_onboot + vm_state = var.dc02_vm_state + os_type = var.dc02_os_type + qemu_os = var.dc02_qemu_os + scsihw = var.dc02_scsihw + protection = var.dc02_protection + tablet = var.dc02_tablet + target_node = var.dc02_target_node efidisk { efitype = var.dc02_efitype @@ -33,40 +34,40 @@ resource "proxmox_vm_qemu" "dc02" { sata { sata0 { disk { - size = var.dc02_disk_size - storage = var.dc02_disk_storage + size = var.dc02_disk_size + storage = var.dc02_disk_storage } } } } network { - bridge = var.dc02_bridge - model = var.dc02_model + bridge = var.dc02_bridge + model = var.dc02_model } } ## Veeam Server resource "proxmox_vm_qemu" "veeam" { - name = var.veeam_name - desc = var.veeam_desc - automatic_reboot = var.veeam_automatic_reboot - bios = var.veeam_bios - boot = var.veeam_boot - cores = var.veeam_cores - sockets = var.veeam_sockets - cpu = var.veeam_cpu - force_create = var.veeam_force_create - hotplug = var.veeam_hotplug - memory = var.veeam_memory - onboot = var.veeam_onboot - vm_state = var.veeam_vm_state - os_type = var.veeam_os_type - qemu_os = var.veeam_qemu_os - scsihw = var.veeam_scsihw - protection = var.veeam_protection - tablet = var.veeam_tablet - target_node = var.veeam_target_node + name = var.veeam_name + desc = var.veeam_desc + automatic_reboot = var.veeam_automatic_reboot + bios = var.veeam_bios + boot = var.veeam_boot + cores = var.veeam_cores + sockets = var.veeam_sockets + cpu = var.veeam_cpu + force_create = var.veeam_force_create + hotplug = var.veeam_hotplug + memory = var.veeam_memory + onboot = var.veeam_onboot + vm_state = var.veeam_vm_state + os_type = var.veeam_os_type + qemu_os = var.veeam_qemu_os + scsihw = var.veeam_scsihw + protection = var.veeam_protection + tablet = var.veeam_tablet + target_node = var.veeam_target_node efidisk { efitype = var.veeam_efitype @@ -77,40 +78,40 @@ resource "proxmox_vm_qemu" "veeam" { sata { sata0 { disk { - size = var.veeam_disk_size - storage = var.veeam_disk_storage + size = var.veeam_disk_size + storage = var.veeam_disk_storage } } } } network { - bridge = var.veeam_bridge - model = var.veeam_model + bridge = var.veeam_bridge + model = var.veeam_model } } # Docker Host resource "proxmox_vm_qemu" "docker" { - name = var.docker_name - desc = var.docker_desc - automatic_reboot = var.docker_automatic_reboot - bios = var.docker_bios - boot = var.docker_boot - cores = var.docker_cores - sockets = var.docker_sockets - cpu = var.docker_cpu - force_create = var.docker_force_create - hotplug = var.docker_hotplug - memory = var.docker_memory - onboot = var.docker_onboot - vm_state = var.docker_vm_state - os_type = var.docker_os_type - qemu_os = var.docker_qemu_os - scsihw = var.docker_scsihw - protection = var.docker_protection - tablet = var.docker_tablet - target_node = var.docker_target_node + name = var.docker_name + desc = var.docker_desc + automatic_reboot = var.docker_automatic_reboot + bios = var.docker_bios + boot = var.docker_boot + cores = var.docker_cores + sockets = var.docker_sockets + cpu = var.docker_cpu + force_create = var.docker_force_create + hotplug = var.docker_hotplug + memory = var.docker_memory + onboot = var.docker_onboot + vm_state = var.docker_vm_state + os_type = var.docker_os_type + qemu_os = var.docker_qemu_os + scsihw = var.docker_scsihw + protection = var.docker_protection + tablet = var.docker_tablet + target_node = var.docker_target_node efidisk { efitype = var.docker_efitype @@ -121,20 +122,20 @@ resource "proxmox_vm_qemu" "docker" { sata { sata0 { disk { - backup = var.docker_disk_backup - cache = var.docker_disk_cache - discard = var.docker_disk_discard - emulatessd = var.docker_disk_emulatessd - size = var.docker_disk_size - storage = var.docker_disk_storage + backup = var.docker_disk_backup + cache = var.docker_disk_cache + discard = var.docker_disk_discard + emulatessd = var.docker_disk_emulatessd + size = var.docker_disk_size + storage = var.docker_disk_storage } } } } network { - bridge = var.docker_bridge - model = var.docker_model + bridge = var.docker_bridge + model = var.docker_model } } diff --git a/terraform-docs.tar.gz b/terraform-docs.tar.gz new file mode 100644 index 0000000..45f9b04 Binary files /dev/null and b/terraform-docs.tar.gz differ