Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Commit 028f695

Browse files
authored
Merge pull request #23 from gruntwork-io/registry
Prepare for release in the Terraform Registry
2 parents 484a14d + e42ad1e commit 028f695

File tree

15 files changed

+52
-67
lines changed

15 files changed

+52
-67
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ Or as multiple clusters for the various Couchbase services (data, management, se
1414

1515
## Quick start
1616

17-
If you want to quickly spin up a Couchbase cluster, check out the instructions for the [couchbase-cluster-simple
18-
example](https://github.com/gruntwork-io/terraform-aws-couchbase/blob/master/examples/couchbase-cluster-simple).
17+
If you want to quickly spin up a Couchbase cluster, you can run the simple example that is in the root of this repo.
18+
Check out [couchbase-cluster-simple example
19+
documentation](https://github.com/gruntwork-io/terraform-aws-couchbase/blob/master/examples/couchbase-cluster-simple)
20+
for instructions.
1921

2022

2123

examples/couchbase-cluster-mds/main.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
# clsuters in AWS.
55
# ---------------------------------------------------------------------------------------------------------------------
66

7-
provider "aws" {
8-
region = "${var.aws_region}"
9-
}
10-
117
terraform {
128
required_version = ">= 0.10.3"
139
}

examples/couchbase-cluster-mds/variables.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# AWS_ACCESS_KEY_ID
77
# AWS_SECRET_ACCESS_KEY
8+
# AWS_DEFAULT_REGION
89

910
# ---------------------------------------------------------------------------------------------------------------------
1011
# REQUIRED PARAMETERS
@@ -21,11 +22,6 @@ variable "ami_id" {
2122
default = ""
2223
}
2324

24-
variable "aws_region" {
25-
description = "The AWS region to deploy into (e.g. us-east-1)."
26-
default = "us-east-1"
27-
}
28-
2925
variable "couchbase_data_node_cluster_name" {
3026
description = "What to name the Couchbase data nodes cluster and all of its associated resources"
3127
default = "couchbase-server-data"

examples/couchbase-cluster-simple-dns-tls/main.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
# for it.
77
# ---------------------------------------------------------------------------------------------------------------------
88

9-
provider "aws" {
10-
region = "${var.aws_region}"
11-
}
12-
139
terraform {
1410
required_version = ">= 0.10.3"
1511
}

examples/couchbase-cluster-simple-dns-tls/variables.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# AWS_ACCESS_KEY_ID
77
# AWS_SECRET_ACCESS_KEY
8+
# AWS_DEFAULT_REGION
89

910
# ---------------------------------------------------------------------------------------------------------------------
1011
# REQUIRED PARAMETERS
@@ -25,11 +26,6 @@ variable "ami_id" {
2526
default = ""
2627
}
2728

28-
variable "aws_region" {
29-
description = "The AWS region to deploy into (e.g. us-east-1)."
30-
default = "us-east-1"
31-
}
32-
3329
variable "cluster_name" {
3430
description = "What to name the Couchbase cluster and all of its associated resources"
3531
default = "couchbase-server"

examples/couchbase-cluster-simple/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Couchbase Single Cluster Example
22

3-
This folder shows an example of Terraform code that uses the
3+
The root folder of this repo shows an example of Terraform code that uses the
44
[couchbase-cluster](https://github.com/gruntwork-io/terraform-aws-couchbase/tree/master/modules/couchbase-cluster)
55
module to deploy a [Couchbase](https://www.couchbase.com/) cluster in [AWS](https://aws.amazon.com/). The cluster
66
consists of one Auto Scaling Group (ASG) that runs all Couchbase services and Sync Gateway:
@@ -30,12 +30,12 @@ To deploy a Couchbase Cluster:
3030
[couchbase-ami example](https://github.com/gruntwork-io/terraform-aws-couchbase/tree/master/examples/couchbase-ami)
3131
documentation for instructions. Make sure to note down the ID of the AMI.
3232
1. Install [Terraform](https://www.terraform.io/).
33-
1. Open `variables.tf`, set the environment variables specified at the top of the file, and fill in any other variables that
34-
don't have a default. If you built a custom AMI, put its ID into the `ami_id` variable. If you didn't, this example
35-
will use public AMIs that Gruntwork has published, which are fine for testing/learning, but not recommended for
36-
production use.
37-
1. Run `terraform init`.
38-
1. Run `terraform apply`.
33+
1. Open the `variables.tf` file in the root of this repo, set the environment variables specified at the top of the
34+
file, and fill in any other variables that don't have a default. If you built a custom AMI, put its ID into the
35+
`ami_id` variable. If you didn't, this example will use public AMIs that Gruntwork has published, which are fine for
36+
testing/learning, but not recommended for production use.
37+
1. Run `terraform init` in the root folder of this repo.
38+
1. Run `terraform apply` in the root folder of this repo.
3939

4040

4141

examples/couchbase-cluster-simple/main.tf renamed to main.tf

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
# used for health checks and to distribute traffic across Sync Gateway.
66
# ---------------------------------------------------------------------------------------------------------------------
77

8-
provider "aws" {
9-
region = "${var.aws_region}"
10-
}
11-
128
terraform {
139
required_version = ">= 0.10.3"
1410
}
@@ -21,7 +17,7 @@ module "couchbase" {
2117
# When using these modules in your own code, you will need to use a Git URL with a ref attribute that pins you
2218
# to a specific version of the modules, such as the following example:
2319
# source = "git::[email protected]:gruntwork-io/terraform-aws-couchbase.git//modules/couchbase-cluster?ref=v0.0.1"
24-
source = "../../modules/couchbase-cluster"
20+
source = "./modules/couchbase-cluster"
2521

2622
cluster_name = "${var.cluster_name}"
2723
min_size = 3
@@ -81,7 +77,7 @@ module "couchbase" {
8177
# ---------------------------------------------------------------------------------------------------------------------
8278

8379
data "template_file" "user_data_server" {
84-
template = "${file("${path.module}/user-data/user-data.sh")}"
80+
template = "${file("${path.module}/examples/couchbase-cluster-simple/user-data/user-data.sh")}"
8581

8682
vars {
8783
cluster_asg_name = "${var.cluster_name}"
@@ -113,7 +109,7 @@ module "load_balancer" {
113109
# When using these modules in your own code, you will need to use a Git URL with a ref attribute that pins you
114110
# to a specific version of the modules, such as the following example:
115111
# source = "git::[email protected]:gruntwork-io/terraform-aws-couchbase.git//modules/load-balancer?ref=v0.0.1"
116-
source = "../../modules/load-balancer"
112+
source = "./modules/load-balancer"
117113

118114
name = "${var.cluster_name}"
119115
vpc_id = "${data.aws_vpc.default.id}"
@@ -141,7 +137,7 @@ module "couchbase_target_group" {
141137
# When using these modules in your own code, you will need to use a Git URL with a ref attribute that pins you
142138
# to a specific version of the modules, such as the following example:
143139
# source = "git::[email protected]:gruntwork-io/terraform-aws-couchbase.git//modules/load-balancer-target-group?ref=v0.0.1"
144-
source = "../../modules/load-balancer-target-group"
140+
source = "./modules/load-balancer-target-group"
145141

146142
target_group_name = "${var.cluster_name}-cb"
147143
asg_name = "${module.couchbase.asg_name}"
@@ -162,7 +158,7 @@ module "sync_gateway_target_group" {
162158
# When using these modules in your own code, you will need to use a Git URL with a ref attribute that pins you
163159
# to a specific version of the modules, such as the following example:
164160
# source = "git::[email protected]:gruntwork-io/terraform-aws-couchbase.git//modules/load-balancer-target-group?ref=v0.0.1"
165-
source = "../../modules/load-balancer-target-group"
161+
source = "./modules/load-balancer-target-group"
166162

167163
target_group_name = "${var.cluster_name}-sg"
168164
asg_name = "${module.couchbase.asg_name}"
@@ -184,7 +180,7 @@ module "couchbase_security_group_rules" {
184180
# When using these modules in your own code, you will need to use a Git URL with a ref attribute that pins you
185181
# to a specific version of the modules, such as the following example:
186182
# source = "git::[email protected]:gruntwork-io/terraform-aws-couchbase.git//modules/couchbase-server-security-group-rules?ref=v0.0.1"
187-
source = "../../modules/couchbase-server-security-group-rules"
183+
source = "./modules/couchbase-server-security-group-rules"
188184

189185
security_group_id = "${module.couchbase.security_group_id}"
190186

@@ -203,7 +199,7 @@ module "sync_gateway_security_group_rules" {
203199
# When using these modules in your own code, you will need to use a Git URL with a ref attribute that pins you
204200
# to a specific version of the modules, such as the following example:
205201
# source = "git::[email protected]:gruntwork-io/terraform-aws-couchbase.git//modules/sync-gateway-security-group-rules?ref=v0.0.1"
206-
source = "../../modules/sync-gateway-security-group-rules"
202+
source = "./modules/sync-gateway-security-group-rules"
207203

208204
security_group_id = "${module.couchbase.security_group_id}"
209205

@@ -221,7 +217,7 @@ module "iam_policies" {
221217
# When using these modules in your own code, you will need to use a Git URL with a ref attribute that pins you
222218
# to a specific version of the modules, such as the following example:
223219
# source = "git::[email protected]:gruntwork-io/terraform-aws-couchbase.git//modules/couchbase-server-security-group-rules?ref=v0.0.1"
224-
source = "../../modules/couchbase-iam-policies"
220+
source = "./modules/couchbase-iam-policies"
225221

226222
iam_role_id = "${module.couchbase.iam_role_id}"
227223
}
File renamed without changes.

test/Gopkg.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
[[constraint]]
2525
name = "github.com/gruntwork-io/terratest"
26-
version = "0.9.1"
26+
version = "0.9.5"
2727

2828
[[constraint]]
2929
name = "github.com/stretchr/testify"

0 commit comments

Comments
 (0)