Created
February 25, 2019 10:29
-
-
Save j4k/0adfd627a4fad6706d61e27d1e552586 to your computer and use it in GitHub Desktop.
terraform error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * module.infra-production.module.jpmain-cloudsql-rr-ha.output.replica_instance_sql_ipv4s: Resource 'google_sql_database_instance.new_instance_sql_replica' does not have attribute 'ip_address.0.ip_address' for variable 'google_sql_database_instance.new_instance_sql_replica.*.ip_address.0.ip_address' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| output "replica_instance_sql_ipv4s" { | |
| value = ["${google_sql_database_instance.new_instance_sql_replica.*.ip_address.0.ip_address}"] | |
| description = "The IPv4 address assigned for replicas" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Replica CloudSQL - Read replica | |
| resource "google_sql_database_instance" "new_instance_sql_replica" { | |
| count = "${lookup(var.general, "replica_count", 0)}" | |
| name = "${local.name_prefix}-replica-${count.index}" | |
| region = "${var.general["region"]}" | |
| database_version = "${lookup(var.general, "db_version", "MYSQL_5_7")}" | |
| master_instance_name = "${google_sql_database_instance.new_instance_sql_master.name}" | |
| replica_configuration { | |
| failover_target = false | |
| } | |
| settings { | |
| tier = "${lookup(var.replica, "tier", "db-f1-micro")}" | |
| disk_type = "${lookup(var.replica, "disk_type", "PD_SSD")}" | |
| disk_size = "${lookup(var.replica, "disk_size", 10)}" | |
| disk_autoresize = "${lookup(var.replica, "disk_auto", true)}" | |
| activation_policy = "${lookup(var.replica, "activation_policy", "ALWAYS")}" | |
| availability_type = "ZONAL" | |
| crash_safe_replication = true | |
| ip_configuration { | |
| require_ssl = "${lookup(var.replica, "require_ssl", false)}" | |
| ipv4_enabled = "${lookup(var.replica, "ipv4_enabled", true)}" | |
| } | |
| location_preference { | |
| zone = "${var.general["region"]}-${var.master["zone"]}" | |
| } | |
| maintenance_window { | |
| day = "${lookup(var.replica, "maintenance_day", 3)}" # Wednesday | |
| hour = "${lookup(var.replica, "maintenance_hour", 2)}" # 2AM | |
| update_track = "${lookup(var.replica, "maintenance_track", "stable")}" | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment