diff --git a/.github/workflows/host_01_production.yml b/.github/workflows/host_01_production.yml index ea8bfcf..a076885 100644 --- a/.github/workflows/host_01_production.yml +++ b/.github/workflows/host_01_production.yml @@ -1,7 +1,8 @@ -name: Host 01 Production CI +name: Host 01 Production CD on: - workflow_dispatch: + workflow_dispatch: + pull_request: permissions: contents: write @@ -60,24 +61,12 @@ jobs: name: Terraform Apply needs: - init_and_plan - if: github.event_name != 'pull_request' && needs.init_and_plan.outputs.planExitcode == 2 + if: needs.init_and_plan.outputs.planExitcode == 2 runs-on: Self-Hosted + environment: "Host 01 Production" steps: - - name: Install Docker - uses: crazy-max/ghaction-setup-docker@v3 - - - name: Manual Approval 🚦 - uses: trstringer/manual-approval@v1 - with: - secret: ${{ github.TOKEN }} - approvers: data-tangles - minimum-approvals: 1 - issue-title: "Terraform Apply" - issue-body: "Please approve or deny the Terraform Apply operation" - exclude-workflow-initiator-as-approver: false - - name: Checkout 🔔 uses: actions/checkout@v4 @@ -87,6 +76,11 @@ jobs: path: ./production/host_01/** key: ${{ github.sha }} + - name: Install NodeJS 🖥️ + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install Terraform ⛰️ uses: hashicorp/setup-terraform@v3 diff --git a/.github/workflows/host_02_production.yml b/.github/workflows/host_02_production.yml index a5d48c8..b9d300f 100644 --- a/.github/workflows/host_02_production.yml +++ b/.github/workflows/host_02_production.yml @@ -1,7 +1,8 @@ -name: Host 02 Production CI +name: Host 02 Production CD on: workflow_dispatch: + pull_request: permissions: contents: write @@ -60,8 +61,9 @@ jobs: name: Terraform Apply needs: - init_and_plan - if: github.event_name != 'pull_request' && needs.init_and_plan.outputs.planExitcode == 2 + if: needs.init_and_plan.outputs.planExitcode == 2 runs-on: Self-Hosted + environment: "Host 02 Production" steps: diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 890a21a..49e6fce 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -26,17 +26,48 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} token: ${{ steps.generate-token.outputs.token }} + - name: Install Terraform ⛰️ + uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3 + + - name: Run TFLint ✅ + uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4 + with: + tflint_version: latest + + - name: Download and install Terraform Docs + run: | + 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 + - name: Generate Terraform Docs 🗒️ - id: push-terraform-docs-changes - uses: terraform-docs/gh-actions@v1.1.0 + run: | + # Get folders which contain .tf files + folder_list=$(find . -name '*.tf' -printf '%h\n' | sort -u) + + # Run terraform-docs command for each subfolder + for folder in $folder_list; do + terraform-docs markdown table --output-file README.md "$folder" + done + + - name: Run Terraform fmt ✅ + run: | + terraform fmt -recursive + + - name: Check for changed files 🕵️ + uses: tj-actions/verify-changed-files@ab875806658e59162bc5f42e4df5c2d4682c459e # v20 + id: verify-changed-files + + - name: Commit Terraform code changes 🖊️ + if: steps.verify-changed-files.outputs.files_changed == 'true' + uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9 with: - find-dir: . - output-file: README.md - output-method: replace - git-push-user-name: "braid-bot[bot]" - git-push-user-email: "169546839+braid-bot[bot]@users.noreply.github.com" - git-push: "true" - git-commit-message: "docs: 🤖 Update Terraform Docs for Workflow Run ID: ${{ github.run_id }} in Branch: ${{ github.head_ref }}" + default_author: github_actor + author_name: "braid-bot[bot]" + author_email: "169546839+braid-bot[bot]@users.noreply.github.com" + message: | + "🤖 Automated commit for Workflow Run ID: ${{ github.run_id }} in Branch: ${{ github.head_ref }}" changelog: name: Generate Changelog 🗒️ diff --git a/CHANGELOG.md b/CHANGELOG.md index a2e2e08..85d1b66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [0.1.12](https://github.com/binary-braids/terraform-esxi/compare/v0.1.11...v0.1.12) (2024-05-12) + + +### Bug Fixes + +* add environment to host 02 workflow ([27b1edd](https://github.com/binary-braids/terraform-esxi/commit/27b1edda990cc51271c1966e5a5b11706d3bc594)) +* change Terraform Docs to bash script instead of action ([2147143](https://github.com/binary-braids/terraform-esxi/commit/214714360decdf5914d5ea9967e88969f4c29dc7)) +* correct tf-docs command ([ba30f5b](https://github.com/binary-braids/terraform-esxi/commit/ba30f5bc5033a34ea870d8acc28712fecc6fe2f8)) +* Improve Validation and Deployment workflows ([95a4031](https://github.com/binary-braids/terraform-esxi/commit/95a40313366b8a95560bcbe5af57d0fe4b1996fd)) +* modify terraform docs action ([3b68ed0](https://github.com/binary-braids/terraform-esxi/commit/3b68ed07e8dfbe09df3eab82db1c3399f7aceeda)) +* Remove node install action ([43cb90b](https://github.com/binary-braids/terraform-esxi/commit/43cb90b2e83fa865182cb005a9cb6ef021536e4f)) + + + ## [0.1.11](https://github.com/binary-braids/terraform-esxi/compare/v0.1.10...v0.1.11) (2024-05-11) @@ -69,7 +83,3 @@ -## [0.1.2](https://github.com/binary-braids/terraform-esxi/compare/v0.1.1...v0.1.2) (2024-05-08) - - - diff --git a/README.md b/README.md index 11ea850..97dd257 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,431 @@ -[![Host 01 Production CI](https://github.com/binary-braids/terraform-esxi/actions/workflows/host_01_production.yml/badge.svg)](https://github.com/binary-braids/terraform-esxi/actions/workflows/host_01_production.yml) -[![Host 02 Production CI](https://github.com/binary-braids/terraform-esxi/actions/workflows/host_02_production.yml/badge.svg)](https://github.com/binary-braids/terraform-esxi/actions/workflows/host_02_production.yml) -[![Run validation against Terraform code](https://github.com/binary-braids/terraform-esxi/actions/workflows/validation.yml/badge.svg)](https://github.com/binary-braids/terraform-esxi/actions/workflows/validation.yml) +# terraform-docs -[![terraform](https://img.shields.io/badge/Terraform-purple?style=for-the-badge&logo=terraform)](https://www.terraform.io/) -[![renovate](https://img.shields.io/badge/renovate-enabled-brightgreen?style=for-the-badge&logo=renovatebot)](https://github.com/renovatebot/renovate) -[![HitCount](https://hits.dwyl.com/binary-braids/terraform-esxi.svg?style=for-the-badge&show=unique)](http://hits.dwyl.com/binary-braids/terraform-esxi) +[![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 ESXI +![terraform-docs-teaser](./images/terraform-docs-teaser.png) -This repository contains the Terraform modules for my ESXI homelab. The [registry.terraform.io/josenk/esxi](https://github.com/josenk/terraform-provider-esxi) provider is being used. +## What is terraform-docs -The `terraform.tfvars` for the modules are present within this repository which is generally bad advice however I am using the [cschleiden/replace-tokens](https://github.com/cschleiden/replace-tokens) GitHub Action to replace entries in the files with GitHub secret values. +A utility to generate documentation from Terraform modules in various output formats. -The GitHub Actions workflows are designed to skip the deployment job if no changes are found to the Terraform Plan output. This makes it easy for tools like Renovate and Dependabot to invoke the pipelines during dependancy update checks. +## Installation -## 📂 Repository structure +macOS users can install using [Homebrew]: -The Git repository contains the following directories: +```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 ``` -📁 root -├─📁 .github -└─📁 production - ├─📁 host_01 - └─📁 host_02 + +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 +``` + +## 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 dcc093c..5573686 100644 --- a/package.yaml +++ b/package.yaml @@ -1 +1 @@ -version: 0.1.11 +version: 0.1.12 diff --git a/production/host_01/terraform.tfvars b/production/host_01/terraform.tfvars index 8ad611e..50207dc 100644 --- a/production/host_01/terraform.tfvars +++ b/production/host_01/terraform.tfvars @@ -6,48 +6,48 @@ esxi_username = "terraform" esxi_password = "#{ESXI_PASSWORD}#" # Networking -vswitch_name = "vSwitch0" -uplink_name = "vmnic0" +vswitch_name = "vSwitch0" +uplink_name = "vmnic0" port_group_name = "VM Network" port_group_vlan = 0 #Domain Controller -dc01_guest_name = "#{DC01_GUEST_NAME}#" -dc01_boot_firmware = "efi" -dc01_disk_store = "VM-240GB-SSD" -dc01_memsize = 2048 -dc01_numvcpus = 2 -dc01_power = "on" +dc01_guest_name = "#{DC01_GUEST_NAME}#" +dc01_boot_firmware = "efi" +dc01_disk_store = "VM-240GB-SSD" +dc01_memsize = 2048 +dc01_numvcpus = 2 +dc01_power = "on" dc01_resource_pool_name = "/" -dc01_virthwver = 21 -dc01_virtual_network = "VM Network" -dc01_nic_type = "vmxnet3" -dc01_notes = "Domain Controller" +dc01_virthwver = 21 +dc01_virtual_network = "VM Network" +dc01_nic_type = "vmxnet3" +dc01_notes = "Domain Controller" #Veeam Server -veeam_guest_name = "#{VEEAM_GUEST_NAME}#" -veeam_boot_firmware = "efi" -veeam_disk_store = "VM-240GB-SSD" -veeam_memsize = 5120 -veeam_numvcpus = 3 -veeam_power = "on" -veeam_resource_pool_name = "/" -veeam_virthwver = 21 -veeam_virtual_network = "VM Network" -veeam_nic_type = "vmxnet3" -veeam_notes = "Veeam Server" +veeam_guest_name = "#{VEEAM_GUEST_NAME}#" +veeam_boot_firmware = "efi" +veeam_disk_store = "VM-240GB-SSD" +veeam_memsize = 5120 +veeam_numvcpus = 3 +veeam_power = "on" +veeam_resource_pool_name = "/" +veeam_virthwver = 21 +veeam_virtual_network = "VM Network" +veeam_nic_type = "vmxnet3" +veeam_notes = "Veeam Server" # Media Server -media_guest_name = "#{MEDIA_GUEST_NAME}#" -media_boot_firmware = "bios" -media_disk_store = "VM-240GB-SSD2" -media_memsize = 1024 -media_numvcpus = 2 -media_power = "on" -media_resource_pool_name = "/" -media_virthwver = 21 -media_virtual_disk_slot = "0:1" -media_virtual_disk_id = "#{MEDIA_VIRTUAL_DISK_ID}#" -media_virtual_network = "VM Network" -media_nic_type = "vmxnet3" -media_notes = "Media Server" \ No newline at end of file +media_guest_name = "#{MEDIA_GUEST_NAME}#" +media_boot_firmware = "bios" +media_disk_store = "VM-240GB-SSD2" +media_memsize = 1024 +media_numvcpus = 2 +media_power = "on" +media_resource_pool_name = "/" +media_virthwver = 21 +media_virtual_disk_slot = "0:1" +media_virtual_disk_id = "#{MEDIA_VIRTUAL_DISK_ID}#" +media_virtual_network = "VM Network" +media_nic_type = "vmxnet3" +media_notes = "Media Server" \ No newline at end of file diff --git a/production/host_01/virtual_machines.tf b/production/host_01/virtual_machines.tf index 93942fc..5be8ec9 100644 --- a/production/host_01/virtual_machines.tf +++ b/production/host_01/virtual_machines.tf @@ -57,8 +57,8 @@ resource "esxi_guest" "media" { } network_interfaces { - virtual_network = var.veeam_virtual_network - nic_type = var.veeam_nic_type + virtual_network = var.media_virtual_network + nic_type = var.media_nic_type } notes = var.media_notes diff --git a/production/host_02/terraform.tfvars b/production/host_02/terraform.tfvars index 3522b94..5e65cf7 100644 --- a/production/host_02/terraform.tfvars +++ b/production/host_02/terraform.tfvars @@ -6,60 +6,60 @@ esxi_username = "terraform" esxi_password = "#{ESXI_PASSWORD}#" # Networking -vswitch_name = "vSwitch0" -uplink_name = "vmnic0" +vswitch_name = "vSwitch0" +uplink_name = "vmnic0" port_group_name = "VM Network" port_group_vlan = 0 #Domain Controller -dc02_guest_name = "#{DC02_GUEST_NAME}#" -dc02_boot_firmware = "efi" -dc02_disk_store = "VM-240GB-SSD" -dc02_memsize = 2048 -dc02_numvcpus = 2 -dc02_power = "on" +dc02_guest_name = "#{DC02_GUEST_NAME}#" +dc02_boot_firmware = "efi" +dc02_disk_store = "VM-240GB-SSD" +dc02_memsize = 2048 +dc02_numvcpus = 2 +dc02_power = "on" dc02_resource_pool_name = "/" -dc02_virthwver = 21 -dc02_virtual_network = "VM Network" -dc02_nic_type = "vmxnet3" -dc02_notes = "Domain Controller" +dc02_virthwver = 21 +dc02_virtual_network = "VM Network" +dc02_nic_type = "vmxnet3" +dc02_notes = "Domain Controller" #Certificate Server -ca_guest_name = "#{CA_GUEST_NAME}#" -ca_boot_firmware = "efi" -ca_disk_store = "VM-240GB-SSD" -ca_memsize = 2048 -ca_numvcpus = 2 -ca_power = "on" -ca_resource_pool_name = "/" -ca_virthwver = 21 -ca_virtual_network = "VM Network" -ca_nic_type = "vmxnet3" -ca_notes = "Certificate Server" +ca_guest_name = "#{CA_GUEST_NAME}#" +ca_boot_firmware = "efi" +ca_disk_store = "VM-240GB-SSD" +ca_memsize = 2048 +ca_numvcpus = 2 +ca_power = "on" +ca_resource_pool_name = "/" +ca_virthwver = 21 +ca_virtual_network = "VM Network" +ca_nic_type = "vmxnet3" +ca_notes = "Certificate Server" # ansible Server -ansible_guest_name = "#{ANSIBLE_GUEST_NAME}#" -ansible_boot_firmware = "bios" -ansible_disk_store = "VM-240GB-SSD" -ansible_memsize = 2048 -ansible_numvcpus = 2 -ansible_power = "on" -ansible_resource_pool_name = "/" -ansible_virthwver = 21 -ansible_virtual_network = "VM Network" -ansible_nic_type = "vmxnet3" -ansible_notes = "Ansible Server" +ansible_guest_name = "#{ANSIBLE_GUEST_NAME}#" +ansible_boot_firmware = "bios" +ansible_disk_store = "VM-240GB-SSD" +ansible_memsize = 2048 +ansible_numvcpus = 2 +ansible_power = "on" +ansible_resource_pool_name = "/" +ansible_virthwver = 21 +ansible_virtual_network = "VM Network" +ansible_nic_type = "vmxnet3" +ansible_notes = "Ansible Server" # Docker Host -docker_guest_name = "#{DOCKER_GUEST_NAME}#" -docker_boot_firmware = "efi" -docker_disk_store = "VM-240GB-SSD2" -docker_memsize = 4096 -docker_numvcpus = 4 -docker_power = "on" -docker_resource_pool_name = "/" -docker_virthwver = 21 -docker_clone_from_vm = "pkr-ubuntu-2204" -docker_virtual_network = "VM Network" -docker_nic_type = "vmxnet3" -docker_notes = "Docker Host" \ No newline at end of file +docker_guest_name = "#{DOCKER_GUEST_NAME}#" +docker_boot_firmware = "efi" +docker_disk_store = "VM-240GB-SSD2" +docker_memsize = 4096 +docker_numvcpus = 4 +docker_power = "on" +docker_resource_pool_name = "/" +docker_virthwver = 21 +docker_clone_from_vm = "pkr-ubuntu-2204" +docker_virtual_network = "VM Network" +docker_nic_type = "vmxnet3" +docker_notes = "Docker Host" \ No newline at end of file