fix a few issues from the tests. bump version in docs
This commit is contained in:
@@ -28,7 +28,7 @@ resource "random_id" "name" {
|
||||
|
||||
locals {
|
||||
# If name_override is specified, use that - otherwise use the name_prefix with a random string
|
||||
instance_name = "${length(var.name_override) == 0 ? format("%s-%s", var.name_prefix, random_id.name.hex) : var.name_override}"
|
||||
instance_name = length(var.name_override) == 0 ? format("%s-%s", var.name_prefix, random_id.name.hex) : var.name_override
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -38,24 +38,24 @@ locals {
|
||||
module "postgres" {
|
||||
# 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 = "github.com/gruntwork-io/terraform-google-sql.git//modules/cloud-sql?ref=v0.1.1"
|
||||
# source = "github.com/gruntwork-io/terraform-google-sql.git//modules/cloud-sql?ref=v0.2.0"
|
||||
source = "../../modules/cloud-sql"
|
||||
|
||||
project = "${var.project}"
|
||||
region = "${var.region}"
|
||||
name = "${local.instance_name}"
|
||||
db_name = "${var.db_name}"
|
||||
project = var.project
|
||||
region = var.region
|
||||
name = local.instance_name
|
||||
db_name = var.db_name
|
||||
|
||||
engine = "${var.postgres_version}"
|
||||
machine_type = "${var.machine_type}"
|
||||
engine = var.postgres_version
|
||||
machine_type = var.machine_type
|
||||
|
||||
# These together will construct the master_user privileges, i.e.
|
||||
# 'master_user_name'@'master_user_host' IDENTIFIED BY 'master_user_password'.
|
||||
# These should typically be set as the environment variable TF_VAR_master_user_password, etc.
|
||||
# so you don't check these into source control."
|
||||
master_user_password = "${var.master_user_password}"
|
||||
master_user_password = var.master_user_password
|
||||
|
||||
master_user_name = "${var.master_user_name}"
|
||||
master_user_name = var.master_user_name
|
||||
master_user_host = "%"
|
||||
|
||||
# To make it easier to test this example, we are giving the servers public IP addresses and allowing inbound
|
||||
@@ -65,7 +65,7 @@ module "postgres" {
|
||||
|
||||
# Default setting for this is 'false' in 'variables.tf'
|
||||
# In the test cases, we're setting this to true, to test forced SSL.
|
||||
require_ssl = "${var.require_ssl}"
|
||||
require_ssl = var.require_ssl
|
||||
|
||||
authorized_networks = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user