Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Update the script for google provider 2.0.0 #58

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ data "template_file" "startup_script_vault" {
# ---------------------------------------------------------------------------------------------------------------------

module "consul_cluster" {
source = "git::git@github.com:hashicorp/terraform-google-consul.git//modules/consul-cluster?ref=v0.4.0"
source = "github.com/teradici/terraform-google-consul//modules/consul-cluster?ref=v0.5.0"

gcp_project_id = var.gcp_project_id
gcp_region = var.gcp_region
Expand Down
11 changes: 9 additions & 2 deletions modules/vault-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,20 @@ resource "google_compute_region_instance_group_manager" "vault" {
project = var.gcp_project_id

base_instance_name = var.cluster_name
instance_template = data.template_file.compute_instance_template_self_link.rendered

version {
instance_template = data.template_file.compute_instance_template_self_link.rendered
}

region = var.gcp_region

# Restarting a Vault server has an important consequence: The Vault server has to be manually unsealed again. Therefore,
# the update strategy used to roll out a new GCE Instance Template must be a rolling update. But since Terraform does
# not yet support ROLLING_UPDATE, such updates must be manually rolled out for now.
update_strategy = var.instance_group_update_strategy
# Invalid after google provider 2.0.0
# may consider to use update_policy if needed.
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/version_2_upgrade
# update_strategy = var.instance_group_update_strategy

target_pools = var.instance_group_target_pools
target_size = var.cluster_size
Expand Down