https://github.com/upmaru/terraform-digitalocean-instellar
Terraform module for bootstrapping LXD cluster for using with https://opsmaru.com
https://github.com/upmaru/terraform-digitalocean-instellar
infrastructure infrastructure-as-code lxd terraform
Last synced: about 2 months ago
JSON representation
Terraform module for bootstrapping LXD cluster for using with https://opsmaru.com
- Host: GitHub
- URL: https://github.com/upmaru/terraform-digitalocean-instellar
- Owner: upmaru
- Created: 2019-12-08T04:31:56.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2025-02-06T07:25:50.000Z (3 months ago)
- Last Synced: 2025-02-06T08:29:58.249Z (3 months ago)
- Topics: infrastructure, infrastructure-as-code, lxd, terraform
- Language: HCL
- Homepage: https://registry.terraform.io/modules/upmaru/instellar/digitalocean/latest
- Size: 7.86 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Terraform DigitalOcean module for Instellar
This module automatically forms LXD cluster on DigitalOcean. This terraform module will do the following:
- [x] Setup networking
- [x] Setup bastion node
- [x] Setup compute instances
- [x] Setup Private Key access
- [x] Automatically form a cluster
- [x] Destroy a cluster
- [x] Enable removal of specific nodes gracefully
- [x] Protect against `database-leader` deletionThese functionality come together to enable the user to fully manage LXD cluster using IaC (infrastructure as code)
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0.0 |
| [digitalocean](#requirement\_digitalocean) | ~> 2.31 |
| [tls](#requirement\_tls) | 4.0.4 |## Providers
| Name | Version |
|------|---------|
| [digitalocean](#provider\_digitalocean) | 2.28.1 |
| [ssh](#provider\_ssh) | 2.6.0 |
| [terraform](#provider\_terraform) | n/a |
| [tls](#provider\_tls) | 4.0.4 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [digitalocean_droplet.bastion](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/droplet) | resource |
| [digitalocean_droplet.bootstrap_node](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/droplet) | resource |
| [digitalocean_droplet.nodes](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/droplet) | resource |
| [digitalocean_firewall.bastion_firewall](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/firewall) | resource |
| [digitalocean_firewall.nodes_firewall](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/firewall) | resource |
| [digitalocean_project.project](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/project) | resource |
| [digitalocean_ssh_key.bastion](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/ssh_key) | resource |
| [digitalocean_ssh_key.terraform_cloud](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/ssh_key) | resource |
| [digitalocean_tag.db_access](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/tag) | resource |
| [digitalocean_tag.instellar_bastion](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/tag) | resource |
| [digitalocean_tag.instellar_node](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/tag) | resource |
| [ssh_resource.cluster_join_token](https://registry.terraform.io/providers/loafoe/ssh/latest/docs/resources/resource) | resource |
| [ssh_resource.node_detail](https://registry.terraform.io/providers/loafoe/ssh/latest/docs/resources/resource) | resource |
| [ssh_resource.trust_token](https://registry.terraform.io/providers/loafoe/ssh/latest/docs/resources/resource) | resource |
| [terraform_data.reboot](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/resources/data) | resource |
| [terraform_data.removal](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/resources/data) | resource |
| [tls_private_key.bastion_key](https://registry.terraform.io/providers/hashicorp/tls/4.0.4/docs/resources/private_key) | resource |
| [tls_private_key.terraform_cloud](https://registry.terraform.io/providers/hashicorp/tls/4.0.4/docs/resources/private_key) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [bastion\_size](#input\_bastion\_size) | Size of the bastion instance defaults to Basic 512MB instance https://slugs.do-api.dev/ | `string` | `"s-1vcpu-512mb-10gb"` | no |
| [cluster\_topology](#input\_cluster\_topology) | How many nodes do you want in your cluster? |list(object({| `[]` | no |
id = number
name = string
size = optional(string, "s-1vcpu-1gb")
}))
| [environment](#input\_environment) | Environment for project in Digital Ocean possible values are Development, Staging, Production | `string` | `"Production"` | no |
| [identifier](#input\_identifier) | Name for your cluster | `any` | n/a | yes |
| [image](#input\_image) | Image type of choice default is ubuntu 22.04 x86 | `string` | `"ubuntu-22-04-x64"` | no |
| [node\_size](#input\_node\_size) | Size of instances you want to use defaults to Basic 1GB instances https://slugs.do-api.dev/ | `string` | `"s-2vcpu-4gb-amd"` | no |
| [protect\_leader](#input\_protect\_leader) | Protect database leader node | `bool` | `true` | no |
| [region](#input\_region) | Region for your cluster | `string` | `"sgp1"` | no |
| [ssh\_keys](#input\_ssh\_keys) | List of ssh keys fingerprint | `list(string)` | `[]` | no |
| [storage\_size](#input\_storage\_size) | Storage size to use with cluster | `any` | n/a | yes |
| [vpc\_id](#input\_vpc\_id) | vpc id to pass in from the network module | `string` | n/a | yes |
| [vpc\_ip\_range](#input\_vpc\_ip\_range) | The IP range to use for VPC | `string` | `"10.0.1.0/24"` | no |## Outputs
| Name | Description |
|------|-------------|
| [bootstrap\_node](#output\_bootstrap\_node) | n/a |
| [cluster\_address](#output\_cluster\_address) | n/a |
| [db\_access\_tag\_id](#output\_db\_access\_tag\_id) | n/a |
| [identifier](#output\_identifier) | n/a |
| [nodes](#output\_nodes) | n/a |
| [project\_id](#output\_project\_id) | n/a |
| [region](#output\_region) | n/a |
| [trust\_token](#output\_trust\_token) | n/a |