An open API service indexing awesome lists of open source software.

https://github.com/zoro16/terraform-hcloud-floating-ip

Terraform module to provision `Floating IP` resources in Hetzner Cloud.
https://github.com/zoro16/terraform-hcloud-floating-ip

hetzner hetzner-cloud hetzner-floating-ip terraform-hcloud-floating-ip terraform-module

Last synced: 9 months ago
JSON representation

Terraform module to provision `Floating IP` resources in Hetzner Cloud.

Awesome Lists containing this project

README

          

## Description

Terraform module to provision `Floating IP` resources in Hetzner Cloud.

## Usage

```hcl
# Configure the Hetzner Cloud Provider
provider "hcloud" {
token = var.hcloud_token
}

module "sv" {
source = "zoro16/server/hcloud"
version = "1.0.0"

create_server = true
}

module "floating" {
source = "../../"

create_floating_ip = true

floating_ip_name = "some-floating-ip"
floating_ip_type = "ipv4"
floating_ip_server_id = 0
floating_ip_home_location = "fsn1"
floating_ip_description = "some description"
floating_ip_labels = {
"name" : "cool-floating-ip"
}
floating_ip_delete_protection = false
}

module "floating_assignment" {
source = "../../"

create_floating_ip_assignment = true

floating_ip_assignment_floating_ip_id = module.floating.floating_ip_id
floating_ip_assignment_server_id = module.sv.server_id

}

```

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.2.0 |
| [hcloud](#requirement\_hcloud) | >= 1.42.1 |

## Providers

| Name | Version |
|------|---------|
| [hcloud](#provider\_hcloud) | >= 1.42.1 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [hcloud_floating_ip.floating](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/floating_ip) | resource |
| [hcloud_floating_ip_assignment.floating_assignment](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/floating_ip_assignment) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [create\_floating\_ip](#input\_create\_floating\_ip) | A boolean to check whether to create a Floating IP or not. | `bool` | `false` | no |
| [create\_floating\_ip\_assignment](#input\_create\_floating\_ip\_assignment) | A boolean to check whether to create a Floating IP Assignment or not. | `bool` | `false` | no |
| [floating\_ip\_assignment\_floating\_ip\_id](#input\_floating\_ip\_assignment\_floating\_ip\_id) | The ID of the Floating IP to be assigned. | `number` | `null` | no |
| [floating\_ip\_assignment\_server\_id](#input\_floating\_ip\_assignment\_server\_id) | The Server to assign the Floating IP to. | `number` | `null` | no |
| [floating\_ip\_delete\_protection](#input\_floating\_ip\_delete\_protection) | Enable or disable delete protection. | `bool` | `false` | no |
| [floating\_ip\_description](#input\_floating\_ip\_description) | Description of the Floating IP. | `string` | `""` | no |
| [floating\_ip\_home\_location](#input\_floating\_ip\_home\_location) | Name of home location (routing is optimized for that location). Optional if server\_id argument is passed. | `string` | `""` | no |
| [floating\_ip\_labels](#input\_floating\_ip\_labels) | User-defined labels (key-value pairs) should be created with. | `map(string)` | `{}` | no |
| [floating\_ip\_name](#input\_floating\_ip\_name) | Name of the Floating IP to be created. | `string` | `""` | no |
| [floating\_ip\_server\_id](#input\_floating\_ip\_server\_id) | Server to assign the Floating IP to. | `number` | `null` | no |
| [floating\_ip\_type](#input\_floating\_ip\_type) | Type of the Floating IP. `ipv4` or `ipv6` | `string` | `"ipv4"` | no |

## Outputs

| Name | Description |
|------|-------------|
| [floating\_ip\_assignment\_floating\_ip\_id](#output\_floating\_ip\_assignment\_floating\_ip\_id) | The ID of the Floating IP to be assigned. |
| [floating\_ip\_assignment\_id](#output\_floating\_ip\_assignment\_id) | Unique ID of the Floating IP Assginment. |
| [floating\_ip\_assignment\_server\_id](#output\_floating\_ip\_assignment\_server\_id) | The Server to assign the Floating IP to. |
| [floating\_ip\_delete\_protection](#output\_floating\_ip\_delete\_protection) | Enable or disable delete protection. |
| [floating\_ip\_description](#output\_floating\_ip\_description) | Description of the Floating IP. |
| [floating\_ip\_home\_location](#output\_floating\_ip\_home\_location) | Name of home location (routing is optimized for that location). Optional if server\_id argument is passed. |
| [floating\_ip\_id](#output\_floating\_ip\_id) | Unique ID of the Floating IP. |
| [floating\_ip\_ip\_address](#output\_floating\_ip\_ip\_address) | IP Address of the Floating IP. |
| [floating\_ip\_ip\_network](#output\_floating\_ip\_ip\_network) | IPv6 subnet. (Only set if type is ipv6) |
| [floating\_ip\_labels](#output\_floating\_ip\_labels) | User-defined labels (key-value pairs) should be created with. |
| [floating\_ip\_name](#output\_floating\_ip\_name) | Name of the Floating IP to be created. |
| [floating\_ip\_server\_id](#output\_floating\_ip\_server\_id) | Server to assign the Floating IP to. |
| [floating\_ip\_type](#output\_floating\_ip\_type) | Type of the Floating IP. `ipv4` or `ipv6` |