Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation 0.5.2 #7

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ terraformStatePull.json
/tests/resources.auto.tfvars.template.cpgz
/tests/test.tf
/tests/old.py
/tests/tmp.txt
/tests/tmp.txt

# docs
docs/generation_log.txt
docs/.venv
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "docs/osc-api"]
path = docs/osc-api
url = https://github.com/outscale/osc-api
[submodule "docs/doc-terraform-template"]
path = docs/doc-terraform-template
url = https://gitlab.outscale.internal/documentation/doc-terraform-template.git
3 changes: 3 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ examples-test:
cd ../..; \
done\

doc:
@sh -c "'$(CURDIR)/scripts/generate-doc.sh'"

.PHONY: build test testacc fmt fmtcheck lint tools test-compile website website-lint website-test examples-test website-local
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,14 @@ Issues and contributions
------------------------

Check [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.


Building the documentation
------------------------
- Requirements:
- make
- python3
- python-venv
```shell
$ make doc
```
1 change: 1 addition & 0 deletions docs/doc-terraform-template
Submodule doc-terraform-template added at b2d4a7
655 changes: 655 additions & 0 deletions docs/generate_doc_terraform.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/osc-api
Submodule osc-api added at cb440c
4 changes: 4 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
prance
pyyaml
openapi-spec-validator
osc-openapi-framework
10 changes: 10 additions & 0 deletions docs/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import re

def camel_case_to_snake_case(value):
"""Convert from camel case to snake case."""
# re.sub works on non overlapping occurencies only.
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', value)
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()

def snake_case_to_camel_case(value):
return ''.join([x.title() for x in value.split('_') or []])
26 changes: 26 additions & 0 deletions scripts/generate-doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

project_dir=$(cd "$(dirname $0)" && pwd)
project_root=$(cd $project_dir/.. && pwd)
docs_dir="${project_root}/docs"
output_dir="${project_root}/"

python3 -m venv "${docs_dir}/.venv"
. "${docs_dir}/.venv/bin/activate"

pip3 install -r "${docs_dir}/requirements.txt" 1>"${docs_dir}/generation_log.txt" 2>&1 \
&& python3 "${docs_dir}/generate_doc_terraform.py" \
--provider_directory "${project_root}/outscale/" \
--api "${docs_dir}/osc-api/outscale.yaml" \
--output_directory "$output_dir" \
--template_directory "${docs_dir}/doc-terraform-template/" 1>"${docs_dir}/generation_log.txt" 2>&1
RES=$?
deactivate

if [ $RES -ne 0 ]; then
echo "KO, see logs in ${docs_dir}/generation_log.txt"
else
echo "OK"
fi

exit $RES
2 changes: 1 addition & 1 deletion website/docs/d/access_key.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_access_key Data Source

Provides information about a specific access key.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Access+Keys).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Access-Keys.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-accesskey).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/access_keys.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_access_keys Data Source

Provides information about access keys.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Access+Keys).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Access-Keys.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-accesskey).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/client_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_client_gateway Data Source

Provides information about a specific client gateway.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Customer+Gateways).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Customer-Gateways.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-clientgateway).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/client_gateways.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_client_gateways Data Source

Provides information about client gateways.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Customer+Gateways).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Customer-Gateways.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-clientgateway).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/dhcp_option.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_dhcp_option Data Source

Provides information about a specific DHCP option.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+DHCP+Options).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-DHCP-Options.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-dhcpoption).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/dhcp_options.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_dhcp_options Data Source

Provides information about DHCP options.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+DHCP+Options).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-DHCP-Options.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-dhcpoption).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/flexible_gpu.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_flexible_gpu Data Source

Provides information about a specific flexible GPU.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Flexible+GPUs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-flexiblegpu).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/flexible_gpu_catalog.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_flexible_gpu_catalog Data Source

Provides information about the flexible GPU catalog.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Flexible+GPUs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#readflexiblegpucatalog).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/flexible_gpus.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_flexible_gpus Data Source

Provides information about flexible GPUs.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Flexible+GPUs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-flexiblegpu).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/image.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_image Data Source

Provides information about a specific image.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+OMIs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-OMIs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-image).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/image_export_task.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_image_export_task Data Source

Provides information about a specific image export task.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+OMIs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-OMIs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-image).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/image_export_tasks.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_image_export_tasks Data Source

Provides information about image export tasks.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+OMIs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-OMIs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-image).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/images.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_images Data Source

Provides information about images.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+OMIs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-OMIs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-image).

## Example Usage
Expand Down
4 changes: 2 additions & 2 deletions website/docs/d/internet_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_internet_service Data Source

Provides information about a specific Internet service.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Internet+Gateways).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Internet-Gateways.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-internetservice).

## Example Usage
Expand Down Expand Up @@ -41,7 +41,7 @@ The following attributes are exported:

* `internet_service_id` - The ID of the Internet service.
* `net_id` - The ID of the Net attached to the Internet service.
* `state` - The state of the attachment of the Net to the Internet service (always `available`).
* `state` - The state of the attachment of the Internet service to the Net (always `available`).
* `tags` - One or more tags associated with the Internet service.
* `key` - The key of the tag, with a minimum of 1 character.
* `value` - The value of the tag, between 0 and 255 characters.
4 changes: 2 additions & 2 deletions website/docs/d/internet_services.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_internet_services Data Source

Provides information about Internet services.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Internet+Gateways).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Internet-Gateways.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-internetservice).

## Example Usage
Expand Down Expand Up @@ -42,7 +42,7 @@ The following attributes are exported:
* `internet_services` - Information about one or more Internet services.
* `internet_service_id` - The ID of the Internet service.
* `net_id` - The ID of the Net attached to the Internet service.
* `state` - The state of the attachment of the Net to the Internet service (always `available`).
* `state` - The state of the attachment of the Internet service to the Net (always `available`).
* `tags` - One or more tags associated with the Internet service.
* `key` - The key of the tag, with a minimum of 1 character.
* `value` - The value of the tag, between 0 and 255 characters.
2 changes: 1 addition & 1 deletion website/docs/d/keypair.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_keypair Data Source

Provides information about a specific keypair.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Keypairs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Keypairs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-keypair).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/keypairs.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_keypairs Data Source

Provides information about keypairs.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Keypairs).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Keypairs.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-keypair).

## Example Usage
Expand Down
6 changes: 3 additions & 3 deletions website/docs/d/load_balancer.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_load_balancer Data Source

Provides information about a specific load balancer.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Load+Balancers).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-loadbalancer).

## Example Usage
Expand All @@ -35,7 +35,7 @@ The following arguments are supported:
The following attributes are exported:

* `access_log` - Information about access logs.
* `is_enabled` - If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, the `osu_bucket_name` parameter is required.
* `is_enabled` - If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, the `OsuBucketName` parameter is required.
* `osu_bucket_name` - The name of the OOS bucket for the access logs.
* `osu_bucket_prefix` - The path to the folder of the access logs in your OOS bucket (by default, the `root` level of your bucket).
* `publication_interval` - The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either 5 or 60 (by default, 60).
Expand Down Expand Up @@ -63,7 +63,7 @@ The following attributes are exported:
* `load_balancer_sticky_cookie_policies` - The policies defined for the load balancer.
* `policy_name` - The name of the stickiness policy.
* `load_balancer_type` - The type of load balancer. Valid only for load balancers in a Net.<br />
If `LoadBalancerType` is `internet-facing`, the load balancer has a public DNS name that resolves to a public IP address.<br />
If `LoadBalancerType` is `internet-facing`, the load balancer has a public DNS name that resolves to a public IP.<br />
If `LoadBalancerType` is `internal`, the load balancer has a public DNS name that resolves to a private IP address.
* `net_id` - The ID of the Net for the load balancer.
* `security_groups` - One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/load_balancer_listener_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_load_balancer_listener_rule Data Source

Provides information about a specific load balancer listener rule.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Load+Balancers).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-listener).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/load_balancer_listener_rules.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_load_balancer_listener_rules Data Source

Provides information about load balancer listener rules.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Load+Balancers).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-listener).

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/load_balancer_vm_health.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_load_balancer_vm_health Data Source

Provides information about the health of one or more back-end VMs registered with a specific load balancer.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Load+Balancers).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#readvmshealth).

## Example Usage
Expand Down
6 changes: 3 additions & 3 deletions website/docs/d/load_balancers.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_load_balancers Data Source

Provides information about load balancers.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+Load+Balancers).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-loadbalancer).

## Example Usage
Expand All @@ -36,7 +36,7 @@ The following attributes are exported:

* `load_balancers` - Information about one or more load balancers.
* `access_log` - Information about access logs.
* `is_enabled` - If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, the `osu_bucket_name` parameter is required.
* `is_enabled` - If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, the `OsuBucketName` parameter is required.
* `osu_bucket_name` - The name of the OOS bucket for the access logs.
* `osu_bucket_prefix` - The path to the folder of the access logs in your OOS bucket (by default, the `root` level of your bucket).
* `publication_interval` - The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either 5 or 60 (by default, 60).
Expand Down Expand Up @@ -64,7 +64,7 @@ The following attributes are exported:
* `load_balancer_sticky_cookie_policies` - The policies defined for the load balancer.
* `policy_name` - The name of the stickiness policy.
* `load_balancer_type` - The type of load balancer. Valid only for load balancers in a Net.<br />
If `LoadBalancerType` is `internet-facing`, the load balancer has a public DNS name that resolves to a public IP address.<br />
If `LoadBalancerType` is `internet-facing`, the load balancer has a public DNS name that resolves to a public IP.<br />
If `LoadBalancerType` is `internal`, the load balancer has a public DNS name that resolves to a private IP address.
* `net_id` - The ID of the Net for the load balancer.
* `security_groups` - One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net.
Expand Down
8 changes: 4 additions & 4 deletions website/docs/d/nat_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# outscale_nat_service Data Source

Provides information about a specific NAT service.
For more information on this resource, see the [User Guide](https://wiki.outscale.net/display/EN/About+NAT+Gateways).
For more information on this resource, see the [User Guide](https://docs.outscale.com/en/userguide/About-NAT-Gateways.html).
For more information on this resource actions, see the [API documentation](https://docs.outscale.com/api#3ds-outscale-api-natservice).

## Example Usage
Expand Down Expand Up @@ -42,9 +42,9 @@ The following attributes are exported:

* `nat_service_id` - The ID of the NAT service.
* `net_id` - The ID of the Net in which the NAT service is.
* `public_ips` - Information about the External IP address or addresses (EIPs) associated with the NAT service.
* `public_ip` - The External IP address (EIP) associated with the NAT service.
* `public_ip_id` - The allocation ID of the EIP associated with the NAT service.
* `public_ips` - Information about the public IP or IPs associated with the NAT service.
* `public_ip` - The public IP associated with the NAT service.
* `public_ip_id` - The allocation ID of the public IP associated with the NAT service.
* `state` - The state of the NAT service (`pending` \| `available` \| `deleting` \| `deleted`).
* `subnet_id` - The ID of the Subnet in which the NAT service is.
* `tags` - One or more tags associated with the NAT service.
Expand Down
Loading