Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sahu-Ayush/cee9ab484a2e731bece31a4f4cd56cab to your computer and use it in GitHub Desktop.
Save Sahu-Ayush/cee9ab484a2e731bece31a4f4cd56cab to your computer and use it in GitHub Desktop.
variable regions_as_objects {
type = list(object({
zone = string
region = string
}))
default = [
{
zone = "us-east1-c"
region = "us-east1"
},
{
zone = "us-west1-c"
region = "us-west1"
}
]
}
@Sahu-Ayush
Copy link
Author

dynamic "database_flags" {
for_each = var.database_flags
content {
name = lookup(database_flags.value, "name", null)
value = lookup(database_flags.value, "value", null)
}
}

variable "database_flags" {
type = list(object({
name = string
value = string
}))
default = []
}

database_flags = [
{
name = "sql_mode"
value = "NO_ENGINE_SUBSTITUTION"
},
{
name = "character_set_server"
value = "utf8mb4"
},
{
name = "long_query_time"
value = "5"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment