Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from andrewmeissner/feature/optional-vpc-id
Browse files Browse the repository at this point in the history
ability to supply vpc_id
  • Loading branch information
brikis98 authored Sep 25, 2017
2 parents 6ad0eb5 + 26a65d3 commit eb04a46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ data "template_file" "user_data_client" {
# ---------------------------------------------------------------------------------------------------------------------

data "aws_vpc" "default" {
default = true
default = "${var.vpc_id == "" ? true : false}"
id = "${var.vpc_id}"
}

data "aws_subnet_ids" "default" {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ variable "ssh_key_name" {
description = "The name of an EC2 Key Pair that can be used to SSH to the EC2 Instances in this cluster. Set to an empty string to not associate a Key Pair."
default = ""
}

variable "vpc_id" {
description = "The ID of the VPC in which the nodes will be deployed. Uses default VPC if not supplied."
default = ""
}

0 comments on commit eb04a46

Please sign in to comment.