Hetzner Cloud Options
An opinionated hetzner cloud module. Read more at https://github.com/terranix/terranix-hcloud
use with terraform version 0.11
To use this module with terranix and terraform version 0.11
{ pkgs, ...}:
let
hcloud-modules = pkgs.fetchgit{
url = "https://github.com/terranix/terranix-hcloud.git";
rev = "2ba5c46ebf48668691148a1458fa71925cff5316";
sha256 = "0z9d28lp2wn56b9l80878vv1f28b0lxzdi870drd4mvmn37ib814";
};
in
{ imports = [ (toString hcloud-modules) ]; }
use with terraform version 0.12
To use this module with terranix and terraform version 0.12
{ pkgs, ...}:
let
hcloud-modules = pkgs.fetchgit{
url = "https://github.com/terranix/terranix-hcloud.git";
rev = "5fa359a482892cd973dcc6ecfc607f4709f24495";
sha256 = "0smgmdiklj98y71fmcdjsqjq8l41i66hs8msc7k4m9dpkphqk86p";
};
in
{ imports = [ (toString hcloud-modules) ]; }
options
These options are available by the module
-
hcloud.enable
Whether to enable hcloud provider See https://www.terraform.io/docs/providers/hcloud/index.html for documentation. .
type : boolean
default :false
defined : module/provider.nix
example :true
-
hcloud.export.nix
Export hcloud information as nix file. Useful when if you want to import run a NixOS script after the terraform.
type : null or string
defined : module/export.nix
-
hcloud.nixserver
create a nixos server, via nixos-infect.
type : attribute set of submodules
defined : module/nixserver.nix
-
hcloud.nixserver.<name>.backups
enable backups or not
type : boolean
default :false
defined : module/nixserver.nix
-
hcloud.nixserver.<name>.channel
nixos channel to install
type : string
default :"nixos-19.09"
defined : module/nixserver.nix
-
hcloud.nixserver.<name>.configurationFile
The configuration.nix, only used by the initial provisioning by nixos-infect.
type : null or path
defined : module/nixserver.nix
-
hcloud.nixserver.<name>.enable
Whether to enable nixserver.
type : boolean
default :false
defined : module/nixserver.nix
example :true
-
hcloud.nixserver.<name>.name
name of the server
type : string
default :"nixserver-‹name›"
defined : module/nixserver.nix
-
hcloud.nixserver.<name>.provisioners
provision steps. see `hcloud.server.provisioners`.
type : list of attribute sets
default :[]
defined : module/nixserver.nix
-
hcloud.nixserver.<name>.serverType
Hardware equipment.This options influences costs!
type : string
default :"cx11"
defined : module/nixserver.nix
-
hcloud.provider.endpoint
Hetzner Cloud API endpoint, can be used to override the default API Endpoint https://api.hetzner.cloud/v1
type : null or string
defined : module/provider.nix
-
hcloud.provider.token
You need an API token to use the API. Sign in into the Hetzner Cloud Console choose a project, go to Access → Tokens, and create a new token. Make sure to copy the token because it won’t be shown to you again. A token is bound to a project, to interact with the API of another project you have to create a new token inside the project If you use a variable you can set it via the environment variable TF_VAR_hcloud_api_token.
type : string
default :"${ var.hcloud_api_token }"
defined : module/provider.nix
-
hcloud.server
servers deployed to the hcloud.
type : attribute set of submodules
defined : module/server.nix
-
hcloud.server.<name>.backups
enable backups or not
type : boolean
default :false
defined : module/server.nix
-
hcloud.server.<name>.enable
Whether to enable really deploy server .
type : boolean
default :false
defined : module/server.nix
example :true
-
hcloud.server.<name>.image
image to spawn on the server
type : string
default :"ubuntu-18.04"
defined : module/server.nix
-
hcloud.server.<name>.name
name of the server
type : string
default :"‹name›"
defined : module/server.nix
-
hcloud.server.<name>.provisioners
provision steps. `file` and `remote-exec` steps automatically get the connection part setup, if you configure the `provisioner.privateKeyFile` parameter.
type : list of attribute sets
default :[]
defined : module/server.nix
example :[{"file":{"destination":"/root/.zshrc","source":"~/.zshrc"}},{"remote-exec":{"inline":["shutdown -r +1"]}}]
-
hcloud.server.<name>.serverType
Hardware equipment. This options influences costs!
type : string
default :"cx11"
defined : module/server.nix