-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-root-ca-sample
- Loading branch information
Showing
22 changed files
with
1,314 additions
and
37 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
# [START compute_instances_quickstart] | ||
resource "google_compute_instance" "default" { | ||
name = "my-vm" | ||
machine_type = "n1-standard-1" | ||
zone = "us-central1-a" | ||
|
||
boot_disk { | ||
initialize_params { | ||
image = "ubuntu-minimal-2210-kinetic-amd64-v20230126" | ||
} | ||
} | ||
|
||
network_interface { | ||
network = "default" | ||
access_config {} | ||
} | ||
} | ||
# [END compute_instances_quickstart] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* Made to resemble | ||
* gcloud compute instance-groups managed create rmig-daof \ | ||
* --template=template \ | ||
* --size=3 \ | ||
* --region=us-central1 \ | ||
* --default-action-on-vm-failure=repair | ||
*/ | ||
# [START compute_regional_instance_group_manager_daof_parent_tag] | ||
resource "google_compute_instance_template" "default" { | ||
name = "template" | ||
machine_type = "e2-medium" | ||
|
||
disk { | ||
source_image = "debian-cloud/debian-11" | ||
} | ||
|
||
network_interface { | ||
network = "default" | ||
} | ||
} | ||
# [START compute_regional_instance_group_manager_daof_tag] | ||
resource "google_compute_region_instance_group_manager" "default" { | ||
name = "rmig-daof" | ||
base_instance_name = "test" | ||
target_size = 3 | ||
region = "us-central1" | ||
|
||
version { | ||
instance_template = google_compute_instance_template.default.id | ||
name = "primary" | ||
} | ||
|
||
instance_lifecycle_policy { | ||
default_action_on_failure = "REPAIR" | ||
} | ||
} | ||
# [END compute_regional_instance_group_manager_daof_tag] | ||
# [END compute_regional_instance_group_manager_daof_parent_tag] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* Copyright 202 4Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* Made to resemble: | ||
* gcloud compute instance-groups managed all-instances-config update mig-aic \ | ||
* --metadata="key1"="value1","key2"="value2" \ | ||
* --labels="key3"="value3","key4"="value4" | ||
*/ | ||
|
||
# [START compute_zonal_instance_group_manager_aic_parent_tag] | ||
resource "google_compute_instance_template" "default" { | ||
name = "some-instance-template" | ||
machine_type = "e2-medium" | ||
|
||
disk { | ||
source_image = "debian-cloud/debian-11" | ||
} | ||
|
||
network_interface { | ||
network = "default" | ||
} | ||
} | ||
# [START compute_zonal_instance_group_manager_aic_tag] | ||
resource "google_compute_instance_group_manager" "default" { | ||
|
||
name = "mig-aic" | ||
base_instance_name = "test" | ||
zone = "us-central1-f" | ||
|
||
version { | ||
instance_template = google_compute_instance_template.default.id | ||
name = "primary" | ||
} | ||
|
||
all_instances_config { | ||
metadata = { | ||
key1 = "value1", | ||
key2 = "value2" | ||
} | ||
labels = { | ||
key3 = "value3", | ||
key4 = "value4" | ||
} | ||
} | ||
} | ||
# [END compute_zonal_instance_group_manager_aic_tag] | ||
# [END compute_zonal_instance_group_manager_aic_parent_tag] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* Made to resemble | ||
* gcloud compute instance-groups managed create mig-daof \ | ||
* --template=template \ | ||
* --size=3 \ | ||
* --zone=us-central1-f \ | ||
* --default-action-on-vm-failure=do_nothing | ||
*/ | ||
# [START compute_zonal_instance_group_manager_daof_parent_tag] | ||
resource "google_compute_instance_template" "default" { | ||
name = "template" | ||
machine_type = "e2-medium" | ||
|
||
disk { | ||
source_image = "debian-cloud/debian-11" | ||
} | ||
|
||
network_interface { | ||
network = "default" | ||
} | ||
} | ||
# [START compute_zonal_instance_group_manager_daof_tag] | ||
resource "google_compute_instance_group_manager" "default" { | ||
name = "mig-daof" | ||
base_instance_name = "test" | ||
target_size = 3 | ||
zone = "us-central1-f" | ||
|
||
version { | ||
instance_template = google_compute_instance_template.default.id | ||
name = "primary" | ||
} | ||
|
||
instance_lifecycle_policy { | ||
default_action_on_failure = "DO_NOTHING" | ||
} | ||
} | ||
# [END compute_zonal_instance_group_manager_daof_tag] | ||
# [END compute_zonal_instance_group_manager_daof_parent_tag] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** Made to resemble | ||
* gcloud beta compute instance-groups managed update standby-mig \ | ||
* --standby-policy-mode=scale-out-pool \ | ||
* --standby-policy-initial-delay=50 \ | ||
* --zone=us-central1-f | ||
*/ | ||
# [START compute_zonal_instance_group_manager_standby_policy_parent_tag] | ||
resource "google_compute_instance_template" "default" { | ||
name = "an-instance-template" | ||
machine_type = "e2-medium" | ||
|
||
disk { | ||
source_image = "debian-cloud/debian-11" | ||
} | ||
|
||
network_interface { | ||
network = "default" | ||
} | ||
} | ||
|
||
# [START compute_zonal_instance_group_manager_standby_policy_tag] | ||
resource "google_compute_instance_group_manager" "default" { | ||
provider = google-beta | ||
name = "standby-mig" | ||
base_instance_name = "test" | ||
target_size = 3 | ||
zone = "us-central1-f" | ||
|
||
version { | ||
instance_template = google_compute_instance_template.default.id | ||
name = "primary" | ||
} | ||
standby_policy { | ||
initial_delay_sec = 50 | ||
mode = "SCALE_OUT_POOL" | ||
} | ||
} | ||
# [END compute_zonal_instance_group_manager_standby_policy_tag] | ||
# [END compute_zonal_instance_group_manager_standby_policy_parent_tag] |
Oops, something went wrong.