Compare commits

..

No commits in common. "b205422d561fb3f1e426891bd2d293eaabd92a6c" and "49dbd1243e96b921133faf8a09f1ecac5e9fd276" have entirely different histories.

63 changed files with 33 additions and 834 deletions

View File

@ -1,3 +0,0 @@
# Terraform Libvirt module
There are some libvirt terarform modules

11
build_docs.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
for i in $(ls -1 | grep -E "virt_|cloud_"); do
echo terraform-docs markdown "$i > $i/README.md"
terraform-docs markdown "$i" > "$i/README.md"
done

View File

@ -1,35 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_virt_namespace"></a> [virt\_namespace](#module\_virt\_namespace) | ../virt_namespace | n/a |
## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cloud"></a> [cloud](#input\_cloud) | Cloud informations | `any` | `{}` | no |
| <a name="input_deploy"></a> [deploy](#input\_deploy) | Deployment options | `any` | `{}` | no |
| <a name="input_stack"></a> [stack](#input\_stack) | Default stack | `any` | `{}` | no |
| <a name="input_stacks"></a> [stacks](#input\_stacks) | Deployments configuration | `any` | `[]` | no |
| <a name="input_tenant"></a> [tenant](#input\_tenant) | Tenant informations | `any` | `{}` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_namespace"></a> [namespace](#output\_namespace) | Output ===================== |
<!-- END_TF_DOCS -->

View File

@ -1,33 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| <a name="provider_ansible"></a> [ansible](#provider\_ansible) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [ansible_group.web](https://registry.terraform.io/providers/hashicorp/ansible/latest/docs/resources/group) | resource |
| [ansible_host.example](https://registry.terraform.io/providers/hashicorp/ansible/latest/docs/resources/host) | resource |
| [ansible_host.example2](https://registry.terraform.io/providers/hashicorp/ansible/latest/docs/resources/host) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_payload"></a> [payload](#input\_payload) | Instance description | `any` | `{}` | no |
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,31 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| <a name="provider_local"></a> [local](#provider\_local) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [local_file.ansible_inventory](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_payload"></a> [payload](#input\_payload) | Payload informations | `any` | `{}` | no |
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,33 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
| Name | Version |
|------|---------|
| <a name="requirement_ansible"></a> [ansible](#requirement\_ansible) | 1.0.4 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_ansible"></a> [ansible](#provider\_ansible) | 1.0.4 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [ansible_group.web](https://registry.terraform.io/providers/nbering/ansible/1.0.4/docs/resources/group) | resource |
| [ansible_host.example](https://registry.terraform.io/providers/nbering/ansible/1.0.4/docs/resources/host) | resource |
| [ansible_host.example2](https://registry.terraform.io/providers/nbering/ansible/1.0.4/docs/resources/host) | resource |
## Inputs
No inputs.
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,25 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
No modules.
## Resources
No resources.
## Inputs
No inputs.
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,25 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
No modules.
## Resources
No resources.
## Inputs
No inputs.
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,37 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
| Name | Version |
|------|---------|
| <a name="requirement_libvirt"></a> [libvirt](#requirement\_libvirt) | 0.6.14 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_libvirt"></a> [libvirt](#provider\_libvirt) | 0.6.14 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [libvirt_cloudinit_disk.volume_cloudinit](https://registry.terraform.io/providers/dmacvicar/libvirt/0.6.14/docs/resources/cloudinit_disk) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_name"></a> [name](#input\_name) | n/a | `string` | n/a | yes |
| <a name="input_pool"></a> [pool](#input\_pool) | n/a | `string` | `"default"` | no |
| <a name="input_userdata"></a> [userdata](#input\_userdata) | n/a | `string` | `""` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_volume"></a> [volume](#output\_volume) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,32 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
No modules.
## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_flavor"></a> [flavor](#input\_flavor) | The flavor to use | `string` | `"small"` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_cpu"></a> [cpu](#output\_cpu) | n/a |
| <a name="output_disk"></a> [disk](#output\_disk) | n/a |
| <a name="output_flavor"></a> [flavor](#output\_flavor) | n/a |
| <a name="output_ram"></a> [ram](#output\_ram) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,25 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
No modules.
## Resources
No resources.
## Inputs
No inputs.
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,33 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_volumes"></a> [volumes](#module\_volumes) | ../virt_volumes | n/a |
## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_images"></a> [images](#input\_images) | Images definitions | `any` | `{}` | no |
| <a name="input_images_defaults"></a> [images\_defaults](#input\_images\_defaults) | Images default definitions | `map` | <pre>{<br> "pool": "default"<br>}</pre> | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_images"></a> [images](#output\_images) | n/a |
| <a name="output_volumes"></a> [volumes](#output\_volumes) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,67 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
| Name | Version |
|------|---------|
| <a name="requirement_ansible"></a> [ansible](#requirement\_ansible) | ~>1.0.4 |
| <a name="requirement_libvirt"></a> [libvirt](#requirement\_libvirt) | 0.6.14 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_ansible"></a> [ansible](#provider\_ansible) | ~>1.0.4 |
| <a name="provider_libvirt"></a> [libvirt](#provider\_libvirt) | 0.6.14 |
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_system_flavor"></a> [system\_flavor](#module\_system\_flavor) | ../../modules/virt_flavor | n/a |
| <a name="module_system_os"></a> [system\_os](#module\_system\_os) | ../../modules/virt_os | n/a |
| <a name="module_volume_cloudinit"></a> [volume\_cloudinit](#module\_volume\_cloudinit) | ../virt_cloudinit | n/a |
| <a name="module_volume_os"></a> [volume\_os](#module\_volume\_os) | ../virt_volume | n/a |
| <a name="module_volumes_extra"></a> [volumes\_extra](#module\_volumes\_extra) | ../virt_volumes | n/a |
## Resources
| Name | Type |
|------|------|
| [ansible_host.ansible_def](https://registry.terraform.io/providers/nbering/ansible/latest/docs/resources/host) | resource |
| [libvirt_domain.instdef](https://registry.terraform.io/providers/dmacvicar/libvirt/0.6.14/docs/resources/domain) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_authorized_key"></a> [authorized\_key](#input\_authorized\_key) | Default user authorized key | `string` | `""` | no |
| <a name="input_disk_gb"></a> [disk\_gb](#input\_disk\_gb) | Size in gb of the root disk | `number` | `2` | no |
| <a name="input_disks"></a> [disks](#input\_disks) | Ephemeral disks list | `list` | `[]` | no |
| <a name="input_domain"></a> [domain](#input\_domain) | Instance domain | `string` | `""` | no |
| <a name="input_flavor"></a> [flavor](#input\_flavor) | Instance flavor | `string` | `"x-small"` | no |
| <a name="input_images_pool"></a> [images\_pool](#input\_images\_pool) | Default image pool | `string` | `"default"` | no |
| <a name="input_instance_pool"></a> [instance\_pool](#input\_instance\_pool) | Volume pool for instance disks | `string` | `"default"` | no |
| <a name="input_memory"></a> [memory](#input\_memory) | Instance memory | `string` | `"2048"` | no |
| <a name="input_metadata"></a> [metadata](#input\_metadata) | Metadata do add in state | `any` | `{}` | no |
| <a name="input_name"></a> [name](#input\_name) | Instance name | `string` | n/a | yes |
| <a name="input_name_fqdn"></a> [name\_fqdn](#input\_name\_fqdn) | Define instance name with fqdn | `bool` | `false` | no |
| <a name="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix) | Define instance name with project prefix | `bool` | `true` | no |
| <a name="input_networks"></a> [networks](#input\_networks) | Network list | `list` | `[]` | no |
| <a name="input_number"></a> [number](#input\_number) | Number of instances | `number` | `1` | no |
| <a name="input_password_hash"></a> [password\_hash](#input\_password\_hash) | Default user password hash (ie: $1$SaltSalt$GhE887kYCerthShgxern00) | `string` | `""` | no |
| <a name="input_prefix"></a> [prefix](#input\_prefix) | String to prefix each instances | `string` | `""` | no |
| <a name="input_user"></a> [user](#input\_user) | Default user login | `string` | `"cloud"` | no |
| <a name="input_vcpu"></a> [vcpu](#input\_vcpu) | Number of vcpu | `number` | `2` | no |
| <a name="input_volumes"></a> [volumes](#input\_volumes) | Persistant volume list | `list` | `[]` | no |
| <a name="input_wait_for_lease"></a> [wait\_for\_lease](#input\_wait\_for\_lease) | Wait for network ip assignment | `bool` | `false` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_instance"></a> [instance](#output\_instance) | n/a |
| <a name="output_system_flavor"></a> [system\_flavor](#output\_system\_flavor) | n/a |
| <a name="output_system_os"></a> [system\_os](#output\_system\_os) | Tag infos |
| <a name="output_volume_os"></a> [volume\_os](#output\_volume\_os) | output "volume\_cloudinit" { value = module.volume\_cloudinit } |
| <a name="output_volumes_extra"></a> [volumes\_extra](#output\_volumes\_extra) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,34 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_virt_instances"></a> [virt\_instances](#module\_virt\_instances) | ../../modules/virt_instance | n/a |
## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_instances"></a> [instances](#input\_instances) | Instances definitions | `any` | `[]` | no |
| <a name="input_instances_defaults"></a> [instances\_defaults](#input\_instances\_defaults) | Instances default definitions | `any` | `{}` | no |
| <a name="input_networks"></a> [networks](#input\_networks) | Known networks to find domain | `any` | `{}` | no |
| <a name="input_tenant"></a> [tenant](#input\_tenant) | Tenant informations | `any` | <pre>{<br> "prefix": ""<br>}</pre> | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_instances"></a> [instances](#output\_instances) | Outputs ===================== |
<!-- END_TF_DOCS -->

View File

@ -1,42 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_cloud_images"></a> [cloud\_images](#module\_cloud\_images) | ../virt_images | n/a |
| <a name="module_cloud_instances"></a> [cloud\_instances](#module\_cloud\_instances) | ../virt_instances | n/a |
| <a name="module_cloud_networks"></a> [cloud\_networks](#module\_cloud\_networks) | ../virt_networks | n/a |
| <a name="module_cloud_pools"></a> [cloud\_pools](#module\_cloud\_pools) | ../virt_pools | n/a |
| <a name="module_cloud_volumes"></a> [cloud\_volumes](#module\_cloud\_volumes) | ../virt_volumes | n/a |
## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cloud"></a> [cloud](#input\_cloud) | Cloud informations | `any` | `{}` | no |
| <a name="input_deploy"></a> [deploy](#input\_deploy) | Deployments configuration | `map` | `{}` | no |
| <a name="input_stack"></a> [stack](#input\_stack) | Deployment options | `any` | `{}` | no |
| <a name="input_tenant"></a> [tenant](#input\_tenant) | Tenant informations | `any` | `{}` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_cloud_images"></a> [cloud\_images](#output\_cloud\_images) | n/a |
| <a name="output_cloud_instances"></a> [cloud\_instances](#output\_cloud\_instances) | n/a |
| <a name="output_cloud_networks"></a> [cloud\_networks](#output\_cloud\_networks) | n/a |
| <a name="output_cloud_pools"></a> [cloud\_pools](#output\_cloud\_pools) | n/a |
| <a name="output_cloud_volumes"></a> [cloud\_volumes](#output\_cloud\_volumes) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,47 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
| Name | Version |
|------|---------|
| <a name="requirement_libvirt"></a> [libvirt](#requirement\_libvirt) | 0.6.14 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_libvirt"></a> [libvirt](#provider\_libvirt) | 0.6.14 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| libvirt_network.netdef | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_bridge"></a> [bridge](#input\_bridge) | Network interface name (16 char max, virbr\_) | `string` | n/a | yes |
| <a name="input_domain"></a> [domain](#input\_domain) | Network domain | `string` | `"local"` | no |
| <a name="input_gw4"></a> [gw4](#input\_gw4) | Network address | `string` | `"192.168.0.1"` | no |
| <a name="input_mask"></a> [mask](#input\_mask) | Netmask of the network | `number` | `24` | no |
| <a name="input_mode"></a> [mode](#input\_mode) | Network mode (route\|nat) | `string` | `"nat"` | no |
| <a name="input_name"></a> [name](#input\_name) | Network name | `string` | n/a | yes |
| <a name="input_nat_device"></a> [nat\_device](#input\_nat\_device) | Device to forward unrouted traffic (ie: eth0) | `string` | `"enp1s0"` | no |
| <a name="input_nat_driver"></a> [nat\_driver](#input\_nat\_driver) | Default NAT driver | `string` | `"ferm"` | no |
| <a name="input_nat_enable"></a> [nat\_enable](#input\_nat\_enable) | Enable NAT from outside of libvirt | `bool` | `false` | no |
| <a name="input_subnets"></a> [subnets](#input\_subnets) | List of subnets | `list` | `[]` | no |
| <a name="input_vip"></a> [vip](#input\_vip) | List of vips | `list` | `[]` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_networks"></a> [networks](#output\_networks) | n/a |
| <a name="output_subnets"></a> [subnets](#output\_subnets) | n/a |
| <a name="output_vips"></a> [vips](#output\_vips) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,25 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
No modules.
## Resources
No resources.
## Inputs
No inputs.
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,33 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_cloud_networks"></a> [cloud\_networks](#module\_cloud\_networks) | ../../modules/virt_network | n/a |
## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_networks"></a> [networks](#input\_networks) | Networks definitions | `any` | `{}` | no |
| <a name="input_networks_defaults"></a> [networks\_defaults](#input\_networks\_defaults) | Network default definitions | `any` | `{}` | no |
| <a name="input_tenant"></a> [tenant](#input\_tenant) | Tenant informations | `any` | <pre>{<br> "prefix": ""<br>}</pre> | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_networks"></a> [networks](#output\_networks) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,41 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
No modules.
## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_authorized_key"></a> [authorized\_key](#input\_authorized\_key) | n/a | `string` | `""` | no |
| <a name="input_cloud_init"></a> [cloud\_init](#input\_cloud\_init) | Override system cloud\_init | `string` | `""` | no |
| <a name="input_cloud_init_vars"></a> [cloud\_init\_vars](#input\_cloud\_init\_vars) | Override cloud init vars | `map` | `{}` | no |
| <a name="input_domain"></a> [domain](#input\_domain) | n/a | `string` | `"nodomain"` | no |
| <a name="input_hostname"></a> [hostname](#input\_hostname) | n/a | `string` | `"noname"` | no |
| <a name="input_os_name"></a> [os\_name](#input\_os\_name) | The name of the operating system to create | `string` | `"ubuntu"` | no |
| <a name="input_os_version"></a> [os\_version](#input\_os\_version) | The version of the operationg system to use | `string` | `"latest"` | no |
| <a name="input_password_hash"></a> [password\_hash](#input\_password\_hash) | n/a | `string` | `""` | no |
| <a name="input_user"></a> [user](#input\_user) | n/a | `string` | `"cloud"` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_cloud_init"></a> [cloud\_init](#output\_cloud\_init) | n/a |
| <a name="output_distro"></a> [distro](#output\_distro) | n/a |
| <a name="output_os"></a> [os](#output\_os) | n/a |
| <a name="output_template"></a> [template](#output\_template) | n/a |
| <a name="output_template_vars"></a> [template\_vars](#output\_template\_vars) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,25 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
No modules.
## Resources
No resources.
## Inputs
No inputs.
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,37 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
| Name | Version |
|------|---------|
| <a name="requirement_libvirt"></a> [libvirt](#requirement\_libvirt) | 0.6.14 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_libvirt"></a> [libvirt](#provider\_libvirt) | 0.6.14 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [libvirt_pool.pooldef](https://registry.terraform.io/providers/dmacvicar/libvirt/0.6.14/docs/resources/pool) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_pools"></a> [pools](#input\_pools) | Pools definitions | `any` | `{}` | no |
| <a name="input_pools_defaults"></a> [pools\_defaults](#input\_pools\_defaults) | Pools default definitions | `any` | `{}` | no |
| <a name="input_tenant"></a> [tenant](#input\_tenant) | Tenant informations | `any` | <pre>{<br> "prefix": ""<br>}</pre> | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_pools"></a> [pools](#output\_pools) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,50 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
| Name | Version |
|------|---------|
| <a name="requirement_libvirt"></a> [libvirt](#requirement\_libvirt) | 0.6.14 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_libvirt"></a> [libvirt](#provider\_libvirt) | 0.6.14 |
| <a name="provider_null"></a> [null](#provider\_null) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| libvirt_volume.voldef_ephemeral_baked | resource |
| libvirt_volume.voldef_ephemeral_created | resource |
| libvirt_volume.voldef_ephemeral_sourced | resource |
| [null_resource.voldef_persistant_created](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_base_file"></a> [base\_file](#input\_base\_file) | Name of the source image | `string` | `""` | no |
| <a name="input_base_pool"></a> [base\_pool](#input\_base\_pool) | Pool of the source image | `string` | `"default"` | no |
| <a name="input_file"></a> [file](#input\_file) | Determine the filename of the volume | `string` | `""` | no |
| <a name="input_format"></a> [format](#input\_format) | Determine the format of the image | `string` | `"qcow2"` | no |
| <a name="input_name"></a> [name](#input\_name) | Determine the name of the volume | `string` | n/a | yes |
| <a name="input_persistant"></a> [persistant](#input\_persistant) | Enable destroy protection on this volume | `bool` | `false` | no |
| <a name="input_pool"></a> [pool](#input\_pool) | Determine pool to create volume within | `string` | `"default"` | no |
| <a name="input_pool_dir"></a> [pool\_dir](#input\_pool\_dir) | Default path for all pools | `string` | `"/virt"` | no |
| <a name="input_size_gb"></a> [size\_gb](#input\_size\_gb) | Default size for the volume | `number` | `0` | no |
| <a name="input_ssh_conn"></a> [ssh\_conn](#input\_ssh\_conn) | Default settings for ssh connexion | `any` | <pre>{<br> "agent": true,<br> "host": "wks1.office.barbu-it.net",<br> "password": null,<br> "user": null<br>}</pre> | no |
| <a name="input_url"></a> [url](#input\_url) | Download url for volume | `string` | `""` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_info"></a> [info](#output\_info) | n/a |
| <a name="output_volume"></a> [volume](#output\_volume) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,33 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_cloud_volume"></a> [cloud\_volume](#module\_cloud\_volume) | ../virt_volume | n/a |
## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_tenant"></a> [tenant](#input\_tenant) | Tenant informations | `map` | <pre>{<br> "prefix": ""<br>}</pre> | no |
| <a name="input_volumes"></a> [volumes](#input\_volumes) | List of volumes | `list(any)` | `[]` | no |
| <a name="input_volumes_defaults"></a> [volumes\_defaults](#input\_volumes\_defaults) | Default settings for volumes | `map` | `{}` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_volumes"></a> [volumes](#output\_volumes) | n/a |
<!-- END_TF_DOCS -->

View File

@ -1,25 +0,0 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
No requirements.
## Providers
No providers.
## Modules
No modules.
## Resources
No resources.
## Inputs
No inputs.
## Outputs
No outputs.
<!-- END_TF_DOCS -->

View File

@ -1,63 +0,0 @@
#!/bin/bash
#
list_mods ()
{
for f in $(find modules/ -name '*.tf' ); do echo "${f%/*}"; done | sort | uniq
}
gen_mod_doc ()
{
local dir=$1
local mode=$2
local dest=${dir}/REFERENCE.md
terraform-docs --output-file "REFERENCE.md" ${mode//_/ } "$mod"
# terraform-docs ${mode//_/ } "$mod" > "$dest"
}
move_reference_in_doc_dir ()
{
local doc_dir='docs'
for file in $(find modules -name REFERENCE.md); do
new_name=${file#modules/}
new_name=${new_name%/REFERENCE.md}
new_name=${new_name//\//__}
final_name=$doc_dir/$new_name.md
final_dir=$(dirname "$final_name")
if [[ ! -d "$final_dir" ]] ; then
mkdir -p "$final_dir"
fi
mv "$file" "$final_name"
done
}
gen_docs ()
{
local modules=$(list_mods)
local fmt="yaml"
local fmt="pretty"
local fmt="markdown_document"
local fmt="markdown_table"
for mod in $modules; do
mod=${mod#./}
echo "INFO: Generate documentation for: $mod"
gen_mod_doc "$mod" "$fmt"
done
move_reference_in_doc_dir
echo "INFO: Done"
}
gen_docs

22
virt_volume/README.md Normal file
View File

@ -0,0 +1,22 @@
# Virt Volume
Create a single libvirt volume.
This module helps to create a single volume. As dmarcvicar/terraform-libvirt does not support persistant volumes, the persistant volume support is quite limited. The only case where persistants volumes are supported is in the case of new volume creation, which in turn become idempotent and will be never destroyed ever.
* Created:
* Desc: Created as new disk
* Ephemeral: True
* Persistant: True
* Backed:
* Desc: Backed image from source volume
* Ephemeral: True
* Persistant: False
* Sourced:
* Desc: Downloaded image from url
* Ephemeral: True
* Persistant: False
<!-- BEGIN_TF_DOCS -->
<!-- END_TF_DOCS -->