Skip to content

Commit

Permalink
Update references to conditional resources for Terraform 0.11 (#4)
Browse files Browse the repository at this point in the history
* Use splat for resources that have a count
* Upgrade null-label

[ch630]
  • Loading branch information
darend authored Feb 28, 2018
1 parent c6ec208 commit bdc4021
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions database.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "db_subnet_label" {
enabled = "${var.enabled}"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "db-subnet"
Expand All @@ -21,7 +21,7 @@ resource "aws_db_subnet_group" "replica" {

module "kms_label" {
enabled = "${var.enabled}"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "kms"
Expand All @@ -41,7 +41,7 @@ resource "aws_kms_key" "repica" {

module "rds_label" {
enabled = "${var.enabled}"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "rds"
Expand Down
8 changes: 4 additions & 4 deletions output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ output "vpc_id" {
}

output "availability_zone" {
value = "${aws_db_instance.replica.availability_zone}"
value = "${join("", aws_db_instance.replica.*.availability_zone)}"
}

output "replica_arn" {
value = "${aws_db_instance.replica.arn}"
value = "${join("", aws_db_instance.replica.*.arn)}"
}

output "replica_address" {
value = "${aws_db_instance.replica.address}"
value = "${join("", aws_db_instance.replica.*.address)}"
}

output "replica_endpoint" {
value = "${aws_db_instance.replica.endpoint}"
value = "${join("", aws_db_instance.replica.*.endpoint)}"
}
8 changes: 4 additions & 4 deletions vpc.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "vpc_label" {
enabled = "${var.enabled}"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "vpc"
Expand All @@ -25,7 +25,7 @@ locals {

module "zone_1_label" {
enabled = "${var.enabled}"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3"
namespace = "${var.namespace}"
name = "${local.zone_1_az}"
attributes = ["private"]
Expand All @@ -45,7 +45,7 @@ resource "aws_subnet" "zone_1" {

module "zone_2_label" {
enabled = "${var.enabled}"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3"
namespace = "${var.namespace}"
name = "${local.zone_2_az}"
attributes = ["private"]
Expand All @@ -65,7 +65,7 @@ resource "aws_subnet" "zone_2" {

module "zone_3_label" {
enabled = "${var.enabled}"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3"
namespace = "${var.namespace}"
name = "${local.zone_3_az}"
attributes = ["private"]
Expand Down

0 comments on commit bdc4021

Please sign in to comment.