Working with Terraform
“Terraform is an infrastructure as code tool that lets you build, change, and version cloud and on-prem resources safely and efficiently.”
| Declarative schema | Physical result |
|---|---|
|
|
| Declarative schema | Physical result |
|---|---|
|
Creating IPs, networks, servers, message queues, ... |
...
├── env.template
├── 030HelloSshPublicKey
│ ├── main.tf
│ ├── providers.tf
│ ├── Readme.md
│ └── variables.tf
└── Modules
├── HostMetaData
...
└── SshKnownHosts
...export TF_VAR_login_user=devops
export TF_VAR_ssh_login_public_key=add_your_provider_token
export TF_VAR_hcloud_token=add_your_provider_token
export TF_VAR_dns_secret=add_your_ds_server_secretTo be copied, edited and used by Terraform.
-
Access you cloud project by the Hetzner GUI interface.
-
Go to
Security-->API Tokens-->Generate API token -
Provide a name and hit “Generate API token”.
-
Copy the generated token's value and store it in a secure location e.g. a password manager.
Caution
The Hetzner GUI blocks subsequent read access after creation.
In case of loss: Delete the existing and generate a new one.
