docs(fix variables): tags are not required
continuous-integration/drone/push Build is failing Details

main
flavien 2022-09-21 14:55:37 +02:00
parent f0e59dcb59
commit c4462adebf
3 changed files with 24 additions and 20 deletions

View File

@ -1,7 +1,10 @@
# aws_network_terraform
Terraform module to provision a vpc with public and private subnets for each AZ.
Provision a internet gateway for public subnets and a NAT gateway for private subnets.
Terraform module to provision a vpc with public and private subnets for each AZ.
Provision a internet gateway for public subnets and a NAT gateway for private subnets.
Subnets are tagged with key "Tier" and value "public" or "private".
To launch instances use: [aws_servers_module](https://coincoingit.fr/flavien/aws_servers_terraform)
<!-- BEGIN_TF_DOCS -->
## Requirements
@ -37,18 +40,18 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_env"></a> [env](#input\_env) | environment of the deployment | `string` | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | general tags to apply to all the resources | `map(string)` | n/a | yes |
| <a name="input_vpc_cidr"></a> [vpc\_cidr](#input\_vpc\_cidr) | cidr block of the VPC | `string` | `"10.0.0.0/16"` | no |
| <a name="input_env"></a> [env](#input\_env) | Environment of the deployment | `string` | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | General tags to apply to all the resources | `map(string)` | `{}` | no |
| <a name="input_vpc_cidr"></a> [vpc\_cidr](#input\_vpc\_cidr) | Cidr block of the VPC | `string` | `"10.0.0.0/16"` | no |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_private_subnets_cidrs"></a> [private\_subnets\_cidrs](#output\_private\_subnets\_cidrs) | cidr block of the created private subnets |
| <a name="output_private_subnets_ids"></a> [private\_subnets\_ids](#output\_private\_subnets\_ids) | ids of the created private subnets |
| <a name="output_public_subnets_cidrs"></a> [public\_subnets\_cidrs](#output\_public\_subnets\_cidrs) | cidr blocks of the created public subnets |
| <a name="output_public_subnets_ids"></a> [public\_subnets\_ids](#output\_public\_subnets\_ids) | ids of the created public subnets |
| <a name="output_vpc_cidr"></a> [vpc\_cidr](#output\_vpc\_cidr) | cidr blocks of the created VPC |
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | id of the created VPC |
| <a name="output_private_subnets_cidrs"></a> [private\_subnets\_cidrs](#output\_private\_subnets\_cidrs) | Cidr block of the created private subnets |
| <a name="output_private_subnets_ids"></a> [private\_subnets\_ids](#output\_private\_subnets\_ids) | Ids of the created private subnets |
| <a name="output_public_subnets_cidrs"></a> [public\_subnets\_cidrs](#output\_public\_subnets\_cidrs) | Cidr blocks of the created public subnets |
| <a name="output_public_subnets_ids"></a> [public\_subnets\_ids](#output\_public\_subnets\_ids) | Ids of the created public subnets |
| <a name="output_vpc_cidr"></a> [vpc\_cidr](#output\_vpc\_cidr) | Cidr blocks of the created VPC |
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | Id of the created VPC |
<!-- END_TF_DOCS -->

View File

@ -1,29 +1,29 @@
output "vpc_id" {
value = aws_vpc.main.id
description = "id of the created VPC"
description = "Id of the created VPC"
}
output "vpc_cidr" {
value = aws_vpc.main.cidr_block
description = "cidr blocks of the created VPC"
description = "Cidr blocks of the created VPC"
}
output "public_subnets_ids" {
value = aws_subnet.public_subnets[*].id
description = "ids of the created public subnets"
description = "Ids of the created public subnets"
}
output "public_subnets_cidrs" {
value = aws_subnet.public_subnets[*].cidr_block
description = "cidr blocks of the created public subnets"
description = "Cidr blocks of the created public subnets"
}
output "private_subnets_ids" {
value = aws_subnet.private_subnets[*].id
description = "ids of the created private subnets"
description = "Ids of the created private subnets"
}
output "private_subnets_cidrs" {
value = aws_subnet.private_subnets[*].cidr_block
description = "cidr block of the created private subnets"
description = "Cidr block of the created private subnets"
}

View File

@ -1,15 +1,16 @@
variable "env" {
type = string
description = "environment of the deployment"
description = "Environment of the deployment"
}
variable "vpc_cidr" {
type = string
default = "10.0.0.0/16"
description = "cidr block of the VPC"
description = "Cidr block of the VPC"
}
variable "tags" {
description = "general tags to apply to all the resources"
type = map(string)
default = {}
description = "General tags to apply to all the resources"
}