Skip to content

Commit dac08f5

Browse files
committed
docs(module): Added terraform-docs to the readme
1 parent b0a17bb commit dac08f5

File tree

2 files changed

+120
-1
lines changed

2 files changed

+120
-1
lines changed

.github/workflows/terraform-lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,21 @@ jobs:
3636
3737
- name: TFLint
3838
run: tflint
39+
40+
- name: Install terraform-docs
41+
run: |
42+
curl -sL https://github.com/terraform-docs/terraform-docs/releases/download/v0.18.0/terraform-docs-v0.18.0-linux-amd64.tar.gz -o terraform-docs.tar.gz
43+
mkdir -p /tmp/terraform-docs
44+
tar -xzf terraform-docs.tar.gz -C /tmp/terraform-docs
45+
chmod +x /tmp/terraform-docs/terraform-docs
46+
sudo mv /tmp/terraform-docs/terraform-docs /usr/local/bin/
47+
48+
- name: Generate Terraform Docs
49+
run: terraform-docs markdown table --output-file README.md .
50+
51+
- name: Check for Documentation Changes
52+
run: |
53+
if ! git diff --exit-code README.md; then
54+
echo "::error::README.md is out of date. Please run 'terraform-docs' to update the documentation."
55+
exit 1
56+
fi

README.md

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,105 @@ module "microk8s_cluster" {
4343
cluster_dns_zone = "k8s.example.com."
4444
cluster_name = "cluster"
4545
}
46-
```
46+
```
47+
48+
<!-- BEGIN_TF_DOCS -->
49+
## Requirements
50+
51+
| Name | Version |
52+
|------|---------|
53+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
54+
| <a name="requirement_macaddress"></a> [macaddress](#requirement\_macaddress) | >=0.3.0 |
55+
| <a name="requirement_null"></a> [null](#requirement\_null) | >=3.2.2 |
56+
| <a name="requirement_random"></a> [random](#requirement\_random) | >=3.6.2 |
57+
| <a name="requirement_sshcommand"></a> [sshcommand](#requirement\_sshcommand) | >=0.2.2 |
58+
| <a name="requirement_xenorchestra"></a> [xenorchestra](#requirement\_xenorchestra) | >=0.26.1 |
59+
60+
## Providers
61+
62+
| Name | Version |
63+
|------|---------|
64+
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.2 |
65+
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.2 |
66+
| <a name="provider_sshcommand"></a> [sshcommand](#provider\_sshcommand) | 0.2.2 |
67+
| <a name="provider_xenorchestra"></a> [xenorchestra](#provider\_xenorchestra) | 0.26.1 |
68+
69+
## Modules
70+
71+
No modules.
72+
73+
## Resources
74+
75+
| Name | Type |
76+
|------|------|
77+
| [null_resource.sleep_while_master_readies_up](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
78+
| [random_integer.master](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer) | resource |
79+
| [random_integer.node](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer) | resource |
80+
| [random_uuid.custom_token](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/uuid) | resource |
81+
| [sshcommand_command.get_kubeconfig](https://registry.terraform.io/providers/invidian/sshcommand/latest/docs/resources/command) | resource |
82+
| [xenorchestra_cloud_config.master](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/resources/cloud_config) | resource |
83+
| [xenorchestra_cloud_config.node](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/resources/cloud_config) | resource |
84+
| [xenorchestra_cloud_config.secondary](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/resources/cloud_config) | resource |
85+
| [xenorchestra_vm.master](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/resources/vm) | resource |
86+
| [xenorchestra_vm.node](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/resources/vm) | resource |
87+
| [xenorchestra_vm.secondary](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/resources/vm) | resource |
88+
| [xenorchestra_network.master](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/data-sources/network) | data source |
89+
| [xenorchestra_network.node](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/data-sources/network) | data source |
90+
| [xenorchestra_pool.xcp_ng_master](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/data-sources/pool) | data source |
91+
| [xenorchestra_pool.xcp_ng_node](https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/data-sources/pool) | data source |
92+
93+
## Inputs
94+
95+
| Name | Description | Type | Default | Required |
96+
|------|-------------|------|---------|:--------:|
97+
| <a name="input_cloud_network_config_template"></a> [cloud\_network\_config\_template](#input\_cloud\_network\_config\_template) | Template for cloud network config | `string` | `"network:\r\n version: 1\r\n config:\r\n - type: physical\r\n name: eth0\r\n subnets:\r\n - type: dhcp\r\n"` | no |
98+
| <a name="input_cluster_dns_zone"></a> [cluster\_dns\_zone](#input\_cluster\_dns\_zone) | DNS zone for the cluster | `string` | n/a | yes |
99+
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name used in the virtual machine names, not an actual Kubernetes settings | `string` | `"my-cluster"` | no |
100+
| <a name="input_dns_sub_zone"></a> [dns\_sub\_zone](#input\_dns\_sub\_zone) | DNS sub-zone | `string` | n/a | yes |
101+
| <a name="input_dns_zone"></a> [dns\_zone](#input\_dns\_zone) | DNS zone | `string` | n/a | yes |
102+
| <a name="input_install_k8s_image_swapper"></a> [install\_k8s\_image\_swapper](#input\_install\_k8s\_image\_swapper) | This will add the chart by default to use the k8s-image-swapper and save on imagePulls to Dockerhub, which are rate-limited | `bool` | `false` | no |
103+
| <a name="input_k8s_image_swapper_private_registy"></a> [k8s\_image\_swapper\_private\_registy](#input\_k8s\_image\_swapper\_private\_registy) | Point this to the FQDN of a private registry so the k8s-image-swapper can pull from there. Has no effect if `install_k8s_image_swapper` is unused | `string` | `""` | no |
104+
| <a name="input_master_count"></a> [master\_count](#input\_master\_count) | Number of master nodes to deploy | `number` | `3` | no |
105+
| <a name="input_master_cpu_count"></a> [master\_cpu\_count](#input\_master\_cpu\_count) | Number of CPUs for each master node | `number` | `2` | no |
106+
| <a name="input_master_memory_gb"></a> [master\_memory\_gb](#input\_master\_memory\_gb) | Memory in GB for each master node | `number` | `4` | no |
107+
| <a name="input_master_os_disk_size"></a> [master\_os\_disk\_size](#input\_master\_os\_disk\_size) | OS disk size in GB for each master node | `number` | `32` | no |
108+
| <a name="input_master_os_disk_xoa_sr_uuid"></a> [master\_os\_disk\_xoa\_sr\_uuid](#input\_master\_os\_disk\_xoa\_sr\_uuid) | Storage repository UUID for master node OS disks | `list(string)` | n/a | yes |
109+
| <a name="input_master_prefix"></a> [master\_prefix](#input\_master\_prefix) | Prefix for master node names | `string` | `"us20-k8s"` | no |
110+
| <a name="input_master_tags"></a> [master\_tags](#input\_master\_tags) | Tags to apply to master nodes | `list(string)` | <pre>[<br> "xcp-ng.org/arch:amd64",<br> "xcp-ng.org/os:ubuntu"<br>]</pre> | no |
111+
| <a name="input_master_xoa_network_name"></a> [master\_xoa\_network\_name](#input\_master\_xoa\_network\_name) | Network name for master nodes in Xen Orchestra (overrides `xoa_network_name`) | `string` | `null` | no |
112+
| <a name="input_master_xoa_pool_name"></a> [master\_xoa\_pool\_name](#input\_master\_xoa\_pool\_name) | Name of the Xen Orchestra pool for master nodes (overrides `xoa_pool_name` for masters) | `string` | `null` | no |
113+
| <a name="input_master_xoa_template_uuid"></a> [master\_xoa\_template\_uuid](#input\_master\_xoa\_template\_uuid) | Template UUID for master nodes in Xen Orchestra | `string` | n/a | yes |
114+
| <a name="input_microk8s_version"></a> [microk8s\_version](#input\_microk8s\_version) | The snap channel version to install, for example `1.29/stable`. Defaults to latest if not specified | `string` | `null` | no |
115+
| <a name="input_node_count"></a> [node\_count](#input\_node\_count) | Number of worker nodes to deploy | `number` | `0` | no |
116+
| <a name="input_node_cpu_count"></a> [node\_cpu\_count](#input\_node\_cpu\_count) | Number of CPUs for each worker node | `number` | `4` | no |
117+
| <a name="input_node_memory_gb"></a> [node\_memory\_gb](#input\_node\_memory\_gb) | Memory in GB for each worker node | `number` | `8` | no |
118+
| <a name="input_node_os_disk_size"></a> [node\_os\_disk\_size](#input\_node\_os\_disk\_size) | OS disk size in GB for each worker node | `number` | `32` | no |
119+
| <a name="input_node_os_disk_xoa_sr_uuid"></a> [node\_os\_disk\_xoa\_sr\_uuid](#input\_node\_os\_disk\_xoa\_sr\_uuid) | Storage repository UUID for worker node OS disks | `list(string)` | n/a | yes |
120+
| <a name="input_node_prefix"></a> [node\_prefix](#input\_node\_prefix) | Prefix for worker node names | `string` | `"us20-k8s"` | no |
121+
| <a name="input_node_tags"></a> [node\_tags](#input\_node\_tags) | Tags to apply to worker nodes | `list(string)` | <pre>[<br> "xcp-ng.org/arch:amd64",<br> "xcp-ng.org/os:ubuntu"<br>]</pre> | no |
122+
| <a name="input_node_xoa_network_name"></a> [node\_xoa\_network\_name](#input\_node\_xoa\_network\_name) | Network name for worker nodes in Xen Orchestra (overrides `xoa_network_name`) | `string` | `null` | no |
123+
| <a name="input_node_xoa_pool_name"></a> [node\_xoa\_pool\_name](#input\_node\_xoa\_pool\_name) | Name of the Xen Orchestra pool for worker nodes (overrides `xoa_pool_name` for nodes) | `string` | `null` | no |
124+
| <a name="input_node_xoa_template_uuid"></a> [node\_xoa\_template\_uuid](#input\_node\_xoa\_template\_uuid) | Template UUID for worker nodes in Xen Orchestra | `string` | n/a | yes |
125+
| <a name="input_private_ssh_key_path"></a> [private\_ssh\_key\_path](#input\_private\_ssh\_key\_path) | Private SSH key path for accessing the nodes | `string` | `"/root/.ssh/id_rsa"` | no |
126+
| <a name="input_public_ssh_key"></a> [public\_ssh\_key](#input\_public\_ssh\_key) | Public SSH key for accessing the nodes | `string` | n/a | yes |
127+
| <a name="input_start_delay"></a> [start\_delay](#input\_start\_delay) | The amount of time the cluster virtual machines will wait on XCP-NG host startup | `number` | `0` | no |
128+
| <a name="input_tags"></a> [tags](#input\_tags) | A list of key+value pairs to apply to the deployment | `list(string)` | `[]` | no |
129+
| <a name="input_xoa_api_url"></a> [xoa\_api\_url](#input\_xoa\_api\_url) | URL for Xen Orchestra API (can be set via XOA\_API\_URL environment variable) | `string` | n/a | yes |
130+
| <a name="input_xoa_ignore_ssl"></a> [xoa\_ignore\_ssl](#input\_xoa\_ignore\_ssl) | Ignore SSL verification for Xen Orchestra API (can be set via XOA\_IGNORE\_SSL environment variable) | `bool` | `null` | no |
131+
| <a name="input_xoa_network_name"></a> [xoa\_network\_name](#input\_xoa\_network\_name) | Default network for virtual machines as seen in Xen Orchestra | `string` | `null` | no |
132+
| <a name="input_xoa_password"></a> [xoa\_password](#input\_xoa\_password) | Password for Xen Orchestra API (can be set via XOA\_PASSWORD environment variable) | `string` | `null` | no |
133+
| <a name="input_xoa_pool_name"></a> [xoa\_pool\_name](#input\_xoa\_pool\_name) | Default name of the XCP-ng pool as seen in Xen Orchestra | `string` | `null` | no |
134+
| <a name="input_xoa_username"></a> [xoa\_username](#input\_xoa\_username) | Username for Xen Orchestra API (can be set via XOA\_USERNAME environment variable) | `string` | `null` | no |
135+
136+
## Outputs
137+
138+
| Name | Description |
139+
|------|-------------|
140+
| <a name="output_kubeconfig"></a> [kubeconfig](#output\_kubeconfig) | n/a |
141+
| <a name="output_master_hostnames"></a> [master\_hostnames](#output\_master\_hostnames) | n/a |
142+
| <a name="output_master_ips"></a> [master\_ips](#output\_master\_ips) | n/a |
143+
| <a name="output_node_hostnames"></a> [node\_hostnames](#output\_node\_hostnames) | n/a |
144+
| <a name="output_node_ips"></a> [node\_ips](#output\_node\_ips) | n/a |
145+
| <a name="output_primary_master_hostname"></a> [primary\_master\_hostname](#output\_primary\_master\_hostname) | n/a |
146+
| <a name="output_primary_master_ip"></a> [primary\_master\_ip](#output\_primary\_master\_ip) | n/a |
147+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)