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 #48 from patoarvizu/namespace-autoscaling-group
Browse files Browse the repository at this point in the history
Use variable cluster_name as a name prefix for the autoscaling group
  • Loading branch information
brikis98 authored Mar 19, 2018
2 parents 5723368 + 721d169 commit 45a3e5b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/vault-cluster-private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module "vault_cluster" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_iam_policies_servers" {
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-iam-policies?ref=v0.1.0"
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-iam-policies?ref=v0.2.0"

iam_role_id = "${module.vault_cluster.iam_role_id}"
}
Expand All @@ -73,7 +73,7 @@ data "template_file" "user_data_vault_cluster" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_cluster" {
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-cluster?ref=v0.1.0"
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-cluster?ref=v0.2.0"

cluster_name = "${var.consul_cluster_name}"
cluster_size = "${var.consul_cluster_size}"
Expand Down
4 changes: 2 additions & 2 deletions examples/vault-s3-backend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module "vault_cluster" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_iam_policies_servers" {
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-iam-policies?ref=v0.1.0"
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-iam-policies?ref=v0.2.0"

iam_role_id = "${module.vault_cluster.iam_role_id}"
}
Expand All @@ -78,7 +78,7 @@ data "template_file" "user_data_vault_cluster" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_cluster" {
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-cluster?ref=v0.1.0"
source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-cluster?ref=v0.2.0"

cluster_name = "${var.consul_cluster_name}"
cluster_size = "${var.consul_cluster_size}"
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module "vault_cluster" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_iam_policies_servers" {
source = "github.com/hashicorp/terraform-aws-consul//modules/consul-iam-policies?ref=v0.0.2"
source = "github.com/hashicorp/terraform-aws-consul//modules/consul-iam-policies?ref=v0.2.0"

iam_role_id = "${module.vault_cluster.iam_role_id}"
}
Expand Down Expand Up @@ -154,7 +154,7 @@ data "aws_route53_zone" "selected" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_cluster" {
source = "github.com/hashicorp/terraform-aws-consul//modules/consul-cluster?ref=v0.0.2"
source = "github.com/hashicorp/terraform-aws-consul//modules/consul-cluster?ref=v0.2.0"

cluster_name = "${var.consul_cluster_name}"
cluster_size = "${var.consul_cluster_size}"
Expand Down
2 changes: 2 additions & 0 deletions modules/vault-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ terraform {
# ---------------------------------------------------------------------------------------------------------------------

resource "aws_autoscaling_group" "autoscaling_group" {
name_prefix = "${var.cluster_name}"

launch_configuration = "${aws_launch_configuration.launch_configuration.name}"

availability_zones = ["${var.availability_zones}"]
Expand Down

0 comments on commit 45a3e5b

Please sign in to comment.