File tree Expand file tree Collapse file tree 5 files changed +23
-12
lines changed
modules/schedule_spanner_backup Expand file tree Collapse file tree 5 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ resource "google_spanner_instance" "instance_num_node" {
5050 config = var. instance_config
5151 display_name = var. instance_display_name
5252 name = var. instance_name
53+ edition = var. edition
5354 num_nodes = var. instance_size . num_nodes
5455 labels = var. instance_labels
5556}
@@ -60,6 +61,7 @@ resource "google_spanner_instance" "instance_processing_units" {
6061 config = var. instance_config
6162 display_name = var. instance_display_name
6263 name = var. instance_name
64+ edition = var. edition
6365 processing_units = var. instance_size . processing_units
6466 labels = var. instance_labels
6567}
Original file line number Diff line number Diff line change 1515 */
1616
1717module "service_account_scheduler" {
18- source = " terraform-google-modules/service-accounts/google"
19- version = " ~> 4.1.1"
20- project_id = var. project_id
21- prefix = " spanner-backup-scheduler"
22- names = [" 1" ]
23-
18+ source = " terraform-google-modules/service-accounts/google"
19+ version = " ~> 4.4.0"
20+ project_id = var. project_id
21+ prefix = " spanner-backup-scheduler"
22+ names = [" 1" ]
2423 project_roles = [" ${ var . project_id } =>roles/workflows.invoker" ]
2524}
2625
2726module "service_account_workflow" {
2827 source = " terraform-google-modules/service-accounts/google"
29- version = " ~> 4.1.1 "
28+ version = " ~> 4.4.0 "
3029 project_id = var. project_id
3130 prefix = " spanner-backup-workflow"
3231 names = [" 1" ]
3332 project_roles = [" ${ var . project_id } =>roles/spanner.backupAdmin" ]
3433}
3534
3635module "workflow" {
37- source = " github.com/GoogleCloudPlatform /terraform-google-cloud-workflows?ref=v0.1.1 "
36+ source = " github.com/livechat /terraform-google-cloud-workflows"
3837 project_id = var. project_id
3938 workflow_name = " spanner-backup-workflow"
4039 region = var. backup_schedule_region
Original file line number Diff line number Diff line change 1515 */
1616
1717terraform {
18- required_version = " >= 0.13 "
18+ required_version = " >= 1.5.0 "
1919 required_providers {
2020 google = {
2121 source = " hashicorp/google"
22- version = " >= 3.53 , < 7"
22+ version = " >= 6.8.0 , < 7"
2323 }
2424 }
2525}
Original file line number Diff line number Diff line change @@ -52,6 +52,16 @@ variable "instance_size" {
5252 }
5353}
5454
55+ variable "edition" {
56+ description = " The edition selected for this instance. Different editions provide different capabilities at different price points."
57+ type = string
58+ default = " STANDARD"
59+ validation {
60+ condition = can (regex (" ^(EDITION_UNSPECIFIED|STANDARD|ENTERPRISE|ENTERPRISE_PLUS)$" , var. edition ))
61+ error_message = " The edition must be one of the following: STANDARD, ENTERPRISE, ENTERPRISE_PLUS or EDITION_UNSPECIFIED"
62+ }
63+ }
64+
5565variable "create_instance" {
5666 description = " Switch to use create OR use existing Spanner Instance "
5767 type = bool
Original file line number Diff line number Diff line change 1515 */
1616
1717terraform {
18- required_version = " >= 0.13 "
18+ required_version = " >= 1.5.0 "
1919 required_providers {
2020 google = {
2121 source = " hashicorp/google"
22- version = " >= 3.53 , < 7"
22+ version = " >= 6.8 , < 7"
2323 }
2424 }
2525
You can’t perform that action at this time.
0 commit comments