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

https://github.com/stuttgart-things/terraform-provider-clusterbook

Terraform provider for clusterbook IPAM
https://github.com/stuttgart-things/terraform-provider-clusterbook

Last synced: about 16 hours ago
JSON representation

Terraform provider for clusterbook IPAM

Awesome Lists containing this project

README

          

# stuttgart-things/terraform-provider-clusterbook

Terraform provider for clusterbook IPAM



sthings



Terraform provider for clusterbook IPAM



Release
Pages
Downloads


## PROVIDER CONFIGURATION

```hcl
provider "clusterbook" {
url = "https://clusterbook.example.com"
}
```

## RESOURCES

clusterbook_ip_assignment

Assigns an available IP from a network pool to a cluster.

```hcl
resource "clusterbook_ip_assignment" "ingress" {
network_key = "10.31.105"
cluster = "mycluster"
status = "ASSIGNED" # optional, default: ASSIGNED
create_dns = true # optional, default: false
}

output "assigned_ip" {
value = clusterbook_ip_assignment.ingress.ip_address
}
```

| Attribute | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `network_key` | string | yes | - | Network subnet prefix |
| `cluster` | string | yes | - | Cluster name |
| `status` | string | no | `ASSIGNED` | `ASSIGNED` or `PENDING` |
| `create_dns` | bool | no | `false` | Create PowerDNS A record |

**Computed**: `ip_address`, `id`

clusterbook_network

Creates a network IP pool.

```hcl
resource "clusterbook_network" "lab" {
network_key = "10.31.106"
ip_from = 1
ip_to = 50
}
```

| Attribute | Type | Required | Description |
|-----------|------|----------|-------------|
| `network_key` | string | yes | Network subnet prefix |
| `ip_from` | int | yes | Start of IP range (last octet) |
| `ip_to` | int | yes | End of IP range (last octet) |

**Computed**: `total`, `available`, `assigned`, `pending`

## DATA SOURCES

clusterbook_cluster

Query IP assignments for a cluster.

```hcl
data "clusterbook_cluster" "info" {
name = "mycluster"
}
```

clusterbook_networks

List all network pools.

```hcl
data "clusterbook_networks" "all" {}
```

## INSTALLATION

Download the binary for your platform from [Releases](https://github.com/stuttgart-things/terraform-provider-clusterbook/releases) and place it in:

```
~/.terraform.d/plugins/registry.terraform.io/stuttgart-things/clusterbook//_/
```

## DEVELOPMENT

```bash
go build -o terraform-provider-clusterbook .
```

## LICENSE

Licensed under the Apache License 2.0.