Skip to content

Commit d4b3fd2

Browse files
feat: update resource and readme.yaml (#43)
Co-authored-by: anmolnagpal <anmol@clouddrove.com>
1 parent a76d1c7 commit d4b3fd2

File tree

12 files changed

+170
-180
lines changed

12 files changed

+170
-180
lines changed

README.yaml

Lines changed: 35 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -39,43 +39,43 @@ include:
3939
# How to use this project
4040
usage: |-
4141
Here are some examples of how you can use this module in your inventory structure:
42-
### Private Subnet
42+
### PRIVATE SUBNET
4343
```hcl
4444
module "subnets" {
45-
source = "clouddrove/terraform-aws-subnet/aws"
46-
version = "1.3.0"
47-
name = "subnets"
48-
environment = "test"
49-
label_order = ["name", "environment"]
50-
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
51-
vpc_id = "vpc-xxxxxxxxx"
52-
type = "private"
53-
nat_gateway_enabled = true
54-
cidr_block = "10.0.0.0/16"
55-
ipv6_cidr_block = module.vpc.ipv6_cidr_block
56-
public_subnet_ids = ["subnet-XXXXXXXXXXXXX", "subnet-XXXXXXXXXXXXX"]
45+
source = "clouddrove/terraform-aws-subnet/aws"
46+
version = "1.3.0"
47+
name = "subnets"
48+
environment = "test"
49+
label_order = ["name", "environment"]
50+
nat_gateway_enabled = true
51+
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
52+
vpc_id = module.vpc.vpc_id
53+
type = "private"
54+
cidr_block = module.vpc.vpc_cidr_block
55+
ipv6_cidr_block = module.vpc.ipv6_cidr_block
56+
public_subnet_ids = ["subnet-xxxxxxxxxxxx", "subnet-xxxxxxxxxxxx"]
5757
}
5858
```
5959
60-
### Public-Private Subnet
60+
### PUBLIC-PRIVATE SUBNET
6161
```hcl
6262
module "subnets" {
6363
source = "clouddrove/terraform-aws-subnet/aws"
6464
version = "1.3.0"
6565
name = "subnets"
6666
environment = "test"
6767
label_order = ["name", "environment"]
68+
nat_gateway_enabled = true
6869
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
69-
vpc_id = "vpc-xxxxxxxxx"
70+
vpc_id = module.vpc.vpc_id
7071
type = "public-private"
71-
igw_id = "ig-xxxxxxxxx"
72-
nat_gateway_enabled = true
73-
cidr_block = "10.0.0.0/16"
72+
igw_id = module.vpc.igw_id
73+
cidr_block = module.vpc.vpc_cidr_block
7474
ipv6_cidr_block = module.vpc.ipv6_cidr_block
7575
}
7676
```
7777
78-
### Public-Private Subnet with single Nat Gateway
78+
### PUBLIC-PRIVATE SUBNET WITH SINGLE NET GATEWAY
7979
```hcl
8080
module "subnets" {
8181
source = "clouddrove/terraform-aws-subnet/aws"
@@ -84,47 +84,29 @@ usage: |-
8484
environment = "test"
8585
label_order = ["name", "environment"]
8686
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
87-
vpc_id = "vpc-xxxxxxxxx"
88-
type = "public-private"
89-
igw_id = "ig-xxxxxxxxx"
9087
nat_gateway_enabled = true
9188
single_nat_gateway = true
92-
cidr_block = "10.0.0.0/16"
89+
vpc_id = module.vpc.vpc_id
90+
type = "public-private"
91+
igw_id = module.vpc.igw_id
92+
cidr_block = module.vpc.vpc_cidr_block
9393
ipv6_cidr_block = module.vpc.ipv6_cidr_block
9494
}
9595
```
9696
97-
### Public Subnet
97+
### PUBLIC SUBNET
9898
```hcl
9999
module "subnets" {
100-
source = "clouddrove/terraform-aws-subnet/aws"
101-
version = "1.3.0"
102-
name = "subnets"
103-
environment = "test"
104-
label_order = ["name", "environment"]
105-
availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c"]
106-
vpc_id = "vpc-xxxxxxxxx"
107-
type = "public"
108-
igw_id = "ig-xxxxxxxxx"
109-
cidr_block = "10.0.0.0/16"
110-
ipv6_cidr_block = module.vpc.ipv6_cidr_block
111-
}
112-
```
113-
### Public-private-subnet-single-nat-gateway
114-
```hcl
115-
module "subnets" {
116-
source = "clouddrove/terraform-aws-subnet/aws"
117-
version = "1.3.0"
118-
nat_gateway_enabled = true
119-
single_nat_gateway = true
120-
name = "subnets"
121-
environment = "example"
122-
label_order = ["name", "environment"]
123-
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
124-
vpc_id = "vpc-xxxxxxxxxx"
125-
type = "public-private"
126-
igw_id = "ig-xxxxxxxxxxx"
127-
cidr_block = "10.0.0.0/16"
128-
ipv6_cidr_block = module.vpc.ipv6_cidr_block
100+
source = "clouddrove/terraform-aws-subnet/aws"
101+
version = "1.3.0"
102+
name = "subnets"
103+
environment = "test"
104+
label_order = ["name", "environment"]
105+
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
106+
vpc_id = module.vpc.vpc_id
107+
type = "public"
108+
igw_id = module.vpc.igw_id
109+
cidr_block = module.vpc.vpc_cidr_block
110+
ipv6_cidr_block = module.vpc.ipv6_cidr_block
129111
}
130112
```

_example/private-subnet/example.tf

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
####----------------------------------------------------------------------------------
2+
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
3+
####----------------------------------------------------------------------------------
14
provider "aws" {
25
region = "eu-west-1"
36
}
47

8+
####----------------------------------------------------------------------------------
9+
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
10+
####----------------------------------------------------------------------------------
511
module "vpc" {
612
source = "clouddrove/vpc/aws"
7-
version = "1.3.0"
13+
version = "1.3.1"
814

915
name = "vpc"
1016
environment = "test"
@@ -13,6 +19,9 @@ module "vpc" {
1319
cidr_block = "10.0.0.0/16"
1420
}
1521

22+
####----------------------------------------------------------------------------------
23+
## Subnet is a range of IP addresses in your VPC.
24+
####----------------------------------------------------------------------------------
1625
module "private-subnets" {
1726
source = "./../../"
1827

@@ -22,12 +31,11 @@ module "private-subnets" {
2231

2332
nat_gateway_enabled = true
2433

25-
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
26-
vpc_id = module.vpc.vpc_id
27-
type = "private"
28-
cidr_block = module.vpc.vpc_cidr_block
29-
ipv6_cidr_block = module.vpc.ipv6_cidr_block
30-
public_subnet_ids = ["subnet-xxxxxxxxxxxx", "subnet-xxxxxxxxxxxx"]
31-
assign_ipv6_address_on_creation = false
34+
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
35+
vpc_id = module.vpc.vpc_id
36+
type = "private"
37+
cidr_block = module.vpc.vpc_cidr_block
38+
ipv6_cidr_block = module.vpc.ipv6_cidr_block
39+
public_subnet_ids = ["subnet-xxxxxxxxxxxx", "subnet-xxxxxxxxxxxx"]
3240

3341
}
Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
####----------------------------------------------------------------------------------
2+
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
3+
####----------------------------------------------------------------------------------
14
provider "aws" {
25
region = "eu-west-1"
36
}
47

8+
####----------------------------------------------------------------------------------
9+
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
10+
####----------------------------------------------------------------------------------
511
module "vpc" {
612
source = "clouddrove/vpc/aws"
7-
version = "1.3.0"
13+
version = "1.3.1"
814

915
name = "vpc"
1016
environment = "example"
@@ -13,6 +19,9 @@ module "vpc" {
1319
cidr_block = "10.0.0.0/16"
1420
}
1521

22+
####----------------------------------------------------------------------------------
23+
## Subnet is a range of IP addresses in your VPC.
24+
####----------------------------------------------------------------------------------
1625
module "subnets" {
1726
source = "./../../"
1827

@@ -23,12 +32,10 @@ module "subnets" {
2332
environment = "example"
2433
label_order = ["name", "environment"]
2534

26-
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
27-
vpc_id = module.vpc.vpc_id
28-
type = "public-private"
29-
igw_id = module.vpc.igw_id
30-
cidr_block = module.vpc.vpc_cidr_block
31-
ipv6_cidr_block = module.vpc.ipv6_cidr_block
32-
assign_ipv6_address_on_creation = false
33-
35+
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
36+
vpc_id = module.vpc.vpc_id
37+
type = "public-private"
38+
igw_id = module.vpc.igw_id
39+
cidr_block = module.vpc.vpc_cidr_block
40+
ipv6_cidr_block = module.vpc.ipv6_cidr_block
3441
}

_example/public-private-subnet-single-nat-gateway/versions.tf

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
####----------------------------------------------------------------------------------
2+
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
3+
####----------------------------------------------------------------------------------
14
provider "aws" {
25
region = "eu-west-1"
36
}
47

8+
####----------------------------------------------------------------------------------
9+
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
10+
####----------------------------------------------------------------------------------
511
module "vpc" {
612
source = "clouddrove/vpc/aws"
7-
version = "1.3.0"
13+
version = "1.3.1"
814

915
name = "vpc"
1016
environment = "test"
@@ -13,6 +19,9 @@ module "vpc" {
1319
cidr_block = "10.0.0.0/16"
1420
}
1521

22+
####----------------------------------------------------------------------------------
23+
## Subnet is a range of IP addresses in your VPC.
24+
####----------------------------------------------------------------------------------
1625
module "subnets" {
1726
source = "./../../"
1827

@@ -22,12 +31,10 @@ module "subnets" {
2231

2332
nat_gateway_enabled = true
2433

25-
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
26-
vpc_id = module.vpc.vpc_id
27-
type = "public-private"
28-
igw_id = module.vpc.igw_id
29-
cidr_block = module.vpc.vpc_cidr_block
30-
ipv6_cidr_block = module.vpc.ipv6_cidr_block
31-
assign_ipv6_address_on_creation = false
32-
34+
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
35+
vpc_id = module.vpc.vpc_id
36+
type = "public-private"
37+
igw_id = module.vpc.igw_id
38+
cidr_block = module.vpc.vpc_cidr_block
39+
ipv6_cidr_block = module.vpc.ipv6_cidr_block
3340
}

_example/public-private-subnet/versions.tf

Lines changed: 0 additions & 11 deletions
This file was deleted.

_example/public-subnet/example.tf

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
####----------------------------------------------------------------------------------
2+
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
3+
####----------------------------------------------------------------------------------
14
provider "aws" {
2-
region = "us-east-1"
5+
region = "eu-west-1"
36
}
47

8+
####----------------------------------------------------------------------------------
9+
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
10+
####----------------------------------------------------------------------------------
511
module "vpc" {
612
source = "clouddrove/vpc/aws"
7-
version = "1.3.0"
13+
version = "1.3.1"
814

915
name = "vpc"
1016
environment = "test"
@@ -13,19 +19,21 @@ module "vpc" {
1319
cidr_block = "10.0.0.0/16"
1420
}
1521

22+
####----------------------------------------------------------------------------------
23+
## Subnet is a range of IP addresses in your VPC.
24+
####----------------------------------------------------------------------------------
1625
module "subnets" {
1726
source = "./../../"
1827

1928
name = "subnets"
2029
environment = "test"
2130
label_order = ["name", "environment"]
2231

23-
availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c"]
24-
vpc_id = module.vpc.vpc_id
25-
type = "public"
26-
igw_id = module.vpc.igw_id
27-
cidr_block = module.vpc.vpc_cidr_block
28-
ipv6_cidr_block = module.vpc.ipv6_cidr_block
29-
assign_ipv6_address_on_creation = false
32+
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
33+
vpc_id = module.vpc.vpc_id
34+
type = "public"
35+
igw_id = module.vpc.igw_id
36+
cidr_block = module.vpc.vpc_cidr_block
37+
ipv6_cidr_block = module.vpc.ipv6_cidr_block
3038

3139
}

_example/public-subnet/versions.tf

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)