Skip to content

Commit 43e8e11

Browse files
authored
Merge branch 'main' into config-change
2 parents c5ab618 + 3c34163 commit 43e8e11

File tree

9 files changed

+514
-31
lines changed

9 files changed

+514
-31
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.22
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.23
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424
DOCKER_BIN ?= docker

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ tags:
105105
- 'integration'
106106
substitutions:
107107
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
108-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.22'
108+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.23'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ tags:
2222
- 'lint'
2323
substitutions:
2424
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
25-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.22'
25+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.23'

compute/zonal_mig_standby_policy/main.tf

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,22 @@
1414
* limitations under the License.
1515
*/
1616
/** Made to resemble
17-
* gcloud beta compute instance-groups managed update standby-mig \
17+
* gcloud compute instance-groups managed update standby-mig \
1818
* --standby-policy-mode=scale-out-pool \
1919
* --standby-policy-initial-delay=50 \
20+
* --target-size=3\
2021
* --zone=us-central1-f
2122
*/
23+
24+
terraform {
25+
required_providers {
26+
google = {
27+
source = "hashicorp/google"
28+
version = ">= 6.16.0"
29+
}
30+
}
31+
}
32+
2233
# [START compute_zonal_instance_group_manager_standby_policy_parent_tag]
2334
resource "google_compute_instance_template" "default" {
2435
name = "an-instance-template"
@@ -35,7 +46,6 @@ resource "google_compute_instance_template" "default" {
3546

3647
# [START compute_zonal_instance_group_manager_standby_policy_tag]
3748
resource "google_compute_instance_group_manager" "default" {
38-
provider = google-beta
3949
name = "standby-mig"
4050
base_instance_name = "test"
4151
target_size = 3
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/** Made to resemble
18+
* gcloud compute instance-groups managed update standby-mig \
19+
* --standby-policy-mode=scale-out-pool \
20+
* --standby-policy-initial-delay=50 \
21+
* --target-size=1 \
22+
* --suspended-size=1 \
23+
* --stopped-size=2 \
24+
* --zone=us-central1-f
25+
*/
26+
27+
terraform {
28+
required_providers {
29+
google = {
30+
source = "hashicorp/google"
31+
version = ">= 6.16.0"
32+
}
33+
}
34+
}
35+
36+
# [START compute_zonal_mig_standby_policy_with_resize_parent_tag]
37+
resource "google_compute_instance_template" "default" {
38+
name = "standby-mig-instance-template"
39+
machine_type = "e2-medium"
40+
41+
disk {
42+
source_image = "debian-cloud/debian-11"
43+
}
44+
45+
network_interface {
46+
network = "default"
47+
}
48+
}
49+
50+
# [START compute_zonal_mig_standby_policy_with_resize_tag]
51+
resource "google_compute_instance_group_manager" "default" {
52+
name = "standby-mig"
53+
base_instance_name = "test"
54+
target_size = 1
55+
target_suspended_size = 1
56+
target_stopped_size = 2
57+
zone = "us-central1-f"
58+
59+
version {
60+
instance_template = google_compute_instance_template.default.id
61+
name = "primary"
62+
}
63+
standby_policy {
64+
initial_delay_sec = 50
65+
mode = "SCALE_OUT_POOL"
66+
}
67+
}
68+
# [END compute_zonal_mig_standby_policy_with_resize_tag]
69+
# [END compute_zonal_mig_standby_policy_with_resize_parent_tag]

0 commit comments

Comments
 (0)