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 #4 from hashicorp/tweaks
Browse files Browse the repository at this point in the history
Fix broken links. Update consul and Vault versions.
  • Loading branch information
josh-padnick authored Nov 10, 2017
2 parents 4aa3ec7 + 5b644da commit b4d3f6e
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 36 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,25 @@ To deploy Vault with this Terraform Module, you will need to deploy two separate
[Consul](https://www.consul.io/) servers (which Vault uses as a [high availability
backend](https://www.vaultproject.io/docs/concepts/ha.html)) and one to run Vault servers.

To deploy the Consul server cluster, use the [Consul GCP Module](https://github.com/gruntwork-io/terraform-google-consul).
To deploy the Consul server cluster, use the [Consul GCP Module](https://github.com/hashicorp/terraform-google-consul).

To deploy the Vault cluster:

1. Create a Google Image that has Vault installed (using the [install-vault module](https://github.com/hashicorp/terraform-google-vault/tree/master/modules/install-vault)) and the Consul
agent installed (using the [install-consul
module](https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/install-consul)). Here is an
module](https://github.com/hashicorp/terraform-google-consul/tree/master/modules/install-consul)). Here is an
[example Packer template](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-consul-image). Google Cloud does not allow the creation of public Images
so you _must_ create this Image on your own to proceed!

1. Deploy that Image across a Managed Instance Group using the Terraform [vault-cluster-module](https://github.com/hashicorp/terraform-google-vault/tree/master/modules/vault-cluster).

1. Execute the [run-consul script](https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/run-consul)
1. Execute the [run-consul script](https://github.com/hashicorp/terraform-google-consul/tree/master/modules/run-consul)
with the `--client` flag during boot on each Instance to have the Consul agent connect to the Consul server cluster.

1. Execute the [run-vault](https://github.com/hashicorp/terraform-google-vault/tree/master/modules/run-vault) script during boot on each Instance to create the Vault cluster.

1. If you only need to access Vault from inside your GCP account (recommended), run the [install-dnsmasq
module](https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/install-dnsmasq) on each server,
module](https://github.com/hashicorp/terraform-google-consul/tree/master/modules/install-dnsmasq) on each server,
and that server will be able to reach Vault using the Consul Server cluster as the DNS resolver (e.g. using an address
like `vault.service.consul`). See the [vault-cluster-private example](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-cluster-private) for working
sample code.
Expand Down
2 changes: 1 addition & 1 deletion examples/root-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ do it here only to provide a convenient quick start experience.**.

The Vault cluster uses [Consul](https://www.consul.io/) as a storage backend, so this example also deploys a separate
Consul server cluster using the [consul-cluster module](
https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/consul-cluster) from the Consul GCP Module.
https://github.com/hashicorp/terraform-google-consul/tree/master/modules/consul-cluster) from the Consul GCP Module.

You will need to create a [Google Image](https://cloud.google.com/compute/docs/images) that has Vault and Consul
installed, which you can do using the [vault-consul-image example](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-consul-image)).
Expand Down
2 changes: 1 addition & 1 deletion examples/root-example/startup-script-consul.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# This script is meant to be run as the Startup Script of each Compute Instance while it's booting. The script uses the
# run-consul script to configure and start Consul in server mode. This script assumes it's running in a Compute Instance
# based on a Google Image built from the Packer template in https://github.com/gruntwork-io/terraform-google-consul at
# based on a Google Image built from the Packer template in https://github.com/hashicorp/terraform-google-consul at
# /examples/consul-image.

set -e
Expand Down
2 changes: 1 addition & 1 deletion examples/vault-cluster-private/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ access these nodes.

The Vault cluster uses [Consul](https://www.consul.io/) as a storage backend, so this example also deploys a separate
Consul server cluster using the [consul-cluster module](
https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/consul-cluster) from the Consul GCP Module.
https://github.com/hashicorp/terraform-google-consul/tree/master/modules/consul-cluster) from the Consul GCP Module.

You will need to create a [Google Image](https://cloud.google.com/compute/docs/images) that has Vault and Consul
installed, which you can do using the [vault-consul-image example](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-consul-image)).
Expand Down
4 changes: 2 additions & 2 deletions examples/vault-cluster-private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ terraform {
module "vault_cluster" {
# When using these modules in your own templates, you will need to use a Git URL with a ref attribute that pins you
# to a specific version of the modules, such as the following example:
# source = "git::git@github.com:gruntwork-io/terraform-google-vault.git//modules/vault-cluster?ref=v0.0.1"
# source = "git::git@github.com:hashicorp/terraform-google-vault.git//modules/vault-cluster?ref=v0.0.1"
source = "../../modules/vault-cluster"

gcp_zone = "${var.gcp_zone}"
Expand Down Expand Up @@ -66,7 +66,7 @@ data "template_file" "startup_script_vault" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_cluster" {
source = "git::git@github.com:gruntwork-io/terraform-google-consul.git//modules/consul-cluster?ref=v0.0.2"
source = "git::git@github.com:hashicorp/terraform-google-consul.git//modules/consul-cluster?ref=v0.0.1"

gcp_zone = "${var.gcp_zone}"
cluster_name = "${var.consul_server_cluster_name}"
Expand Down
2 changes: 1 addition & 1 deletion examples/vault-cluster-private/startup-script-consul.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# This script is meant to be run as the Startup Script of each Compute Instance while it's booting. The script uses the
# run-consul script to configure and start Consul in server mode. This script assumes it's running in a Compute Instance
# based on a Google Image built from the Packer template in https://github.com/gruntwork-io/terraform-google-consul at
# based on a Google Image built from the Packer template in https://github.com/hashicorp/terraform-google-consul at
# /examples/consul-image.

set -e
Expand Down
2 changes: 1 addition & 1 deletion examples/vault-cluster-public/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Vault is your system of record for identity.**.

The Vault cluster uses [Consul](https://www.consul.io/) as a storage backend, so this example also deploys a separate
Consul server cluster using the [consul-cluster module](
https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/consul-cluster) from the Consul GCP Module.
https://github.com/hashicorp/terraform-google-consul/tree/master/modules/consul-cluster) from the Consul GCP Module.

You will need to create a [Google Image](https://cloud.google.com/compute/docs/images) that has Vault and Consul
installed, which you can do using the [vault-consul-image example](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-consul-image)).
Expand Down
6 changes: 3 additions & 3 deletions examples/vault-cluster-public/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ terraform {
module "vault_cluster" {
# When using these modules in your own templates, you will need to use a Git URL with a ref attribute that pins you
# to a specific version of the modules, such as the following example:
# source = "git::git@github.com:gruntwork-io/terraform-google-vault.git//modules/vault-cluster?ref=v0.0.1"
# source = "git::git@github.com:hashicorp/terraform-google-vault.git//modules/vault-cluster?ref=v0.0.1"
source = "../../modules/vault-cluster"

gcp_zone = "${var.gcp_zone}"
Expand Down Expand Up @@ -78,7 +78,7 @@ data "template_file" "startup_script_vault" {
module "vault_load_balancer" {
# When using these modules in your own templates, you will need to use a Git URL with a ref attribute that pins you
# to a specific version of the modules, such as the following example:
# source = "git::git@github.com:gruntwork-io/terraform-google-vault.git//modules/vault-lb-regional-ext?ref=v0.0.1"
# source = "git::git@github.com:hashicorp/terraform-google-vault.git//modules/vault-lb-regional-ext?ref=v0.0.1"
source = "../../modules/vault-lb-fr"

cluster_name = "${var.vault_cluster_name}"
Expand All @@ -93,7 +93,7 @@ module "vault_load_balancer" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_cluster" {
source = "git::git@github.com:gruntwork-io/terraform-google-consul.git//modules/consul-cluster?ref=v0.0.2"
source = "git::git@github.com:hashicorp/terraform-google-consul.git//modules/consul-cluster?ref=v0.0.1"

gcp_zone = "${var.gcp_zone}"
cluster_name = "${var.consul_server_cluster_name}"
Expand Down
2 changes: 1 addition & 1 deletion examples/vault-cluster-public/startup-script-consul.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# This script is meant to be run as the Startup Script of each Compute Instance while it's booting. The script uses the
# run-consul script to configure and start Consul in server mode. This script assumes it's running in a Compute Instance
# based on a Google Image built from the Packer template in https://github.com/gruntwork-io/terraform-google-consul at
# based on a Google Image built from the Packer template in https://github.com/hashicorp/terraform-google-consul at
# /examples/consul-image.

set -e
Expand Down
10 changes: 5 additions & 5 deletions examples/vault-consul-image/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Vault and Consul Google Image

This folder shows an example of how to use the [install-vault module](https://github.com/hashicorp/terraform-google-vault/tree/master/modules/install-vault) from this Module and
the [install-consul](https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/install-consul)
and [install-dnsmasq](https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/install-dnsmasq) modules
the [install-consul](https://github.com/hashicorp/terraform-google-consul/tree/master/modules/install-consul)
and [install-dnsmasq](https://github.com/hashicorp/terraform-google-consul/tree/master/modules/install-dnsmasq) modules
from the Consul GCP Module with [Packer](https://www.packer.io/) to create a [Google Image](
https://cloud.google.com/compute/docs/images) that has Vault and Consul installed on top of:

Expand All @@ -11,7 +11,7 @@ https://cloud.google.com/compute/docs/images) that has Vault and Consul installe
You can use this Google Image to deploy a [Vault cluster](https://www.vaultproject.io/) by using the [vault-cluster
module](https://github.com/hashicorp/terraform-google-vault/tree/master/modules/vault-cluster). This Vault cluster will use Consul as its storage backend, so you can also use the
same Google Image to deploy a separate [Consul server cluster](https://www.consul.io/) by using the [consul-cluster
module](https://github.com/gruntwork-io/consul-aws-blueprint/tree/master/modules/consul-cluster).
module](https://github.com/hashicorp/terraform-google-consul/tree/master/modules/consul-cluster).

Check out the [vault-cluster-private](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-cluster-private) and
[vault-cluster-public](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-cluster-public) examples for working sample code. For more info on Vault
Expand Down Expand Up @@ -61,7 +61,7 @@ provisioner. Instead of:
{
"provisioners": [{
"type": "file",
"source": "{{template_dir}}/../../../vault-aws-blueprint",
"source": "{{template_dir}}/../../../terraform-google-vault",
"destination": "/tmp"
},{
"type": "shell",
Expand All @@ -80,7 +80,7 @@ Your code should look more like this:
"provisioners": [{
"type": "shell",
"inline": [
"git clone --branch <MODULE_VERSION> https://github.com/gruntwork-io/terraform-google-vault.git /tmp/terraform-google-vault",
"git clone --branch <MODULE_VERSION> https://github.com/hashicorp/terraform-google-vault.git /tmp/terraform-google-vault",
"/tmp/terraform-google-vault/modules/install-vault/install-vault --version {{user `vault_version`}}"
],
"pause_before": "30s"
Expand Down
8 changes: 4 additions & 4 deletions examples/vault-consul-image/vault-consul.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"variables": {
"project_id": null,
"zone": null,
"vault_version": "0.8.2",
"consul_module_version": "v0.0.2",
"consul_version": "0.9.2",
"vault_version": "0.8.3",
"consul_module_version": "v0.0.1",
"consul_version": "1.0.0",
"ca_public_key_path": null,
"tls_public_key_path": null,
"tls_private_key_path": null
Expand Down Expand Up @@ -55,7 +55,7 @@
},{
"type": "shell",
"inline": [
"git clone --branch {{user `consul_module_version`}} https://github.com/gruntwork-io/terraform-google-consul.git /tmp/terraform-google-consul",
"git clone --branch {{user `consul_module_version`}} https://github.com/hashicorp/terraform-google-consul.git /tmp/terraform-google-consul",
"/tmp/terraform-google-consul/modules/install-consul/install-consul --version {{user `consul_version`}}",
"/tmp/terraform-google-consul/modules/install-dnsmasq/install-dnsmasq"
]
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ terraform {
module "vault_cluster" {
# When using these modules in your own templates, you will need to use a Git URL with a ref attribute that pins you
# to a specific version of the modules, such as the following example:
# source = "git::git@github.com:gruntwork-io/terraform-google-vault.git//modules/vault-cluster?ref=v0.0.1"
# source = "git::git@github.com:hashicorp/terraform-google-vault.git//modules/vault-cluster?ref=v0.0.1"
source = "modules/vault-cluster"

gcp_zone = "${var.gcp_zone}"
Expand Down Expand Up @@ -66,7 +66,7 @@ data "template_file" "startup_script_vault" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_cluster" {
source = "git::git@github.com:gruntwork-io/terraform-google-consul.git//modules/consul-cluster?ref=v0.0.2"
source = "git::git@github.com:hashicorp/terraform-google-consul.git//modules/consul-cluster?ref=v0.0.1"

gcp_zone = "${var.gcp_zone}"
cluster_name = "${var.consul_server_cluster_name}"
Expand Down
4 changes: 2 additions & 2 deletions modules/install-nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To install the Nginx binary, use `git` to clone this repository at a specific ta
../../../../releases) for all available tags) and run the `install-nginx` script:

```
git clone --branch <VERSION> https://github.com/gruntwork-io/terraform-google-vault.git
git clone --branch <VERSION> https://github.com/hashicorp/terraform-google-vault.git
terraform-google-vault/modules/install-nginx/install-nginx --version 0.5.4
```

Expand Down Expand Up @@ -120,5 +120,5 @@ Place the `nginx` binary in `/opt/nginx/bin` and make it accessible in the `PATH

We needed an easy way to install these scripts that satisfied a number of requirements, including working on a variety
of operating systems and supported versioning. Our current solution is to use `git`, but this may change in the future.
See [Package Managers](https://github.com/gruntwork-io/terraform-google-consul/blob/master/_docs/package-managers.md) for
See [Package Managers](https://github.com/hashicorp/terraform-google-consul/blob/master/_docs/package-managers.md) for
a full discussion of the requirements, trade-offs, and why we picked `git`.
4 changes: 2 additions & 2 deletions modules/install-vault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To install Vault, use `git` to clone this repository at a specific tag (see the
for all available tags) and run the `install-vault` script:

```
git clone --branch <VERSION> https://github.com/gruntwork-io/terraform-google-vault.git
git clone --branch <VERSION> https://github.com/hashicorp/terraform-google-vault.git
terraform-google-vault/modules/install-vault/install-vault --version 0.5.4
```

Expand Down Expand Up @@ -113,5 +113,5 @@ After the `install-vault` script finishes running, you may wish to do the follow

We needed an easy way to install these scripts that satisfied a number of requirements, including working on a variety
of operating systems and supported versioning. Our current solution is to use `git`, but this may change in the future.
See [Package Managers](https://github.com/gruntwork-io/terraform-google-consul/blob/master/_docs/package-managers.md) for
See [Package Managers](https://github.com/hashicorp/terraform-google-consul/blob/master/_docs/package-managers.md) for
a full discussion of the requirements, trade-offs, and why we picked `git`.
2 changes: 1 addition & 1 deletion modules/run-vault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ necessary, but may be a good extra layer of security.
By default, the Vault server nodes communicate with a local Consul agent running on the same server over (unencrypted)
HTTP. However, you can configure those agents to talk to the Consul servers using TLS. Check out the [official Consul
encryption docs](https://www.consul.io/docs/agent/encryption.html) and the Consul GCP Module [How do you handle
encryption docs](https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/run-consul#how-do-you-handle-encryption)
encryption docs](https://github.com/hashicorp/terraform-google-consul/tree/master/modules/run-consul#how-do-you-handle-encryption)
for more info.


Expand Down
2 changes: 1 addition & 1 deletion modules/update-certificate-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To use the `update-certificate-script`, use `git` to clone this repository at a
[releases page](../../../../releases) for all available tags) and run the `update-certificate-script` script:

```
git clone --branch <VERSION> https://github.com/gruntwork-io/terraform-google-vault.git
git clone --branch <VERSION> https://github.com/hashicorp/terraform-google-vault.git
terraform-google-vault/modules/update-certificate-script/update-certificate-script --cert-file-path /opt/vault/tls/ca.cert.pem
```

Expand Down
6 changes: 3 additions & 3 deletions modules/vault-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ code by adding a `module` configuration and setting its `source` parameter to UR
```hcl
module "vault_cluster" {
# Use version v0.0.1 of the vault-cluster module
source = "github.com/gruntwork-io/terraform-google-vault//modules/vault-cluster?ref=v0.0.1"
source = "github.com/hashicorp/terraform-google-vault//modules/vault-cluster?ref=v0.0.1"
# Specify the ID of the Vault AMI. You should build this using the scripts in the install-vault module.
source_image = "vault-consul-xxxxxx"
Expand Down Expand Up @@ -177,7 +177,7 @@ entries](https://www.consul.io/docs/guides/forwarding.html), you can access Vaul
using a nice domain name instead, such as `vault.service.consul`.

To set this up, use the [install-dnsmasq
module](https://github.com/gruntwork-io/terraform-google-consul/tree/master/modules/install-dnsmasq) on each server that
module](https://github.com/hashicorp/terraform-google-consul/tree/master/modules/install-dnsmasq) on each server that
needs to access Vault. This allows you to access Vault from your EC2 Instances as follows:

```
Expand Down Expand Up @@ -428,7 +428,7 @@ same cluster because:
1. This Vault Module uses Consul as a high availability storage backend and both Vault and Consul keep their working
set in memory. That means you have two programs independently jockying for memory consumption on each server.

Check out the [Consul GCP Module](https://github.com/gruntwork-io/terraform-google-consul) for how to deploy a Consul
Check out the [Consul GCP Module](https://github.com/hashicorp/terraform-google-consul) for how to deploy a Consul
server cluster in GCP. See the [vault-cluster-public](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-cluster-public) and
[vault-cluster-private](https://github.com/hashicorp/terraform-google-vault/tree/master/examples/vault-cluster-private) examples for sample code that shows how to run both a
Vault server cluster and Consul server cluster.
Expand Down
2 changes: 1 addition & 1 deletion modules/vault-lb-fr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ code by adding a `module` configuration and setting its `source` parameter to UR
```hcl
module "vault_lb" {
# Use version v0.0.1 of the vault-cluster module
source = "github.com/gruntwork-io/terraform-google-vault//modules/vault-lb-fr?ref=v0.0.1"
source = "github.com/hashicorp/terraform-google-vault//modules/vault-lb-fr?ref=v0.0.1"
# This is the tag name that the Vault Compute Instances use to automatically discover each other. Knowing this, we
# can create a Firewall Rule that permits access from the Load Balancer to the Vault Cluster
Expand Down

0 comments on commit b4d3f6e

Please sign in to comment.