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

Commit 33a378c

Browse files
authored
Merge pull request #49 from gruntwork-io/tf12
Terraform 0.12 upgrade
2 parents 68e85dd + 08b7969 commit 33a378c

File tree

42 files changed

+1700
-862
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1700
-862
lines changed

.circleci/config.yml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1+
defaults: &defaults
2+
# We need to run Docker Compose with volumes, which isn't supported by CircleCI's Docker executor, so we have to use
3+
# the machine executor instead.
4+
machine:
5+
image: circleci/classic:201711-01
6+
environment:
7+
GRUNTWORK_INSTALLER_VERSION: v0.0.21
8+
TERRATEST_LOG_PARSER_VERSION: v0.13.24
9+
MODULE_CI_VERSION: v0.13.15
10+
TERRAFORM_VERSION: 0.12.2
11+
TERRAGRUNT_VERSION: NONE
12+
PACKER_VERSION: 1.4.1
13+
GOLANG_VERSION: 1.11
14+
115
version: 2
216
jobs:
317
test:
4-
# We need to run Docker Compose with volumes, which isn't supported by CircleCI's Docker executor, so we have to use
5-
# the machine executor instead.
6-
machine: true
18+
<<: *defaults
719
steps:
820
- checkout
921

@@ -13,20 +25,20 @@ jobs:
1325
# Install Gruntwork and HashiCorp dependencies
1426
- restore_cache:
1527
keys:
16-
- v1-external-dep
17-
- v1-dep-{{ checksum "test/Gopkg.lock" }}
28+
- v2-external-dep
29+
- v2-dep-{{ checksum "test/Gopkg.lock" }}
1830
# Use the Gruntwork Installer to install the gruntwork-module-circleci-helpers
19-
- run: curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version v0.0.21
20-
- run: gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
21-
- run: gruntwork-install --binary-name "terratest_log_parser" --repo "https://github.com/gruntwork-io/terratest" --tag v0.14.2
22-
- run: configure-environment-for-gruntwork-module --circle-ci-2-machine-executor --go-src-path test --use-go-dep
31+
- run: curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version "${GRUNTWORK_INSTALLER_VERSION}"
32+
- run: gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION}"
33+
- run: gruntwork-install --binary-name "terratest_log_parser" --repo "https://github.com/gruntwork-io/terratest" --tag "${TERRATEST_LOG_PARSER_VERSION}"
34+
- run: configure-environment-for-gruntwork-module --circle-ci-2-machine-executor --terraform-version ${TERRAFORM_VERSION} --terragrunt-version ${TERRAGRUNT_VERSION} --packer-version ${PACKER_VERSION} --use-go-dep --go-version ${GOLANG_VERSION} --go-src-path test
2335
- save_cache:
24-
key: v1-external-dep
36+
key: v2-external-dep
2537
paths:
2638
- $HOME/terraform
2739
- $HOME/packer
2840
- save_cache:
29-
key: v1-dep-{{ checksum "test/Gopkg.lock" }}
41+
key: v2-dep-{{ checksum "test/Gopkg.lock" }}
3042
paths:
3143
- $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/test/vendor
3244

@@ -56,18 +68,18 @@ jobs:
5668
path: /tmp/logs
5769

5870
release:
59-
machine: true
71+
<<: *defaults
6072
steps:
6173
- checkout
6274

6375
# The weird way you have to set PATH in Circle 2.0
6476
- run: echo 'export PATH=$HOME/.local/bin:$HOME/terraform:$HOME/packer:$PATH' >> $BASH_ENV
6577

6678
# Use the Gruntwork Installer to install the gruntwork-module-circleci-helpers
67-
- run: curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version v0.0.21
68-
- run: gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
69-
- run: gruntwork-install --module-name "build-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
70-
- run: gruntwork-install --module-name "aws-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
79+
- run: curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version "${GRUNTWORK_INSTALLER_VERSION}"
80+
- run: gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION}"
81+
- run: gruntwork-install --module-name "build-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION}"
82+
- run: gruntwork-install --module-name "aws-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION}"
7183
- run: configure-environment-for-gruntwork-module --circle-ci-2-machine-executor --go-src-path test --use-go-dep --terraform-version NONE --terragrunt-version NONE --glide-version NONE
7284

7385
- run: ~/project/.circleci/publish-amis.sh "ubuntu-ami"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[![Maintained by Gruntwork.io](https://img.shields.io/badge/maintained%20by-gruntwork.io-%235849a6.svg)](https://gruntwork.io/?ref=repo_aws_couchbase)
2+
![Terraform Version](https://img.shields.io/badge/tf-%3E%3D0.12.0-blue.svg)
3+
24
# Couchbase AWS Module
35

46
This repo contains a Module for deploying [Couchbase](https://www.couchbase.com/) on [AWS](https://aws.amazon.com/)

examples/couchbase-ami/couchbase.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,17 @@
108108
"inline": ["mkdir -p /tmp/terraform-aws-couchbase"]
109109
},{
110110
"type": "file",
111-
"source": "{{template_dir}}/../../",
112-
"destination": "/tmp/terraform-aws-couchbase"
111+
"source": "{{template_dir}}/../../modules",
112+
"destination": "/tmp/terraform-aws-couchbase/modules"
113+
},{
114+
"type": "file",
115+
"source": "{{template_dir}}/sync_gateway.json",
116+
"destination": "/tmp/terraform-aws-couchbase/sync_gateway.json"
113117
},{
114118
"type": "shell",
115119
"inline": [
116120
"/tmp/terraform-aws-couchbase/modules/install-couchbase-server/install-couchbase-server --edition {{user `edition`}}",
117-
"/tmp/terraform-aws-couchbase/modules/install-sync-gateway/install-sync-gateway --edition {{user `edition`}} --config /tmp/terraform-aws-couchbase/examples/couchbase-ami/sync_gateway.json"
121+
"/tmp/terraform-aws-couchbase/modules/install-sync-gateway/install-sync-gateway --edition {{user `edition`}} --config /tmp/terraform-aws-couchbase/sync_gateway.json"
118122
]
119123
}],
120124
"post-processors": [{

0 commit comments

Comments
 (0)