-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from shakir85:fix/change-lxc-module
Refactoring LXC module
- Loading branch information
Showing
8 changed files
with
149 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,78 @@ | ||
|
||
variable "proxmox_node_name" { | ||
variable "description" { | ||
default = "Manage by Terraform" | ||
type = string | ||
description = "Proxmox node name where the container will be deployed. In a single-node environment, it's typically: `pve`" | ||
description = "Container description" | ||
} | ||
|
||
variable "hostname" { | ||
variable "node_name" { | ||
type = string | ||
description = "LXC hostname." | ||
description = "The name of the node to assign the container to" | ||
} | ||
|
||
variable "lxc_template_file" { | ||
variable "hostname" { | ||
type = string | ||
description = "Name of the LXC container template file. For example: ubuntu-20.04-standard_20.04-1_amd64.tar.gz" | ||
description = "Hostname to assign to the container" | ||
} | ||
|
||
variable "lxc_template_path" { | ||
variable "ip_config" { | ||
default = "dhcp" | ||
type = string | ||
description = "Storage name where the LXC template is located. For example, `local` or `local-lvm`." | ||
description = "The IP configuration (default to dhcp)" | ||
} | ||
|
||
variable "password" { | ||
variable "network_interface" { | ||
default = "eth0" | ||
type = string | ||
description = "Container login password." | ||
description = "A network interface" | ||
} | ||
|
||
variable "tags" { | ||
default = null | ||
variable "template_file_id" { | ||
type = string | ||
description = "Tags of the container in a single string and semicolon-delimited (e.g. `terraform;test`).." | ||
description = "The identifier for an OS template file. The ID format is <datastore_id>:<content_type>/<file_name>, for example local:iso/jammy-server-cloudimg-amd64.tar.gz." | ||
} | ||
|
||
variable "swap" { | ||
default = 0 | ||
type = number | ||
description = "A number that sets the amount of swap memory available to the container. Default is `0`." | ||
variable "os_type" { | ||
default = "unmanaged" | ||
type = string | ||
description = "OS type: Alpine, Ubunt ...etc" | ||
} | ||
|
||
variable "disk_name" { | ||
variable "disk_id" { | ||
type = string | ||
description = "Proxmox storage pool (disk name) where the VM's disk should be stored." | ||
description = "Storage disk identifier (name)" | ||
} | ||
|
||
variable "disk_size" { | ||
default = "4" | ||
type = string | ||
description = "Disk size in Terrabyte (T), Gigabytes (G), Megabyte (M), or Kilobyte (K). For example, `8G`" | ||
description = "The size of the root filesystem in gigabytes (defaults to 4). When set to 0 a directory or zfs/btrfs subvolume will be created. Requires datastore_id to be set." | ||
} | ||
|
||
variable "container_network_interface" { | ||
default = "eth0" | ||
variable "ssh_public_key_path" { | ||
type = string | ||
description = "LXC container network interface name. Default value: `eth0`." | ||
description = "Path to the local public key to be added to the default user's `.ssh/authorized_keys` file." | ||
} | ||
|
||
variable "host_bridge_network" { | ||
default = "vmbr0" | ||
type = string | ||
description = "Default node's network device bridge. Default value: `vmbr0`." | ||
variable "memory" { | ||
default = 1024 | ||
type = number | ||
description = "The dedicated memory in megabytes" | ||
} | ||
|
||
variable "ip_address" { | ||
default = "dhcp" | ||
type = string | ||
description = "For setting static DHCP IP, add an IPv4 with CIDR notation. For example 10.20.30.40/24. Default value `dhcp`." | ||
variable "unprivileged" { | ||
default = true | ||
type = bool | ||
description = "Whether the container runs as unprivileged on the host" | ||
} | ||
|
||
variable "firewall" { | ||
default = true | ||
type = bool | ||
description = "Whether this interface's firewall rules should be used" | ||
} | ||
|
||
variable "cpu_cores" { | ||
default = 1 | ||
type = number | ||
description = "The number of CPU cores" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Cloud Image Module Usate | ||
|
||
To be updated. |
Oops, something went wrong.