--- page_title: "Provider: Genesis Cloud" subcategory: "" description: |- The Genesis Cloud provider is used to interact with resources supported by Genesis Cloud https://www.genesiscloud.com/. The provider needs to be configured with the proper credentials before it can be used. --- # Genesis Cloud Provider The Genesis Cloud provider is used to interact with resources supported by [Genesis Cloud](https://www.genesiscloud.com/). The provider needs to be configured with the proper credentials before it can be used. - [API Documentation](https://developers.genesiscloud.com/) - [How to generate an API token?](https://support.genesiscloud.com/support/solutions/articles/47001126146-how-to-generate-an-api-token-) The [provider repository](https://github.com/genesiscloud/terraform-provider-genesiscloud) is licensed under Mozilla Public License 2.0 (no copyleft exception) (see [LICENSE.txt](https://github.com/genesiscloud/terraform-provider-genesiscloud/blob/main/LICENSE.txt)) and includes third-party code subject to third-party notices (see [THIRD-PARTY-NOTICES.txt](https://github.com/genesiscloud/terraform-provider-genesiscloud/blob/main/THIRD-PARTY-NOTICES.txt)). ## Example Usage - Create a Genesis Cloud account - Create an API token (see above) - Set the `GENESISCLOUD_TOKEN` env var or specify the `token` in the provider - Make sure to set the version in the provider ```terraform terraform { required_providers { genesiscloud = { source = "genesiscloud/genesiscloud" # version = "..." } } } provider "genesiscloud" { # optional configuration... # set GENESISCLOUD_TOKEN env var or: # token = "..." } # Create an instance: locals { region = "NORD-NO-KRS-1" } resource "genesiscloud_ssh_key" "alice" { name = "alice" public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com" } resource "genesiscloud_security_group" "allow-ssh" { name = "allow-ssh" region = local.region rules = [ { direction = "ingress" protocol = "tcp" port_range_min = 22 port_range_max = 22 }, ] } resource "genesiscloud_security_group" "allow-http" { name = "allow-http" region = local.region rules = [ { direction = "ingress" protocol = "tcp" port_range_min = 80 port_range_max = 80 } ] } resource "genesiscloud_security_group" "allow-https" { name = "allow-https" region = local.region rules = [ { direction = "ingress" protocol = "tcp" port_range_min = 443 port_range_max = 443 } ] } resource "genesiscloud_floating_ip" "floating_ip" { name = "terraform-floating-ip" region = local.region version = "ipv4" } resource "genesiscloud_instance" "instance" { name = "terraform-instance" region = local.region image = "ubuntu-24.04" type = "vcpu-4_memory-16g_nvidia-rtx-3080-1" ssh_key_ids = [ genesiscloud_ssh_key.alice.id, ] security_group_ids = [ genesiscloud_security_group.allow-ssh.id, genesiscloud_security_group.allow-http.id, genesiscloud_security_group.allow-https.id, ] floating_ip_id = genesiscloud_floating_ip.floating_ip.id disk_size = 128 metadata = { startup_script = < ## Schema ### Optional - `endpoint` (String) Genesis Cloud API endpoint. May also be provided via `GENESISCLOUD_ENDPOINT` environment variable. If neither is provided, defaults to `https://api.genesiscloud.com/compute/v1`. - `polling_interval` (String) The polling interval. - The string must be a positive [time duration](https://pkg.go.dev/time#ParseDuration), for example "10s". - `token` (String, Sensitive) Genesis Cloud API token. May also be provided via `GENESISCLOUD_TOKEN` environment variable.