Skip to content

Commit 820dfa5

Browse files
authored
fix: improve doc for Spanner instance_config input and update env_vars output (GoogleCloudPlatform#75)
1 parent 70901af commit 820dfa5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Functional examples are included in the
6262
| enable\_autoscaling | Enable autoscaling for the Spanner Instance | `bool` | `false` | no |
6363
| force\_destroy | Whether to force destroy the instance and its backups. | `bool` | `false` | no |
6464
| high\_priority\_cpu\_utilization\_percent | Target high priority CPU utilization percentage for autoscaling. | `number` | `60` | no |
65-
| instance\_config | The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. | `string` | n/a | yes |
65+
| instance\_config | The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1, us-central etc. In order to obtain a valid list please consult the https://cloud.google.com/spanner/docs/instance-configurations | `string` | n/a | yes |
6666
| instance\_display\_name | The descriptive name for this instance as it appears in UIs. | `string` | `"spanner-instance"` | no |
6767
| instance\_iam | The list of permissions on spanner instance | `list(string)` | `[]` | no |
6868
| instance\_labels | A set of key/value label pairs to assign to the spanner instance | `map(string)` | `{}` | no |

metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ spec:
5656
varType: string
5757
defaultValue: spanner-instance
5858
- name: instance_config
59-
description: The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance.
59+
description: The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1, us-central etc. In order to obtain a valid list please consult the https://cloud.google.com/spanner/docs/instance-configurations
6060
varType: string
6161
required: true
6262
- name: instance_size

outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ output "env_vars" {
3939
description = "Map of environment variables for Spanner databases with keys as project_id:instance_name:database_name and values as fully qualified database paths"
4040
value = {
4141
for k, v in local.database_creation_list :
42-
"${var.project_id}:${var.instance_name}:${k}" => "projects/${var.project_id}/instances/${var.instance_name}/databases/${k}"
42+
replace("${var.project_id}_${var.instance_name}_${k}", "-", "_") => "projects/${var.project_id}/instances/${var.instance_name}/databases/${k}"
4343
}
4444
}
4545

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ variable "instance_display_name" {
3131
}
3232

3333
variable "instance_config" {
34-
description = "The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance."
34+
description = "The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1, us-central etc. In order to obtain a valid list please consult the https://cloud.google.com/spanner/docs/instance-configurations"
3535
type = string
3636
}
3737

0 commit comments

Comments
 (0)