Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/l-with/terraform-module-instance_hetzner
https://github.com/l-with/terraform-module-instance_hetzner
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/l-with/terraform-module-instance_hetzner
- Owner: l-with
- License: mit
- Created: 2023-09-05T16:04:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-08T15:14:52.000Z (about 1 year ago)
- Last Synced: 2024-04-17T21:18:56.744Z (7 months ago)
- Language: HCL
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform Modul instance
Terraform module to provide instance on
- [digitalocean](https://registry.terraform.io/providers/digitalocean/digitalocean/latest)
- [hetzner](https://registry.terraform.io/providers/hetznercloud/hcloud/latest)
- [vsphere](https://registry.terraform.io/providers/hashicorp/vsphere/latest)## Motivation
The motivation is to make switching between platforms as easy as possible.
## terraform
#### Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3 |
| [digitalocean](#requirement\_digitalocean) | ~> 2.22.2 |
| [hcloud](#requirement\_hcloud) | ~> 1.42 |
| [vsphere](#requirement\_vsphere) | ~> 2.4.2 |#### Providers
| Name | Version |
|------|---------|
| [digitalocean](#provider\_digitalocean) | ~> 2.22.2 |
| [hcloud](#provider\_hcloud) | ~> 1.42 |
| [http](#provider\_http) | n/a |
| [vsphere](#provider\_vsphere) | ~> 2.4.2 |#### Modules
No modules.
#### Resources
| Name | Type |
|------|------|
| [digitalocean_droplet.instance](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/droplet) | resource |
| [digitalocean_reserved_ip.instance](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/reserved_ip) | resource |
| [digitalocean_reserved_ip_assignment.instance](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/reserved_ip_assignment) | resource |
| [digitalocean_tag.instance](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/tag) | resource |
| [hcloud_primary_ip.instance](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/primary_ip) | resource |
| [hcloud_server.instance](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server) | resource |
| [hcloud_server.instance_with_primary_ip](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server) | resource |
| [vsphere_tag.instance](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/tag) | resource |
| [vsphere_virtual_machine.instance](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/virtual_machine) | resource |
| [http_http.digitalocean_images](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.digitalocean_regions](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.digitalocean_sizes](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.hetzner_datacenters](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.hetzner_images](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.hetzner_locations](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [http_http.hetzner_server_types](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
| [vsphere_compute_cluster.instance](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/compute_cluster) | data source |
| [vsphere_datacenter.instance](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/datacenter) | data source |
| [vsphere_datastore.instance](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/datastore) | data source |
| [vsphere_network.instance](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/network) | data source |
| [vsphere_tag_category.instance](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/tag_category) | data source |
| [vsphere_virtual_machine.instance](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/virtual_machine) | data source |#### Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [assign\_tags](#input\_assign\_tags) | the tags to assign to the instance | `list(any)` | `[]` | no |
| [cloud\_provider](#input\_cloud\_provider) | the cloud provider to deploy to | `string` | n/a | yes |
| [country](#input\_country) | the [ISO 3166 country code](https://www.iso.org/obp/ui/#search) (Alpha-2) where the instance should be created | `any` | `null` | no |
| [decoupled\_ip](#input\_decoupled\_ip) | if the instance should be created with a decoupled ip | `bool` | `false` | no |
| [digitalocean\_preferred\_country\_region\_slugs](#input\_digitalocean\_preferred\_country\_region\_slugs) | the region slug that should be preferred for the countries with more than one slug | `list(map(string))` |[| no |
{
"US": "nyc3"
}
]
| [digitalocean\_region\_slug\_pattern\_country\_code\_mapping](#input\_digitalocean\_region\_slug\_pattern\_country\_code\_mapping) | n/a | `list(map(string))` |[| no |
{
"ams3": "NL",
"blr1": "IN",
"fra1": "DE",
"lon1": "GB",
"nyc1": "US",
"nyc3": "US",
"sfo2": "US",
"sfo3": "US",
"sgp1": "SG",
"syd1": "AU",
"tor1": "CA"
}
]
| [digitalocean\_token](#input\_digitalocean\_token) | the Digital Ocean API token (used to query the server types) | `string` | `null` | no |
| [hetzner\_preferred\_country\_locations](#input\_hetzner\_preferred\_country\_locations) | the location that should be preferred for the countries with more than one location | `list(map(string))` |[| no |
{
"DE": "fsn1",
"US": "hil"
}
]
| [hetzner\_token](#input\_hetzner\_token) | the Hetzner Cloud API Token (used to query the server types) | `string` | `null` | no |
| [image](#input\_image) | the image the instance should be created from | `string` | n/a | yes |
| [instance](#input\_instance) | if the instance should be created | `bool` | `true` | no |
| [name](#input\_name) | the name of the instance | `string` | n/a | yes |
| [ssh\_keys](#input\_ssh\_keys) | the SSH key IDs or names which should be injected into the server at creation time | `list(string)` | `[]` | no |
| [tags](#input\_tags) | the tags to create and assign to the instance | `list(string)` | `[]` | no |
| [type](#input\_type) | the type of the instance (will be transformed matching the possiblities of the cloud\_provider) |object({| `null` | no |
vcpus : number,
ram : number,
disk : number,
})
| [user\_data](#input\_user\_data) | the cloud-Init user data to use during instance creation | `string` | `null` | no |
| [vsphere](#input\_vsphere) | the vsphere names of the datacenter, datastore, cluster and network and optional the name of tag\_category and disk and the folder |object({| `null` | no |
datacenter_name = string
datastore_name = string
cluster_name = string
network_name = string
folder = optional(string, "/")
disk_name = optional(string, "disk0")
tag_category_name = optional(string, null)
})#### Outputs
| Name | Description |
|------|-------------|
| [digitalocean\_droplet\_images](#output\_digitalocean\_droplet\_images) | the list of the digitalocean droplet images |
| [digitalocean\_droplet\_size](#output\_digitalocean\_droplet\_size) | the selected digitalocean droplet size |
| [digitalocean\_droplet\_sizes](#output\_digitalocean\_droplet\_sizes) | the list of the digitalocean droplet sizes |
| [digitalocean\_region\_slug](#output\_digitalocean\_region\_slug) | the name of the selected digitalocean region |
| [digitalocean\_regions](#output\_digitalocean\_regions) | the list of the digitalocean regions |
| [hetzner\_datacenter\_name](#output\_hetzner\_datacenter\_name) | the name of the selected hetzner datacenter |
| [hetzner\_datacenters](#output\_hetzner\_datacenters) | the list of the hetzner datacenters |
| [hetzner\_location\_name](#output\_hetzner\_location\_name) | the name of the selected hetzner location |
| [hetzner\_locations](#output\_hetzner\_locations) | the list of the hetzner locations |
| [hetzner\_server\_images](#output\_hetzner\_server\_images) | the list of the hetzner server images |
| [hetzner\_server\_type](#output\_hetzner\_server\_type) | the selected hetzner server type |
| [hetzner\_server\_types](#output\_hetzner\_server\_types) | the list of the hetzner server types |
| [instance](#output\_instance) | the instance resource |
| [instance\_decoupled\_ip\_address](#output\_instance\_decoupled\_ip\_address) | the decoupled ip address of the instance |
| [instance\_ip\_address](#output\_instance\_ip\_address) | the ip address of the instance |