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 #32 from tamentis/master
Browse files Browse the repository at this point in the history
Make vpc_id an input parameter as well.
  • Loading branch information
brikis98 authored Aug 27, 2018
2 parents 651ee4e + 60401f2 commit fa6197c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,12 @@ 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" {
vpc_id = "${data.aws_vpc.default.id}"
}

data "aws_region" "current" {}
data "aws_region" "current" {}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,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 fa6197c

Please sign in to comment.