-
Notifications
You must be signed in to change notification settings - Fork 487
ability to supply vpc_id #9
ability to supply vpc_id #9
Conversation
:( Can someone help give me insight as to why the checks failed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Changes look good overall, just one question below.
The tests are failing because we just moved all our repos over into the hashicorp GitHub account just in time for the Module Registry to be announced and have not had time to hook the automated tests back up with CircleCI.
main.tf
Outdated
@@ -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 == "" ? "" : var.vpc_id}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you just set the id
param to var.vpc_id
without the if-statement? It seems like it would have no effect.
Also, does the aws_vpc
data source work correctly if you explicitly set id
to an empty string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brikis98, you're absolutely right about the id
param. (facepalm)
I believe the data source does work correctly. I ran terraform both explicitly specifying the vpc_id
in the module as well as omitting the parameter. In the former case the instances were associated with the specified vpc, and in the latter, the default vpc was used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Thanks! |
Get AMIs built in the HashiCorp Blueprints AWS account.
Add a module for installing and configuring dnsmasq
Adds the ability to optionally deploy the consul agents to a specified VPC. The default behavior is still maintained, in that if
vpc_id
is not supplied, the default VPC is used.