Coder Social home page Coder Social logo

terraform-modules's People

Contributors

shakir85 avatar

Watchers

 avatar

terraform-modules's Issues

Limit privilege escalation to `var.username`

This rule allows all users to have privilege escalation when using sudo for all commands. This is not a good practice.

Suggested solution is to user TF variable username which is already a requirement for the module:

         sudo: ${var.username}=(ALL) NOPASSWD:ALL

Print default password

Add TF output block to print the default password var.temp_user_password for convenience. Also, add an info message that the password will be forced to change on the first login.

Add host CPU pass through support

Summary

The current Proxmox/VM module defaults to the qmue CPU type, which is the default in PVE. In some cases, we need to change that to support certain applications that don't work with this architecture.

For example, MongoDB version 5+ will fail to work on a VM with the CPU type set to qmue:

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see https://jira.mongodb.org/browse/SERVER-54407
  see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814

Proposed solution

Add the optional feature to set the CPU architecture cpu.type:
https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_vm#host

Currently impacted VMs

  • logger - Graylog VM

Rename `cloud-config.yml`

Since this file will always be overwritten by the module when called, use a unique name to avoid overwriting a snippet with the same name the user downloaded or used outside the Terraform module.

Suggest: reponame + path-to-module: e.g. shakir85-terraform-modules-proxmox-vm-cloudinit.yml

Output when deploying a new vm

╷
│ Warning: the existing file "sdd:snippets/cloud-config.yaml" has been overwritten by the resource.
│
│   with module.crap2.proxmox_virtual_environment_file.cloud_config,
│   on .terraform/modules/crap2/proxmox/vm/main.tf line 83, in resource "proxmox_virtual_environment_file" "cloud_config":
│   83: resource "proxmox_virtual_environment_file" "cloud_config" {
│
╵

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.