Skip to content

Commit e0aedef

Browse files
bvliucopybara-github
authored andcommitted
Support both zonal and HA AlloyDB.
PiperOrigin-RevId: 715045102
1 parent 0eb1cbe commit e0aedef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

perfkitbenchmarker/providers/gcp/gcp_alloy_db.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ def _Create(self) -> None:
136136
'--cpu-count=%s' % self.spec.db_spec.cpus,
137137
'--instance-type=PRIMARY',
138138
]
139+
if self.spec.high_availability:
140+
cmd_string.append('--availability-type=REGIONAL')
141+
else:
142+
cmd_string.append('--availability-type=ZONAL')
139143

140144
cmd = self._GetAlloyDbCommand(cmd_string)
141145
cmd.Issue(timeout=CREATION_TIMEOUT)

0 commit comments

Comments
 (0)