Skip to content

Commit

Permalink
refactor: docs examples (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
luismayta committed Mar 27, 2021
1 parent 1272286 commit aa763dd
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 132 deletions.
2 changes: 1 addition & 1 deletion docs/authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

## Leads

- Luis Mayta [\@slovacus](https://github.com/luismayta)
- Luis Mayta [@slovacus](https://github.com/luismayta)

## Contributors (chronological)
21 changes: 21 additions & 0 deletions docs/examples/common.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### common

```hcl
module "main" {
source = "hadenlabs/openvpn/aws"
version = "0.2.0"
providers = {
aws = aws
template = template
local = local
}
public_key = local.auth_public_key
private_key = local.auth_private_key
admin_user = "slovacus"
storage_path = "~/openvpn"
}
```
68 changes: 33 additions & 35 deletions docs/include/terraform.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
<!-- DO NOT EDIT. THIS FILE IS GENERATED BY THE MAKEFILE. -->

# Terraform variables

This document gives an overview of variables used in the platform of the terraform-aws-openvpn.

## Requirements

| Name | Version |
| --------- | ------- |
| Name | Version |
|------|---------|
| terraform | >= 0.13 |
| aws | >=3.2.0 |
| local | >=1.3.0 |
| null | >=0.1.0 |
| template | >=1.0.0 |
| aws | >=3.2.0 |
| local | >=1.3.0 |
| null | >=0.1.0 |
| template | >=1.0.0 |

## Providers

| Name | Version |
| -------- | ------- |
| aws | >=3.2.0 |
| null | >=0.1.0 |
| Name | Version |
|------|---------|
| aws | >=3.2.0 |
| null | >=0.1.0 |
| template | >=1.0.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ----------------- | -------------------------- | -------- | --------------- | :------: |
| private_key | private key | `string` | n/a | yes |
| public_key | public key | `string` | n/a | yes |
| admin_user | admin user | `string` | `"openvpn"` | no |
| https_cidr | https cidr | `string` | `"0.0.0.0/0"` | no |
| https_port | port https | `number` | `443` | no |
| instance_type | type instance | `string` | `"t2.micro"` | no |
| ssh_cidr | ssh cidr | `string` | `"0.0.0.0/0"` | no |
| ssh_port | port ssh | `number` | `22` | no |
| ssh_user | user ssh | `string` | `"ubuntu"` | no |
| storage_path | storage path keys to local | `string` | `"~/openvpn"` | no |
| subnet_cidr_block | subnet cidr block | `string` | `"10.0.0.0/16"` | no |
| tcp_cidr | tcp cidr | `string` | `"0.0.0.0/0"` | no |
| tcp_port | port tcp | `number` | `943` | no |
| udp_cidr | udp cidr | `string` | `"0.0.0.0/0"` | no |
| udp_port | udp tcp | `number` | `1194` | no |
| vpc_cidr_block | vpc cidr block | `string` | `"10.0.0.0/16"` | no |
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| private_key | private key | `string` | n/a | yes |
| public_key | public key | `string` | n/a | yes |
| admin_user | admin user | `string` | `"openvpn"` | no |
| https_cidr | https cidr | `string` | `"0.0.0.0/0"` | no |
| https_port | port https | `number` | `443` | no |
| instance_type | type instance | `string` | `"t2.micro"` | no |
| ssh_cidr | ssh cidr | `string` | `"0.0.0.0/0"` | no |
| ssh_port | port ssh | `number` | `22` | no |
| ssh_user | user ssh | `string` | `"ubuntu"` | no |
| storage_path | storage path keys to local | `string` | `"~/openvpn"` | no |
| subnet_cidr_block | subnet cidr block | `string` | `"10.0.0.0/16"` | no |
| tcp_cidr | tcp cidr | `string` | `"0.0.0.0/0"` | no |
| tcp_port | port tcp | `number` | `943` | no |
| udp_cidr | udp cidr | `string` | `"0.0.0.0/0"` | no |
| udp_port | udp tcp | `number` | `1194` | no |
| vpc_cidr_block | vpc cidr block | `string` | `"10.0.0.0/16"` | no |

## Outputs

| Name | Description |
| ----------- | ----------------------------------------- |
| instance | return instance openvpn |
| Name | Description |
|------|-------------|
| instance | return instance openvpn |
| instance_ip | return instance openvpn elastic ip public |
| private_key | return filepath privatekey |
| private_key | return filepath privatekey |

Empty file modified docs/index.md
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion mkdocs.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extra:

repo_name: 'hadenlabs/terraform-aws-openvpn'
repo_url: 'https://github.com/hadenlabs/terraform-aws-openvpn'
copyright: 'Copyright © 2020 <a href="https://hadenlabs.com">hadenlabs</a>'
copyright: 'Copyright © 2021 <a href="https://hadenlabs.com">hadenlabs</a>'

google_analytics:
- ''
Expand Down
86 changes: 0 additions & 86 deletions provision/generator/README.yaml

This file was deleted.

15 changes: 6 additions & 9 deletions provision/make/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@ docs:
docs.help:
@echo ' Docs:'
@echo ''
@echo ' docs.show Show mkdocs'
@echo ' docs.build build mkdocs'
@echo ' docs.terraform generated docs for terraform'
@echo ' docs.show Show grip readme'
@echo ' docs.build Show mkdocs'
@echo ' docs.serve server Make documentation'
@echo ''

docs.terraform:
$(call terraform-docs, ${TERRAFORM_README_FILE}, \
'This document gives an overview of variables used in the platform of the ${PROJECT}.', \
variables.tf)

docs.show:
$(PIPENV_RUN) mkdocs serve
$(PIPENV_RUN) grip

docs.build:
$(PIPENV_RUN) mkdocs build

docs.serve:
$(PIPENV_RUN) mkdocs serve

0 comments on commit aa763dd

Please sign in to comment.