Skip to content

Commit

Permalink
Rename repo (#6)
Browse files Browse the repository at this point in the history
* Update tf_vpc to use the latest tf_subnets 0.2.2

* Rename repos, fix `README.md`, fix `LICENSE`

* terraform fmt

* Delete duplicate `type` attribute
  • Loading branch information
drama17 authored and aknysh committed Sep 22, 2017
1 parent e1ad928 commit e548569
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 25 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*.tfstate.backup

# Module directory
.terraform/

.terraform
.idea
*.iml
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright 2017 Cloud Posse, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# tf-vpc
# terraform-aws-vpc

Terraform module that defines a VPC with public/private subnets across multiple AZs with Internet Gateways


## License

Apache 2 License. See [`LICENSE`](LICENSE) for full details.
20 changes: 5 additions & 15 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
# Define composite variables for resources
module "label" {
source = "git::https://github.com/cloudposse/tf_label.git?ref=tags/0.1.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
name = "${var.name}"
stage = "${var.stage}"
}

module "subnets" {
source = "git::https://github.com/cloudposse/tf_subnets.git?ref=tags/0.1.6"

source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.2.3"
availability_zones = "${var.availability_zones}"
namespace = "${var.namespace}"
name = "${var.name}"
stage = "${var.stage}"
region = "${var.region}"
vpc_id = "${aws_vpc.default.id}"
cidr_block = "${aws_vpc.default.cidr_block}"
igw_id = "${var.igw_id}"
}

resource "aws_vpc" "default" {
cidr_block = "${var.cidr_block}"
enable_dns_hostnames = true

tags {
Name = "${module.label.id}"
Namespace = "${var.namespace}"
Stage = "${var.stage}"
}
tags = "${module.label.tags}"
}

resource "aws_internet_gateway" "default" {
vpc_id = "${aws_vpc.default.id}"

tags {
Name = "${module.label.id}"
Namespace = "${var.namespace}"
Stage = "${var.stage}"
}
tags = "${module.label.tags}"
}
17 changes: 11 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
variable "namespace" {
default = ""
type = "string"
}

variable "stage" {
default = ""
type = "string"
}

variable "name" {
default = ""
type = "string"
}

variable "availability_zones" {
description = "Run the EC2 Instances in these Availability Zones"
description = "List of Availability Zones"
type = "list"
}

variable "cidr_block" {
description = "CIDR for the whole VPC"
type = "string"
description = "CIDR for the VPC"
default = "10.0.0.0/16"
}

variable "region" {
default = ""
type = "string"
}

variable "igw_id" {
type = "string"
}

0 comments on commit e548569

Please sign in to comment.