Skip to content

Commit

Permalink
add new variable
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolnagpal committed Sep 4, 2020
1 parent 685d4ba commit 3296a53
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Here are some examples of how you can use this module in your inventory structur
### Private Subnet
```hcl
module "subnets" {
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.7"
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.8"
name = "subnets"
application = "clouddrove"
environment = "test"
Expand All @@ -90,7 +90,7 @@ Here are some examples of how you can use this module in your inventory structur
### Public-Private Subnet
```hcl
module "subnets" {
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.7"
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.8"
name = "subnets"
application = "clouddrove"
environment = "test"
Expand All @@ -108,7 +108,7 @@ Here are some examples of how you can use this module in your inventory structur
### Public Subnet
```hcl
module "subnets" {
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.7"
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.8"
name = "subnets"
application = "clouddrove"
environment = "test"
Expand Down Expand Up @@ -147,6 +147,7 @@ Here are some examples of how you can use this module in your inventory structur
| label\_order | Label order, e.g. `name`,`application`. | list | `<list>` | no |
| managedby | ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'. | string | `"anmol@clouddrove.com"` | no |
| map\_public\_ip\_on\_launch | Specify true to indicate that instances launched into the subnet should be assigned a public IP address. | bool | `"true"` | no |
| map\_public\_ip\_on\_launch | Specify true to indicate that instances launched into the subnet should be assigned a public IP address. | bool | `"false"` | no |
| max\_subnets | Maximum number of subnets that can be created. The variable is used for CIDR blocks calculation. | number | `"6"` | no |
| name | Name \(e.g. `app` or `cluster`\). | string | `""` | no |
| nat\_gateway\_enabled | Flag to enable/disable NAT Gateways creation in public subnets. | bool | `"false"` | no |
Expand Down
6 changes: 3 additions & 3 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ usage : |-
### Private Subnet
```hcl
module "subnets" {
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.7"
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.8"
name = "subnets"
application = "clouddrove"
environment = "test"
Expand All @@ -54,7 +54,7 @@ usage : |-
### Public-Private Subnet
```hcl
module "subnets" {
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.7"
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.8"
name = "subnets"
application = "clouddrove"
environment = "test"
Expand All @@ -72,7 +72,7 @@ usage : |-
### Public Subnet
```hcl
module "subnets" {
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.7"
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git?ref=tags/0.12.8"
name = "subnets"
application = "clouddrove"
environment = "test"
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource "aws_subnet" "public" {
8,
local.public_count + count.index
)

map_public_ip_on_launch = var.map_public_ip_on_launch
assign_ipv6_address_on_creation = false

tags = merge(
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,10 @@ variable "traffic_type" {
type = string
default = "ALL"
description = "Type of traffic to capture. Valid values: ACCEPT,REJECT, ALL."
}

variable "map_public_ip_on_launch" {
type = bool
default = false
description = "Specify true to indicate that instances launched into the subnet should be assigned a public IP address."
}

0 comments on commit 3296a53

Please sign in to comment.