-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
89 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,50 @@ | ||
# networking-module | ||
# networking-module | ||
|
||
This module produces following resources: | ||
|
||
1. VPC | ||
2. Subnets in multiple AZs | ||
3. Internet Gateway | ||
4. Route Table, Route, Route Table Association | ||
|
||
Usage: | ||
``` | ||
module "networking_setup" { | ||
source = "../../module/" | ||
namespace = "${var.namespace}" | ||
stage = "${var.stage}" | ||
attributes = "${var.attributes}" | ||
name = "${var.name}" | ||
delimiter = "${var.delimiter}" | ||
cidr = "${var.cidr_block}" | ||
private_subnets = "${var.private_subnets}" | ||
public_subnets = "${var.public_subnets}" | ||
availability_zones = "${var.availability_zones}" | ||
} | ||
``` | ||
|
||
## INPUT VALUES | ||
|
||
| Input | Description | Type | Default | Required | | ||
| ------------------| -------------------------------------------------------------------------------| --------|---------|----------| | ||
| namespace | Namespace, which could be your organization name or abbreviation" |`string` | "" | yes | | ||
| stage | Stage, e.g. 'prod', 'staging', 'dev' |`string` | "" | yes | | ||
| name | Solution name, e.g. 'app' or 'jenkins' |`string` | "" | yes | | ||
| attributes | Additional attributes |`list` | <list> | no | | ||
| delimiter | Delimiter to be used between namespace, environment, stage, name and attributes|`string` | "-" | no | | ||
| public_subnets | List of public subnets (Value needs to be in CIDR Block range) |`list` | <list> | yes | | ||
| private_subnets | List of private subnets (Value needs to be in CIDR Block range) |`list` | <list> | yes | | ||
| availability_zones| List of availability zones |`list` | <list> | yes | | ||
| cidr | CIDR block for the VPC |`string` | "" | yes | | ||
|
||
## OUTPUT VALUE NAMES | ||
|
||
| Name | Description | | ||
| ------------------------| --------------------------------------------| | ||
| vpc_id | VPC ID | | ||
| vpc_cidr_block | VPC CIDR | | ||
| public_subnets | Comma-separated list of public subnet IDs. | | ||
| private_subnets | Comma-separated list of private subnet IDs. | | ||
| availability_zones | List of availability zones of the VPC. | | ||
| default_db_subnet_group | Default Subnet ID for Database | | ||
| public_rtb_id | Public route table ID. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// The VPC ID | ||
output "vpc_id" { | ||
value = "${module.networking_setup.vpc_id}" | ||
} | ||
|
||
// The VPC CIDR | ||
output "vpc_cidr_block" { | ||
value = "${module.networking_setup.vpc_cidr_block}" | ||
} | ||
|
||
// A comma-separated list of public subnet IDs | ||
output "public_subnets" { | ||
value = ["${module.networking_setup.public_subnets}"] | ||
} | ||
|
||
// A comma-separated list of private subnet IDs | ||
output "private_subnets" { | ||
value = ["${module.networking_setup.private_subnets}"] | ||
} | ||
|
||
// The list of availability zones of the VPC. | ||
output "availability_zones" { | ||
value = ["${module.networking_setup.availability_zones}"] | ||
} | ||
|
||
// Default Subnet ID for Database | ||
output "default_db_subnet_group" { | ||
value = "${module.networking_setup.default_db_subnet_group}" | ||
} | ||
|
||
// The public route table ID. | ||
output "public_rtb_id" { | ||
value = "${module.networking_setup.public_rtb_id}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters