Skip to content
This repository was archived by the owner on Jul 20, 2024. It is now read-only.

Commit 0aac098

Browse files
authored
Specify type to variables (#14)
1 parent 2d0f0e3 commit 0aac098

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ No requirements.
169169
| image\_id | AMI of the NAT instance. Default to the latest Amazon Linux 2 | `string` | `""` | no |
170170
| instance\_types | Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy | `list` | <pre>[<br> "t3.nano",<br> "t3a.nano"<br>]</pre> | no |
171171
| key\_name | Name of the key pair for the NAT instance. You can set this to assign the key pair to the NAT instance | `string` | `""` | no |
172-
| name | Name for all the resources as identifier | `any` | n/a | yes |
172+
| name | Name for all the resources as identifier | `string` | n/a | yes |
173173
| private\_route\_table\_ids | List of ID of the route tables for the private subnets. You can set this to assign the each default route to the NAT instance | `list` | `[]` | no |
174-
| private\_subnets\_cidr\_blocks | List of CIDR blocks of the private subnets. The NAT instance accepts connections from this subnets | `any` | n/a | yes |
175-
| public\_subnet | ID of the public subnet to place the NAT instance | `any` | n/a | yes |
174+
| private\_subnets\_cidr\_blocks | List of CIDR blocks of the private subnets. The NAT instance accepts connections from this subnets | `list` | n/a | yes |
175+
| public\_subnet | ID of the public subnet to place the NAT instance | `string` | n/a | yes |
176176
| tags | Tags applied to resources created with this module | `map` | `{}` | no |
177177
| use\_spot\_instance | Whether to use spot or on-demand EC2 instance | `bool` | `true` | no |
178-
| vpc\_id | ID of the VPC | `any` | n/a | yes |
178+
| vpc\_id | ID of the VPC | `string` | n/a | yes |
179179

180180
## Outputs
181181

variables.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,68 @@
11
variable "enabled" {
22
description = "Enable or not costly resources"
3+
type = bool
34
default = true
45
}
6+
57
variable "name" {
68
description = "Name for all the resources as identifier"
9+
type = string
710
}
811

912
variable "vpc_id" {
1013
description = "ID of the VPC"
14+
type = string
1115
}
1216

1317
variable "public_subnet" {
1418
description = "ID of the public subnet to place the NAT instance"
19+
type = string
1520
}
1621

1722
variable "private_subnets_cidr_blocks" {
1823
description = "List of CIDR blocks of the private subnets. The NAT instance accepts connections from this subnets"
24+
type = list
1925
}
2026

2127
variable "private_route_table_ids" {
2228
description = "List of ID of the route tables for the private subnets. You can set this to assign the each default route to the NAT instance"
29+
type = list
2330
default = []
2431
}
2532

2633
variable "extra_user_data" {
2734
description = "Extra script to run in the NAT instance"
35+
type = string
2836
default = ""
2937
}
3038

3139
variable "image_id" {
3240
description = "AMI of the NAT instance. Default to the latest Amazon Linux 2"
41+
type = string
3342
default = ""
3443
}
3544

3645
variable "instance_types" {
3746
description = "Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy"
47+
type = list
3848
default = ["t3.nano", "t3a.nano"]
3949
}
4050

4151
variable "use_spot_instance" {
4252
description = "Whether to use spot or on-demand EC2 instance"
53+
type = bool
4354
default = true
4455
}
4556

4657
variable "key_name" {
4758
description = "Name of the key pair for the NAT instance. You can set this to assign the key pair to the NAT instance"
59+
type = string
4860
default = ""
4961
}
5062

5163
variable "tags" {
5264
description = "Tags applied to resources created with this module"
65+
type = map
5366
default = {}
5467
}
5568

0 commit comments

Comments
 (0)