Commit 7c927eb0 authored by Anton Babenko's avatar Anton Babenko

Added descriptions, applied fmt

parent cfb6efbd
# used for testing
.terraform
terraform.tfstate
*.tfstate*
terraform.tfvars
### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
# Compiled files
*.tfstate
*.tfstate.backup
# Module directory
.terraform/
### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
# swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags
VPC terraform module
===========
**NOTE: THIS IS A FORK, IGNORE THIS. I WILL DELETE THIS REPO SHORTLY.**
AWS VPC Terraform module
========================
Terraform module which creates VPC resources on AWS.
Usage
-----
```hcl
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
name = "my-vpc"
cidr = "10.0.0.0/16"
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
enable_nat_gateway = true
azs = ["us-west-2a", "us-west-2b", "us-west-2c"]
tags {
Terraform = "true"
Environment = "dev"
}
}
```
Authors
=======
Migrated from `terraform-community-modules/tf_aws_vpc`, where it was maintained by [these awesome contributors](https://github.com/terraform-community-modules/tf_aws_vpc/graphs/contributors).
Module managed by [Anton Babenko](https://github.com/antonbabenko).
License
=======
Apache 2 Licensed. See LICENSE for full details.
\ No newline at end of file
......@@ -112,7 +112,7 @@ resource "aws_vpc_endpoint" "ep" {
resource "aws_vpc_endpoint_route_table_association" "private_s3" {
count = "${var.enable_s3_endpoint ? length(var.private_subnets) : 0}"
vpc_endpoint_id = "${aws_vpc_endpoint.ep.id}"
route_table_id = "${element(aws_route_table.private.*.id, count.index)}"
route_table_id = "${element(aws_route_table.private.*.id, count.index)}"
}
resource "aws_vpc_endpoint_route_table_association" "public_s3" {
......
output "private_subnets" {
value = ["${aws_subnet.private.*.id}"]
desctiption = "List of IDs of private subnets"
value = ["${aws_subnet.private.*.id}"]
}
output "database_subnets" {
value = ["${aws_subnet.database.*.id}"]
output "public_subnets" {
description = "List of IDs of public subnets"
value = ["${aws_subnet.public.*.id}"]
}
output "database_subnet_group" {
value = "${aws_db_subnet_group.database.id}"
output "database_subnets" {
desctiption = "List of IDs of database subnets"
value = ["${aws_subnet.database.*.id}"]
}
output "public_subnets" {
value = ["${aws_subnet.public.*.id}"]
output "database_subnet_group" {
desctiption = "ID of database subnet group"
value = "${aws_db_subnet_group.database.id}"
}
output "elasticache_subnets" {
desctiption = "List of IDs of elasticache subnets"
value = ["${aws_subnet.elasticache.*.id}"]
}
output "elasticache_subnet_group" {
desctiption = "ID of elasticache subnet group"
value = "${aws_elasticache_subnet_group.elasticache.id}"
}
output "vpc_id" {
value = "${aws_vpc.mod.id}"
description = "The ID of the VPC"
value = "${aws_vpc.mod.id}"
}
output "vpc_cidr_block" {
desctiption = "The CIDR block of the VPC"
value = "${aws_vpc.mod.cidr_block}"
}
output "public_route_table_ids" {
value = ["${aws_route_table.public.*.id}"]
description = "List of IDs of public route tables"
value = ["${aws_route_table.public.*.id}"]
}
output "private_route_table_ids" {
value = ["${aws_route_table.private.*.id}"]
description = "List of IDs of private route tables"
value = ["${aws_route_table.private.*.id}"]
}
output "default_security_group_id" {
description = "The ID of the security group created by default on VPC creation"
value = "${aws_vpc.mod.default_security_group_id}"
}
output "nat_eips" {
value = ["${aws_eip.nateip.*.id}"]
description = "List of allocation ID of Elastic IPs created for AWS NAT Gateway"
value = ["${aws_eip.nateip.*.id}"]
}
output "nat_eips_public_ips" {
value = ["${aws_eip.nateip.*.public_ip}"]
description = "List of public Elastic IPs created for AWS NAT Gateway"
value = ["${aws_eip.nateip.*.public_ip}"]
}
output "natgw_ids" {
value = ["${aws_nat_gateway.natgw.*.id}"]
description = "List of NAT Gateway IDs"
value = ["${aws_nat_gateway.natgw.*.id}"]
}
output "igw_id" {
value = "${aws_internet_gateway.mod.id}"
description = "The ID of the Internet Gateway"
value = "${aws_internet_gateway.mod.id}"
}
......@@ -14,12 +14,12 @@ variable "instance_tenancy" {
}
variable "public_subnets" {
description = "A list of public subnets inside the VPC."
description = "A list of public subnets inside the VPC"
default = []
}
variable "private_subnets" {
description = "A list of private subnets inside the VPC."
description = "A list of private subnets inside the VPC"
default = []
}
......@@ -64,18 +64,19 @@ variable "enable_s3_endpoint" {
description = "should be true if you want to provision an S3 endpoint to the VPC"
default = false
}
variable "map_public_ip_on_launch" {
description = "should be false if you do not want to auto-assign public IP on launch"
default = true
}
variable "private_propagating_vgws" {
description = "A list of VGWs the private route table should propagate."
description = "A list of VGWs the private route table should propagate"
default = []
}
variable "public_propagating_vgws" {
description = "A list of VGWs the public route table should propagate."
description = "A list of VGWs the public route table should propagate"
default = []
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment