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" {
50
50
config = var. instance_config
51
51
display_name = var. instance_display_name
52
52
name = var. instance_name
53
+ edition = var. edition
53
54
num_nodes = var. instance_size . num_nodes
54
55
labels = var. instance_labels
55
56
}
@@ -60,6 +61,7 @@ resource "google_spanner_instance" "instance_processing_units" {
60
61
config = var. instance_config
61
62
display_name = var. instance_display_name
62
63
name = var. instance_name
64
+ edition = var. edition
63
65
processing_units = var. instance_size . processing_units
64
66
labels = var. instance_labels
65
67
}
Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
module "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" ]
24
23
project_roles = [" ${ var . project_id } =>roles/workflows.invoker" ]
25
24
}
26
25
27
26
module "service_account_workflow" {
28
27
source = " terraform-google-modules/service-accounts/google"
29
- version = " ~> 4.1.1 "
28
+ version = " ~> 4.4.0 "
30
29
project_id = var. project_id
31
30
prefix = " spanner-backup-workflow"
32
31
names = [" 1" ]
33
32
project_roles = [" ${ var . project_id } =>roles/spanner.backupAdmin" ]
34
33
}
35
34
36
35
module "workflow" {
37
- source = " github.com/GoogleCloudPlatform /terraform-google-cloud-workflows?ref=v0.1.1 "
36
+ source = " github.com/livechat /terraform-google-cloud-workflows"
38
37
project_id = var. project_id
39
38
workflow_name = " spanner-backup-workflow"
40
39
region = var. backup_schedule_region
Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
terraform {
18
- required_version = " >= 0.13 "
18
+ required_version = " >= 1.5.0 "
19
19
required_providers {
20
20
google = {
21
21
source = " hashicorp/google"
22
- version = " >= 3.53 , < 7"
22
+ version = " >= 6.8.0 , < 7"
23
23
}
24
24
}
25
25
}
Original file line number Diff line number Diff line change @@ -52,6 +52,16 @@ variable "instance_size" {
52
52
}
53
53
}
54
54
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
+
55
65
variable "create_instance" {
56
66
description = " Switch to use create OR use existing Spanner Instance "
57
67
type = bool
Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
terraform {
18
- required_version = " >= 0.13 "
18
+ required_version = " >= 1.5.0 "
19
19
required_providers {
20
20
google = {
21
21
source = " hashicorp/google"
22
- version = " >= 3.53 , < 7"
22
+ version = " >= 6.8 , < 7"
23
23
}
24
24
}
25
25
You can’t perform that action at this time.
0 commit comments