Skip to content

Commit

Permalink
Added: random_id index
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantin-recurly committed May 28, 2020
1 parent 7a36211 commit cc660a0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/mssql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "random_password" "root-password" {
resource "google_sql_database_instance" "default" {
provider = google-beta
project = var.project_id
name = var.random_instance_name ? "${var.name}-${random_id.suffix.hex}" : var.name
name = var.random_instance_name ? "${var.name}-${random_id.suffix[0].hex}" : var.name
database_version = var.database_version
region = var.region
root_password = coalesce(var.root_password, random_password.root-password.result)
Expand Down
2 changes: 1 addition & 1 deletion modules/mysql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "random_id" "suffix" {
resource "google_sql_database_instance" "default" {
provider = google-beta
project = var.project_id
name = var.random_instance_name ? "${var.name}-${random_id.suffix.hex}" : var.name
name = var.random_instance_name ? "${var.name}-${random_id.suffix[0].hex}" : var.name
database_version = var.database_version
region = var.region
encryption_key_name = var.encryption_key_name
Expand Down
2 changes: 1 addition & 1 deletion modules/postgresql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "random_id" "suffix" {
resource "google_sql_database_instance" "default" {
provider = google-beta
project = var.project_id
name = var.random_instance_name ? "${var.name}-${random_id.suffix.hex}" : var.name
name = var.random_instance_name ? "${var.name}-${random_id.suffix[0].hex}" : var.name
database_version = var.database_version
region = var.region
encryption_key_name = var.encryption_key_name
Expand Down
2 changes: 1 addition & 1 deletion modules/safer_mysql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "random_id" "suffix" {
module "safer_mysql" {
source = "../mysql"
project_id = var.project_id
name = var.random_instance_name ? "${var.name}-${random_id.suffix.hex}" : var.name
name = var.random_instance_name ? "${var.name}-${random_id.suffix[0].hex}" : var.name
database_version = var.database_version
region = var.region
zone = var.zone
Expand Down

0 comments on commit cc660a0

Please sign in to comment.