Skip to content

Commit

Permalink
Examples folder restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
RaJiska committed Nov 5, 2023
1 parent c6f6269 commit a8e886a
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ docs:
@echo "Generating documentation..."
@docker run --rm --volume "$(shell pwd):/terraform-docs" -u $(shell id -u) quay.io/terraform-docs/terraform-docs:0.16.0 markdown /terraform-docs --header-from /docs/header.md > README.md

.PHONY: docs
docs-examples-full:
@echo "Generating documentation..."
@docker run --rm --volume "$(shell pwd)/examples/full:/terraform-docs" -u $(shell id -u) quay.io/terraform-docs/terraform-docs:0.16.0 markdown /terraform-docs --header-from /docs/header.md > $(shell pwd)/examples/full/README.md

.PHONY: docs docs-examples-full
55 changes: 55 additions & 0 deletions examples/full/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Full Example

This example creates infrastructure from scratch (VPC, subnets, igw) to work and test this Terraform module. In a real
scenario, you will most probably already have those resources and therefore should only have to focus on calling the
fck-nat module as done in the [main.tf](main.tf) example source file.

## Usage

To run this example you need to execute:
```
$ terraform init
$ terraform plan
$ terraform apply
```

## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_fck-nat"></a> [fck-nat](#module\_fck-nat) | ../ | n/a |

## Resources

| Name | Type |
|------|------|
| [aws_internet_gateway.gw](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway) | resource |
| [aws_route.public_igw](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route_table.private](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
| [aws_route_table.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
| [aws_route_table_association.private](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource |
| [aws_route_table_association.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource |
| [aws_subnet.private](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
| [aws_subnet.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
| [aws_vpc.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc) | resource |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs

No inputs.

## Outputs

No outputs.
14 changes: 14 additions & 0 deletions examples/full/docs/header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Full Example

This example creates infrastructure from scratch (VPC, subnets, igw) to work and test this Terraform module. In a real
scenario, you will most probably already have those resources and therefore should only have to focus on calling the
fck-nat module as done in the [main.tf](main.tf) example source file.

## Usage

To run this example you need to execute:
```
$ terraform init
$ terraform plan
$ terraform apply
```
2 changes: 1 addition & 1 deletion example/main.tf → examples/full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ locals {

data "aws_region" "current" {}

module "nat_instance" {
module "fck-nat" {
source = "../"

name = local.name
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit a8e886a

Please sign in to comment.