Skip to content

Commit

Permalink
feat: update resource and readme.yaml (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: anmolnagpal <anmol@clouddrove.com>
  • Loading branch information
theprashantyadav and anmolnagpal authored Jun 6, 2023
1 parent a76d1c7 commit d4b3fd2
Show file tree
Hide file tree
Showing 12 changed files with 170 additions and 180 deletions.
88 changes: 35 additions & 53 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,43 +39,43 @@ include:
# How to use this project
usage: |-
Here are some examples of how you can use this module in your inventory structure:
### Private Subnet
### PRIVATE SUBNET
```hcl
module "subnets" {
source = "clouddrove/terraform-aws-subnet/aws"
version = "1.3.0"
name = "subnets"
environment = "test"
label_order = ["name", "environment"]
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = "vpc-xxxxxxxxx"
type = "private"
nat_gateway_enabled = true
cidr_block = "10.0.0.0/16"
ipv6_cidr_block = module.vpc.ipv6_cidr_block
public_subnet_ids = ["subnet-XXXXXXXXXXXXX", "subnet-XXXXXXXXXXXXX"]
source = "clouddrove/terraform-aws-subnet/aws"
version = "1.3.0"
name = "subnets"
environment = "test"
label_order = ["name", "environment"]
nat_gateway_enabled = true
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "private"
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
public_subnet_ids = ["subnet-xxxxxxxxxxxx", "subnet-xxxxxxxxxxxx"]
}
```
### Public-Private Subnet
### PUBLIC-PRIVATE SUBNET
```hcl
module "subnets" {
source = "clouddrove/terraform-aws-subnet/aws"
version = "1.3.0"
name = "subnets"
environment = "test"
label_order = ["name", "environment"]
nat_gateway_enabled = true
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = "vpc-xxxxxxxxx"
vpc_id = module.vpc.vpc_id
type = "public-private"
igw_id = "ig-xxxxxxxxx"
nat_gateway_enabled = true
cidr_block = "10.0.0.0/16"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
}
```
### Public-Private Subnet with single Nat Gateway
### PUBLIC-PRIVATE SUBNET WITH SINGLE NET GATEWAY
```hcl
module "subnets" {
source = "clouddrove/terraform-aws-subnet/aws"
Expand All @@ -84,47 +84,29 @@ usage: |-
environment = "test"
label_order = ["name", "environment"]
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = "vpc-xxxxxxxxx"
type = "public-private"
igw_id = "ig-xxxxxxxxx"
nat_gateway_enabled = true
single_nat_gateway = true
cidr_block = "10.0.0.0/16"
vpc_id = module.vpc.vpc_id
type = "public-private"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
}
```
### Public Subnet
### PUBLIC SUBNET
```hcl
module "subnets" {
source = "clouddrove/terraform-aws-subnet/aws"
version = "1.3.0"
name = "subnets"
environment = "test"
label_order = ["name", "environment"]
availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c"]
vpc_id = "vpc-xxxxxxxxx"
type = "public"
igw_id = "ig-xxxxxxxxx"
cidr_block = "10.0.0.0/16"
ipv6_cidr_block = module.vpc.ipv6_cidr_block
}
```
### Public-private-subnet-single-nat-gateway
```hcl
module "subnets" {
source = "clouddrove/terraform-aws-subnet/aws"
version = "1.3.0"
nat_gateway_enabled = true
single_nat_gateway = true
name = "subnets"
environment = "example"
label_order = ["name", "environment"]
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = "vpc-xxxxxxxxxx"
type = "public-private"
igw_id = "ig-xxxxxxxxxxx"
cidr_block = "10.0.0.0/16"
ipv6_cidr_block = module.vpc.ipv6_cidr_block
source = "clouddrove/terraform-aws-subnet/aws"
version = "1.3.0"
name = "subnets"
environment = "test"
label_order = ["name", "environment"]
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
}
```
24 changes: 16 additions & 8 deletions _example/private-subnet/example.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
####----------------------------------------------------------------------------------
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
####----------------------------------------------------------------------------------
provider "aws" {
region = "eu-west-1"
}

####----------------------------------------------------------------------------------
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
####----------------------------------------------------------------------------------
module "vpc" {
source = "clouddrove/vpc/aws"
version = "1.3.0"
version = "1.3.1"

name = "vpc"
environment = "test"
Expand All @@ -13,6 +19,9 @@ module "vpc" {
cidr_block = "10.0.0.0/16"
}

####----------------------------------------------------------------------------------
## Subnet is a range of IP addresses in your VPC.
####----------------------------------------------------------------------------------
module "private-subnets" {
source = "./../../"

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

nat_gateway_enabled = true

availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "private"
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
public_subnet_ids = ["subnet-xxxxxxxxxxxx", "subnet-xxxxxxxxxxxx"]
assign_ipv6_address_on_creation = false
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "private"
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
public_subnet_ids = ["subnet-xxxxxxxxxxxx", "subnet-xxxxxxxxxxxx"]

}
25 changes: 16 additions & 9 deletions _example/public-private-subnet-single-nat-gateway/example.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
####----------------------------------------------------------------------------------
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
####----------------------------------------------------------------------------------
provider "aws" {
region = "eu-west-1"
}

####----------------------------------------------------------------------------------
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
####----------------------------------------------------------------------------------
module "vpc" {
source = "clouddrove/vpc/aws"
version = "1.3.0"
version = "1.3.1"

name = "vpc"
environment = "example"
Expand All @@ -13,6 +19,9 @@ module "vpc" {
cidr_block = "10.0.0.0/16"
}

####----------------------------------------------------------------------------------
## Subnet is a range of IP addresses in your VPC.
####----------------------------------------------------------------------------------
module "subnets" {
source = "./../../"

Expand All @@ -23,12 +32,10 @@ module "subnets" {
environment = "example"
label_order = ["name", "environment"]

availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public-private"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
assign_ipv6_address_on_creation = false

availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public-private"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
}
11 changes: 0 additions & 11 deletions _example/public-private-subnet-single-nat-gateway/versions.tf

This file was deleted.

25 changes: 16 additions & 9 deletions _example/public-private-subnet/example.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
####----------------------------------------------------------------------------------
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
####----------------------------------------------------------------------------------
provider "aws" {
region = "eu-west-1"
}

####----------------------------------------------------------------------------------
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
####----------------------------------------------------------------------------------
module "vpc" {
source = "clouddrove/vpc/aws"
version = "1.3.0"
version = "1.3.1"

name = "vpc"
environment = "test"
Expand All @@ -13,6 +19,9 @@ module "vpc" {
cidr_block = "10.0.0.0/16"
}

####----------------------------------------------------------------------------------
## Subnet is a range of IP addresses in your VPC.
####----------------------------------------------------------------------------------
module "subnets" {
source = "./../../"

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

nat_gateway_enabled = true

availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public-private"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
assign_ipv6_address_on_creation = false

availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public-private"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
}
11 changes: 0 additions & 11 deletions _example/public-private-subnet/versions.tf

This file was deleted.

26 changes: 17 additions & 9 deletions _example/public-subnet/example.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
####----------------------------------------------------------------------------------
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
####----------------------------------------------------------------------------------
provider "aws" {
region = "us-east-1"
region = "eu-west-1"
}

####----------------------------------------------------------------------------------
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
####----------------------------------------------------------------------------------
module "vpc" {
source = "clouddrove/vpc/aws"
version = "1.3.0"
version = "1.3.1"

name = "vpc"
environment = "test"
Expand All @@ -13,19 +19,21 @@ module "vpc" {
cidr_block = "10.0.0.0/16"
}

####----------------------------------------------------------------------------------
## Subnet is a range of IP addresses in your VPC.
####----------------------------------------------------------------------------------
module "subnets" {
source = "./../../"

name = "subnets"
environment = "test"
label_order = ["name", "environment"]

availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c"]
vpc_id = module.vpc.vpc_id
type = "public"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
assign_ipv6_address_on_creation = false
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public"
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block

}
11 changes: 0 additions & 11 deletions _example/public-subnet/versions.tf

This file was deleted.

Loading

0 comments on commit d4b3fd2

Please sign in to comment.