Skip to content

Commit

Permalink
Pin tf_label and tf_hostname to 0.1.0 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
aknysh authored Aug 20, 2017
1 parent aa2b687 commit abfbf21
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

# Module directory
.terraform/

.idea
*.iml
42 changes: 21 additions & 21 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Define composite variables for resources
module "label" {
source = "git::https://github.com/cloudposse/tf_label.git"
source = "git::https://github.com/cloudposse/tf_label.git?ref=tags/0.1.0"
namespace = "${var.namespace}"
name = "${var.name}"
stage = "${var.stage}"
Expand All @@ -10,7 +10,7 @@ resource "aws_security_group" "default" {
name = "${module.label.id}"
description = "Allow all inbound traffic"

vpc_id = "${var.vpc_id}"
vpc_id = "${var.vpc_id}"

ingress {
from_port = "3306" # MySQL
Expand All @@ -34,39 +34,39 @@ resource "aws_security_group" "default" {
}

resource "aws_rds_cluster" "default" {
cluster_identifier = "${module.label.id}"
availability_zones = ["${var.availability_zones}"]
database_name = "${var.db_name}"
master_username = "${var.admin_user}"
master_password = "${var.admin_password}"
backup_retention_period = "${var.retention_period}"
preferred_backup_window = "${var.backup_window}"
final_snapshot_identifier = "${lower(module.label.id)}"
skip_final_snapshot = true
apply_immediately = true
snapshot_identifier = "${var.snapshot_identifier}"

vpc_security_group_ids = [
cluster_identifier = "${module.label.id}"
availability_zones = ["${var.availability_zones}"]
database_name = "${var.db_name}"
master_username = "${var.admin_user}"
master_password = "${var.admin_password}"
backup_retention_period = "${var.retention_period}"
preferred_backup_window = "${var.backup_window}"
final_snapshot_identifier = "${lower(module.label.id)}"
skip_final_snapshot = true
apply_immediately = true
snapshot_identifier = "${var.snapshot_identifier}"

vpc_security_group_ids = [
"${aws_security_group.default.id}",
]

preferred_maintenance_window = "${var.maintenance_window}"

db_subnet_group_name = "${aws_db_subnet_group.default.name}"
db_subnet_group_name = "${aws_db_subnet_group.default.name}"

vpc_security_group_ids = [
vpc_security_group_ids = [
"${aws_security_group.default.id}",
]

tags = {
tags = {
Name = "${module.label.id}"
Namespace = "${var.namespace}"
Stage = "${var.stage}"
}
}

resource "aws_rds_cluster_instance" "default" {
count = "${var.cluster_size}"
count = "${var.cluster_size}"

identifier = "${module.label.id}-${count.index+1}"
cluster_identifier = "${aws_rds_cluster.default.id}"
Expand All @@ -82,7 +82,7 @@ resource "aws_db_subnet_group" "default" {
}

module "dns_master" {
source = "git::https://github.com/cloudposse/tf_hostname.git"
source = "git::https://github.com/cloudposse/tf_hostname.git?ref=tags/0.1.0"
namespace = "${var.namespace}"
name = "master.${var.name}"
stage = "${var.stage}"
Expand All @@ -91,7 +91,7 @@ module "dns_master" {
}

module "dns_replicas" {
source = "git::https://github.com/cloudposse/tf_hostname.git"
source = "git::https://github.com/cloudposse/tf_hostname.git?ref=tags/0.1.0"
namespace = "${var.namespace}"
name = "replicas.${var.name}"
stage = "${var.stage}"
Expand Down

0 comments on commit abfbf21

Please sign in to comment.